How do i use nmap to scan all 65535 ports?

  • Man page for nmap

    Quote from the nmap man page:

    While Nmap is commonly used for security audits, many systems and network administrators find it useful for routine tasks such as network inventory, managing service upgrade schedules, and monitoring host or service uptime.

    -p port ranges (Only scan specified ports) .
    	   This option specifies which ports you want to scan and overrides the default. Individual port
    	   numbers are OK, as are ranges separated by a hyphen (e.g.  1-1023). The beginning and/or end
    	   values of a range may be omitted, causing Nmap to use 1 and 65535, respectively. So you can
    	   specify -p- to scan ports from 1 through 65535. Scanning port zero.	is allowed if you
    	   specify it explicitly. For IP protocol scanning (-sO), this option specifies the protocol
    	   numbers you wish to scan for (0–255).
    $ nmap -p- localhost
    Starting Nmap 6.40 ( ) at 2017-03-12 09:34 BST
    Nmap scan report for localhost (
    Host is up (0.00049s latency).
    Other addresses for localhost (not scanned):
    Not shown: 65530 closed ports
    22/tcp    open  ssh
    25/tcp    open  smtp
    111/tcp   open  rpcbind
    631/tcp   open  ipp
    37328/tcp open  unknown
    Nmap done: 1 IP address (1 host up) scanned in 2.41 seconds

Log in to reply

© Lightnetics 2019