nmap exposes a dozen-plus scan techniques, each sending a different probe and reading the response in a different way. Picking the right one decides whether you get accurate results, slip past a firewall, or get logged and blocked. This reference lists every scan flag with its protocol, privilege requirement, stealth level and the exact probe logic it uses.
How it works
A TCP SYN scan (-sS) is the workhorse: it sends a SYN, treats a SYN/ACK as
open and an RST as closed, then sends an RST so the handshake never completes —
fast and relatively quiet, but it needs root to craft raw packets. The
unprivileged connect scan (-sT) instead asks the OS to fully open each port,
which is slower and easily logged. UDP scan (-sU) is connectionless and
slow, inferring closed ports from ICMP port-unreachable replies.
The stealth family — FIN (-sF), Null (-sN), Xmas (-sX) and Maimon
(-sM) — sends packets with unusual flag combinations. RFC-compliant stacks RST a
closed port and ignore an open one, so silence means open|filtered. These evade
simple stateless firewalls but fail against Windows. ACK (-sA) and Window
(-sW) scans map firewall rules rather than open ports, and the idle scan
(-sI) bounces probes off a third-party zombie so the target never sees the real
source. Add -sV for version detection and -sC for the default NSE scripts.
Tips and notes
Combine scan types with timing and discovery options for real engagements: -sV
adds service and version detection on top of any scan, and -sC runs the default
script set. Raw-packet scans need root; without it nmap silently downgrades to
-sT. Most importantly, only scan systems you are authorized to test —
unauthorized scanning can be illegal regardless of intent.