1
lazyfighter Oct 22, 2020
mark 比较好奇什么场景
|
2
momo1999 Oct 22, 2020
写个小程序生成一下配置?
|
3
justseemore Oct 22, 2020
|
4
okr OP @lazyfighter 为了不暴露后面的服务器
@shuax 写 N 调代理规则吗? 配置: ``` upstream abc { server 1.1.1.1:10000-20000; #这一步无法解决 } server { listen 10000-20000 udp; proxy_connect_timeout 3s; proxy_timeout 3s; proxy_pass abc; } ``` |
6
justseemore Oct 22, 2020
@ghtstice 啊.sorry ,审题不严
|
7
Cooky Oct 22, 2020 via Android 费那个劲你还不如直接 iptables
|
8
lvzhiqiang Oct 22, 2020
@Cooky 正解,DNAT 就可以了。
|
9
Xusually Oct 22, 2020
iptables 、ufw 、firewalld 退出了聊天
|
10
superrichman Oct 22, 2020
试试 upstream 不写端口 server 改成 proxy_pass abc:$server_port;
|
11
superrichman Oct 22, 2020 via iPhone
@superrichman 不过这需求是挺奇怪的,一般端口转发可不是 nginx 做的
|
12
okr OP @Cooky
@lvzhiqiang @Xusually 因为其他端口还有负载的需求,所以采用了 nginx 。 @superrichman 这样试了下不行。因为其他端口还有负载的需求,所以采用了 nginx 。 |
13
okr OP |
14
dorothyREN Oct 22, 2020
iptables 一条命令的事。。。。为啥搞这么麻烦
|
15
okr OP @dorothyREN 用 iptables 回路上会有问题吗?
|
16
UnknownSky Jan 5, 2021 via Android
nginx udp 轉發唯一的功能就是轉發 DNS :)
|