Skip to content
StratQuad

Nmap

2 min read

The network scanner's most useful options for discovery, port scanning, service detection and safe output, for authorised testing of your own networks.

At a glance

Owner
StratQuad
Version
November 2026
Applies to
Authorised network discovery and testing
Mandatory
Reference

Key points

  • Scan only networks you own or are authorised in writing to test. Scanning other people's systems can be unlawful under the Computer Misuse Act and may breach your hosting provider's terms.
  • By default Nmap scans the 1,000 most common TCP ports.
  • The default scan is a SYN scan (-sS), which needs root or administrator rights; without them Nmap uses a TCP connect scan (-sT).
  • Service and version detection (-sV) and scripts (-sC) make scans slower and noisier but far more useful.

Discovery

CommandPurpose
nmap -sn 10.0.0.0/24Host discovery only, no port scan
nmap -Pn 10.0.0.5Skip discovery; treat host as up (for hosts that block ping)
nmap -sL 10.0.0.0/24List targets and reverse DNS without sending probes to them

Port scanning

CommandPurpose
nmap 10.0.0.5Default: top 1,000 TCP ports
nmap -p 22,80,443 10.0.0.5Specific ports
nmap -p- 10.0.0.5All 65,535 TCP ports
nmap --top-ports 100 10.0.0.5Most common 100 ports
nmap -sS 10.0.0.5SYN (half open) scan, needs privileges
nmap -sT 10.0.0.5Full TCP connect scan
nmap -sU --top-ports 20 10.0.0.5UDP scan of common ports (slow)

Service and OS detection

CommandPurpose
nmap -sV 10.0.0.5Service and version detection
nmap -sC 10.0.0.5Run the default script category (some are intrusive)
nmap -O 10.0.0.5Operating system detection
nmap -A 10.0.0.5-sV, -sC, -O and traceroute together
nmap --script ssl-enum-ciphers -p 443 hostTLS versions and ciphers
nmap --script vuln 10.0.0.5Vulnerability scripts (intrusive; check before use)

Timing and output

CommandPurpose
-T3 (default), -T4Timing templates; -T4 is faster and suitable for reliable networks
--max-rate 100Cap packets per second to avoid disrupting fragile devices
-oA scannameSave normal, XML and grepable output together
-oX scan.xmlXML output for import into other tools
--reasonShow why each port state was decided

Practitioner note

On operational technology, medical devices and older network equipment, scanning can crash services. Agree a low rate (--max-rate) and a testing window with the system owner, and exclude fragile ranges explicitly with --exclude. Keep the -oA output as evidence of exactly what was scanned and when.

Sources

Suggest a correction