测试tcp端口我们可以用  telnet ip port,来验证端口是否正常监听,但是UTP端口呢?

使用Telnet测试如下:

[root@saltslave ~]# telnet 192.168.18.120 514

Trying 192.168.18.120...

telnet: connect to address 192.168.18.120: Connection refused

很显然,telnet被拒绝了


使用nc来测试

[root@saltslave ~]# yum install -y nc

[root@saltslave ~]# nc -uz 192.168.18.120 514

Connection to 192.168.18.120 514 port [udp/syslog] succeeded!


-u   udp模式

-z  使用输入/输出模式,只在扫描通信端口时使用