Port scanning and network mapping with Nmap: scope, options, and reading results
How to map hosts and services on networks you are authorized to test: discovery, TCP connect and SYN scans, version detection, and reading open, closed, and filtered states. Plus how scans look to defenders.
Diagram
A scoped scan of a lab subnet
Step 1 of 4
Scope
Write down the ranges and times you are allowed to scan.
scope: 10.10.0.0/24 (lab) window: 2026-11-03 10:00-12:00 contact: lab-admin
The example on the open step is one illustration, or the fix you can paste into an application you own.
What this page is made of
3 pieces. Each one says what fails, who is affected, what you would notice, and what you change.
Port states
- What fails
- open answers, closed sends RST, filtered gets no reply or an ICMP error.
- Who is affected
- Teams interpreting scan output.
- What you would notice
- Filtered ports that should be closed, or open ports nobody owns.
- What you change
- Compare against an expected service list per host.
Scan types
- What fails
- -sT completes the handshake, -sS sends SYN only and needs root, -sU scans UDP slowly.
- Who is affected
- Testers choosing options.
- What you would notice
- UDP never scanned, so SNMP and DNS exposure is missed.
- What you change
- Include a targeted UDP scan of common ports.
Change over time
- What fails
- A single scan is a snapshot.
- Who is affected
- Owners of new services.
- What you would notice
- New open ports between monthly scans.
- What you change
- Save XML output and diff it with ndiff.
What defenders see
Firewalls log many connection attempts from one source across ports; IDS rules such as Suricata’s scan detections fire on SYN patterns. A known scanner IP and a change ticket make authorized scans easy to separate from real reconnaissance.
Faster and newer tools
For large owned ranges, masscan and naabu find open ports quickly, then Nmap does version detection on what they found. The Nmap and httpx lessons in the tool library go deeper into options.
Check yourself
Recognition and the fix. Nothing here is a procedure.
A port shows filtered. What does that usually mean?
Sibling techniques
Pages at the same depth, plus a lab and a glossary card for this one.