Nmap Scan Types Explained: SYN, Connect, UDP, ACK, FIN, Xmas and Idle Scans

Cyber Security3 min read
Nmap scan types compared: SYN, connect, ACK, UDP and more
On this page

Nmap can scan ports in many different ways. Each scan type sends a different kind of packet and interprets the reply differently, which changes speed, stealth, accuracy and what you learn about firewalls. Knowing which to use is the difference between a noisy, misleading scan and a clean picture of the target.

Only scan networks you own or have written permission to test.

Port states

StateMeaning
openAn application is accepting connections
closedReachable, but nothing is listening
filteredA firewall or filter blocked the probe; Nmap cannot tell
unfilteredReachable, but open or closed is unknown (ACK scan)
open/filteredOpen or filtered; common with UDP, FIN, NULL and Xmas scans

The main scan types

OptionScanHow it worksUse it for
-sSSYN (half-open)Sends SYN; SYN/ACK means open, RST means closed; never completes the handshakeDefault fast scan when running as root
-sTTCP connectCompletes the full handshake using the operating systemWhen you do not have raw packet privileges
-sUUDPSends UDP probes; ICMP port unreachable means closedDNS, SNMP, DHCP, NTP and other UDP services
-sAACKSends ACK packets; RST means unfilteredMapping firewall rules, not finding open ports
-sF / -sN / -sXFIN, NULL, XmasOdd flag combinations; no reply suggests open or filteredProbing some firewalls; unreliable against Windows
-sIIdle (zombie)Uses another host’s IP ID sequence to scan without sending packets from your IPAdvanced, stealthy research
-sVVersion detectionTalks to open ports to identify the service and versionAfter finding open ports
-OOS detectionTCP/IP fingerprinting, see Nmap OS detectionIdentifying the operating system

Practical examples

sudo nmap -sS -p- 10.0.0.20                 all TCP ports with a SYN scan
nmap -sT -p 22,80,443 10.0.0.20             connect scan without root
sudo nmap -sU --top-ports 50 10.0.0.20      the 50 most common UDP ports
sudo nmap -sA -p 1-1000 10.0.0.20           check which ports a firewall filters
sudo nmap -sS -sV -O -T4 10.0.0.0/24        a common discovery scan

Choosing the right scan

  1. Start with -sS (or -sT without root) on the ports that matter, or all ports with -p-.
  2. Add -sV on open ports to identify services.
  3. Do not forget UDP (-sU): important services hide there, but it is slow, so limit the port list.
  4. Use -sA when results look filtered, to understand the firewall.
  5. Tune timing with -T3 or -T4 on reliable networks; slower templates for fragile or monitored networks.

Frequently asked questions

What is the difference between a SYN scan and a connect scan?

A SYN scan never completes the TCP handshake and needs raw packet privileges; a connect scan uses the operating system to complete the handshake, so it works without root but is easier to log.

Why is UDP scanning slow?

Open UDP ports often do not reply, and many systems rate-limit ICMP error messages, so Nmap must wait and retry.

What does filtered mean in Nmap?

A firewall or filter dropped the probe, so Nmap cannot tell whether the port is open or closed.

Is port scanning illegal?

Scanning your own systems or with permission is legal. Unauthorised scanning can break laws or terms of service in many countries.

What is an ACK scan used for?

To map firewall rules: it shows whether ports are filtered or unfiltered, not whether they are open.

Master Nmap

Our Advanced Nmap Scanning and Network Reconnaissance course covers every scan type, timing, NSE scripts and evasion with hands-on labs.

Written by

Taifun Mamedov

Founder and instructor at Ocsaly Academy.

Courses by Taifun Mamedov

Share this article