node.js - 用node开启的UDP端口,远程无法访问
PHPz
PHPz 2017-04-17 16:05:02
0
2
671

【补充】刚关闭了防火墙,用netcat测试仍然是无法连接

本人刚接触udp协议,之前一直是http,然后最近用nodejs,看到有udp处理的方法,然后就用nodejs,开启的是1193的端口,在本机上部署服务端跟客户端处理程序,测试良好

1193端口:

本机测试结果:

但是在远程用同样的client程序给远程服务器发送udp信息时,无法通行,telnet也无法链接

防火墙已添加1193端口的访问

想请问下是否我有哪些步骤操作错误,导致远程无法访问

PHPz
PHPz

学习是最好的投资!

reply all(2)
Peter_Zhu

If it is a remote server from Tencent or Alibaba, pay attention to configuring the security group. If the security group does not open the corresponding port, the server's open port will be useless.

巴扎黑

Telnet uses the tcp protocol, so of course you will see that the connection failed.
If your client cannot receive information, it is likely that the OUTPUT chain is blocked.
So you need to release both the INPUT chain and the OUTPUT chain at the same time.

-A INPUT -p udp -m udp --dport 1193 -j ACCEPT
-A OUTPUT -p udp -m udp --sport 1193 -j ACCEPT
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template