Port scan for port x
-p
nmap 192.168.1.1 -p 21
Port range
-p
nmap 192.168.1.1 -p 21-100
Port scan multiple TCP and UDP ports
-p
nmap 192.168.1.1 -p U:53,T:21-25,80
Port scan all ports
-p-
nmap 192.168.1.1 -p-
Port scan from service name
-p
nmap 192.168.1.1 -p http,https
Fast port scan (100 ports)
-F
nmap 192.168.1.1 -F
Port scan the top x ports
–top-ports
nmap 192.168.1.1 –top-ports 2000
Leaving off initial port in range
makes the scan start at port 1
-p-65535
nmap 192.168.1.1 -p-65535
Leaving off end port in range
makes the scan go through to port 65535
-p0-
nmap 192.168.1.1 -p0-