#tcp监测端口是否存活
方法一: 使用telnet命令
telnet xxx.xxx.xxx.xxx 80
能进入说明端口是通的,一直显示正在连接说明端口不通
方法二: 使用tcping
C:\Users\Administrator>tcping www.baidu.com 80
Probing 182.61.200.6:80/tcp - Port is open - time=6.721ms
Probing 182.61.200.6:80/tcp - Port is open - time=5.817ms
Probing 182.61.200.6:80/tcp - Port is open - time=6.254ms
Probing 182.61.200.6:80/tcp - Port is open - time=6.856ms
Ping statistics for 182.61.200.6:80
4 probes sent.
4 successful, 0 failed. (0.00% fail)
Approximate trip times in milli-seconds:
Minimum = 5.817ms, Maximum = 6.856ms, Average = 6.412ms
#udp监测端口是否存活
#不存活案例
#显示是?,说明udp 1733不是存活的
C:\Users\Administrator>nc -zuv 106.3.140.58 1733
106.3.140.58: inverse host lookup failed: h_errno 11004: NO_DATA
(UNKNOWN) [106.3.140.58] 1733 (?) open
#存活案例
#显示是对应的服务,说明是存活的
C:\Users\Administrator>nc -zuv 106.3.140.58 4500
106.3.140.58: inverse host lookup failed: h_errno 11004: NO_DATA
(UNKNOWN) [106.3.140.58] 4500 (ipsec-msft) open
C:\Users\Administrator>nc -zuv 106.3.140.58 1701
106.3.140.58: inverse host lookup failed: h_errno 11004: NO_DATA
(UNKNOWN) [106.3.140.58] 1701 (l2tp) open
nc工具安装
下载链接https://eternallybored.org/misc/netcat/
netcat-win32-1.11.zip
将压缩包内nc.exe和nc64.exe放入C:\Windows\System32目录下。
tcping工具安装
下载地址https://download.elifulkerson.com//files/tcping/0.39/tcping.exe
tcping.rar
tcping.exe 放入C:\Windows\System32目录下。