Nmap version 7 commands and tips

Many systems and network administrators also find it useful for network inventory, managing service upgrade schedules, monitoring host or service uptime, and many other tasks

Nmap single host scanning nmap
Nmap scan entire subnet nmap
Nmap scan host nmap It is resolved via the Domain Name System (DNS) to determine the IP address to scan
Nmap choose random targets nmap -iR < num hosts > list-of-ips.txt The < num hosts > argument tells Nmap how many IPs to generate

Try it out

Host Protocol Port State Service Version
Nmap List scan nmap -sL
Nmap No port scan nmap -sn
-sS (TCP SYN scan) nmap -sS
-sT (TCP connect scan) nmap -sT
-sU (UDP scans) nmap -sU
-sX ( Xmas scans) nmap -sX
-sA ( TCP ACK scan) nmap -sA
-sW ( TCP Window scan ) nmap -sW
--top-ports 10 (Scans top most common ports) nmap --top-ports num
-F (Nmap fast scan with limited ports) nmap -F
-sV (Performs version detection) nmap -sV
How to select ports to scan
-p 22 or -p ssh nmap -p ssh
-p 22,25,80 (Multiple ports may be separated with commas) nmap -p -p 22,25,80
Latest improvement in Nmap version 7
  • Major Nmap Scripting Engine (NSE) Expansion
  • Mature IPv6 support
  • Infrastructure Upgrades
  • Faster Scans
  • SSL/TLS scanning solution of choice
  • Ncat Enhanced
  • Extreme Portabilityd
  • Signup
Included in Nmap suite
  • Advanced GUI and results viewer (Zenmap)
  • A flexible data transfer, redirection, and debugging tool (Ncat)
  • A utility for comparing scan results (Ndiff)
  • packet generation and response analysis tool (Nping)
  • SSL/TLS scanning solution of choice
Port states Recognized by Nmap
  • Open. An application is actively accepting TCP connections, UDP datagrams or SCTP associations on this port
  • Closed . A closed port is accessible (it receives and responds to Nmap probe packets), but there is no application listening on it
  • Filtered . Nmap cannot determine whether the port is open because packet filtering prevents its probes from reaching the port
  • Unfiltered . The unfiltered state means that a port is accessible, but Nmap is unable to determine whether it is open or closed
  • Open|filtered . Nmap places ports in this state when it is unable to determine whether a port is open or filtered
  • Closed|filtered . Nmap places ports in this state when it is unable to determine whether a port is open or filtered
Nmmapper Dashboard for nmap. Included is agnome like terminal.
Nmap port scanner management dashboard