监测udp端口开放情况

2,563次阅读
没有评论

[root@i-hnx0tx7t ~]# nmap -sU 127.0.0.1 -p68 -Pn

Starting Nmap 6.40 (http://nmap.org) at 2018-03-04 19:46 CST
Nmap scan report for localhost (127.0.0.1)
Host is up.
PORT STATE SERVICE
68/udp open|filtered dhcpc

Nmap done: 1 IP address (1 host up) scanned in 2.07 seconds
[root@i-hnx0tx7t ~]# nmap -sU 127.0.0.1 -p68 -Pn|grep open -c
1
[root@i-hnx0tx7t ~]# nmap -sU 127.0.0.1 -p68 -Pn|grep open
68/udp open|filtered dhcpc
[root@i-hnx0tx7t ~]#
[root@tokyo-*** ~]# nc -uvz 127.0.0.1 500
Ncat: Version 7.50 (https://nmap.org/ncat)
Ncat: Connected to 127.0.0.1:500.
Ncat: UDP packet sent successfully
Ncat: 1 bytes sent, 0 bytes received in 2.02 seconds. #代表成功
[root@tokyo-*** ~]#
[root@tokyo-*** ~]# nc -uvz 127.0.0.1 501
Ncat: Version 7.50 (https://nmap.org/ncat)
Ncat: Connected to 127.0.0.1:501.
Ncat: Connection refused. #代表失败
[root@tokyo-*** ~]#

正文完
 0
评论(没有评论)
验证码