TCP端口大家都知道,比如80端口,可以使用 telnet ip 80,来验证端口是否正常监听,那UDP端口是否可以同样测试呢?详细如下:

下面我们来进行测试,123端口是服务器42.11.12.13打开的UDP端口,
udp 0 0 42.11.12.13:123 0.0.0.0:* 1472/ntpd

1.我们首先使用telnet连接,如下
[root@kr-sg-test ~]# telnet 42.11.12.13 123
Trying 42.11.12.13…
telnet: connect to address 42.11.12.13: Connection refused
telnet: Unable to connect to remote host: Connection refused
很明显,telnet连接被拒绝,无法测试成功。

2.我们使用nc来进行测试,如下
[root@kr-sg-test ~]# nc -vuz 42.11.12.13 123
Connection to 42.11.12.13 123 port [udp/ntp] succeeded!
结果证明UDP 123端口正常监听。

相关文章:

  • 2021-06-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-30
  • 2021-09-07
  • 2021-09-14
  • 2022-12-23
猜你喜欢
  • 2022-01-30
  • 2021-10-14
  • 2021-07-30
  • 2022-12-23
  • 2022-03-13
相关资源
相似解决方案