How can I test an outbound connection to an IP address as well as a specific port?

前端 未结 6 1535
被撕碎了的回忆
被撕碎了的回忆 2020-12-24 03:15

OK, we all know how to use PING to test connectivity to an IP address. What I need to do is something similar but test if my outbound request to a given IP Address as well a

6条回答
  •  情歌与酒
    2020-12-24 04:12

    The fastest / most efficient way I found to to this is with nmap and portquiz.net described here: http://thomasmullaly.com/2013/04/13/outgoing-port-tester/ This scans to top 1000 most used ports:

    # nmap -Pn --top-ports 1000 portquiz.net
    
    Starting Nmap 6.40 ( http://nmap.org ) at 2017-08-02 22:28 CDT
    Nmap scan report for portquiz.net (178.33.250.62)
    Host is up (0.072s latency).
    rDNS record for 178.33.250.62: electron.positon.org
    Not shown: 996 closed ports
    PORT     STATE SERVICE
    53/tcp   open  domain
    80/tcp   open  http
    443/tcp  open  https
    8080/tcp open  http-proxy
    
    Nmap done: 1 IP address (1 host up) scanned in 4.78 seconds
    

    To scan them all (took 6 sec instead of 5):

    # nmap -Pn -p1-65535 portquiz.net
    

提交回复
热议问题