nmap Command Examples

Network exploration tool and security/port scanner. Some features (e.g. SYN scan) activate only when nmap is run with root privileges. More information: https://nmap.org/book/man.html.

nmap -v{{1|2|3}} {{ip_or_hostname}}

nmap -T5 -sn {{192.168.0.0/24|ip_or_hostname1,ip_or_hostname2,...}}

sudo nmap -A -iL {{path/to/file.txt}}

nmap -p {{port1,port2,...}} {{ip_or_host1,ip_or_host2,...}}

nmap -sC -sV -oA {{top-1000-ports}} {{ip_or_host1,ip_or_host2,...}}

nmap --script "default and safe" {{ip_or_host1,ip_or_host2,...}}

nmap --script "http-*" {{ip_or_host1,ip_or_host2,...}} -p 80,443

sudo nmap -T0 -D {{decoy_ip1,decoy_ip2,...}} --source-port {{53}} -f --data-length {{16}} -Pn {{ip_or_host}}