如何检查端口的网络连接是否未打开,或者该端口是否正在侦听?

时间:2013-10-09 12:14:59

标签: networking telnet

我总是使用telnet [IP] [port]检查网络连接。但是,有时连接超时是因为没有任何东西正在侦听该端口,但是到该端口的隧道是打开的。我如何检查区别,即telnet超时是因为隧道未打开,还是因为没有人在另一端侦听该端口?

1 个答案:

答案 0 :(得分:0)

可能使用tcptraceroute,来自手册页

   This program attempts to trace the route an IP packet would  follow  to
   some internet host by launching probe packets with a small ttl (time to
   live) then listening for an ICMP "time exceeded" reply from a  gateway.
   We  start our probes with a ttl of one and increase by one until we get
   an ICMP "port unreachable" (or TCP reset)

将max_ttl值设置为适合您的防火墙