Menu

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 192.168.8.1
Nmap scan entire subnet nmap 192.168.8.1/24
Nmap scan host nmap www.nmmapper.com. 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 192.168.8.1
Nmap No port scan nmap -sn 192.168.8.1
-sS (TCP SYN scan) nmap -sS 192.168.8.1
-sT (TCP connect scan) nmap -sT 192.168.8.1
-sU (UDP scans) nmap -sU 192.168.8.1
-sX ( Xmas scans) nmap -sX 192.168.8.1
-sA ( TCP ACK scan) nmap -sA 192.168.8.1
-sW ( TCP Window scan ) nmap -sW 192.168.8.1
--top-ports 10 (Scans top most common ports) nmap --top-ports num 192.168.8.1
-F (Nmap fast scan with limited ports) nmap -F 192.168.8.1
-sV (Performs version detection) nmap -sV 192.168.8.1
How to select ports to scan
-p 22 or -p ssh nmap -p ssh scanme.nmap.org
-p 22,25,80 (Multiple ports may be separated with commas) nmap -p -p 22,25,80 scanme.nmap.org
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