Cheatsheet - Nmap Network Scanner
Nmap is the world’s leading port security network scanner. The Nmap hosted security tool can help you determine how well your firewall and security configuration is working.
This guide will show you how to use Nmap to scan all open ports. This cheatsheet applies to Windows, MacOS and Linux
Click here to download the latest version of Nmap.
Single Port
Scan port 443 on the target system by DNS name:
nmap -p 443 google.com
or based on IP:
nmap -p 443 8.8.8.8
Multiple Ports
Scan ports 1 through 2048 on the target system:
nmap -p 1-2048 google.com
Scan (Fast) the most common ports:
nmap -F google.com
Scan all Ports
To scan all ports (1 - 65535):
nmap -p- google.com
Advanced Port Scans
To scan using TCP connect (it takes longer, but is more likely to connect):
nmap -sT google.com
To perform the SYN scan (testing only half of the TCP handshake):
nmap -sS google.com
Instruct Nmap to scan UDP ports instead of TCP ports, -p specifies the port:
nmap -sU -p 5060 google.com