Linux端口查看命令
1. telnet命令
(1)端口通畅的情况
[root@portal_A /]# telnet 10.4.200.114 8500
Trying 10.4.200.114...
Connected to 10.4.200.114 (10.4.200.114).
Escape character is '^]'.
(2)端口不通的情况
[root@portal_A /]# telnet 10.4.200.114 9028
Trying 10.4.200.114...
2. nmap命令
----判断机器的端口是否开放。看state
---------filtered:(被过滤的):意味着防火墙,过滤器或者其它网络障碍阻止了该端口被访问
---------open(开放的)
---------closed(关闭的)
(1)端口通畅的情况
[root@portal_A /]# nmap 10.4.200.114 -p 8500
Interesting ports on 10.4.200.114:
PORT STATE SERVICE
8500/tcp open unknown
(2)端口不通的情况
[root@portal_A /]# nmap 10.4.200.114 -p 9028
Interesting ports on 10.4.200.114:
PORT STATE SERVICE
9028/tcp filtered unknown
3. tracert命令
(1)端口通畅的情况
[root@portal_A /]# tracert 10.4.200.114 8500
traceroute to 10.4.200.114 (10.4.200.114), 30 hops max, 8500 byte packets
1 (10.4.203.227) 4.975 ms 5.060 ms 4.944 ms
2 (10.4.127.217) 5.562 ms 7.838 ms 3.946 ms
3 * * (10.4.200.129) 13.216 ms
4 (10.4.200.134) 4.305 ms 3.880 ms 3.544 ms
5 (10.4.200.137) 15.213 ms 15.208 ms 15.163 ms
6 (10.4.200.114) 7.880 ms 5.613 ms 6.595 ms
(2)端口不通的情况
[root@portal_A /]# tracert 10.4.200.114 9028
traceroute to 10.4.200.114 (10.4.200.114), 30 hops max, 9028 byte packets
1 * * *
2 (10.4.127.217) 3.714 ms 6.855 ms 4.844 ms
3 * * (10.4.200.129) 11.719 ms
4 (10.4.200.134) 4.374 ms 3.874 ms 4.581 ms
5 (10.4.200.137) 12.333 ms 12.309 ms 12.303 ms
6 * * *
7 * * *
8 * * *
9 * * *