Host Discovery With Nmap: Find Which Probe a Firewalled Host Answers
When Nmap marks a host you know is alive as down, a firewall is usually dropping its default discovery probes. Run nmap -sn --reason to see why each host was marked up, add --packet-trace to see every probe sent and every reply, then test one probe type per run: ICMP echo ( -PE), ICMP timestamp ( -PP), TCP SYN ( -PS), TCP ACK ( -PA) and UDP ( -PU), each with ports the host is likely to answer on.
Topic: Security Tools, Authorized Labs & CTFs in Cybersecurity & Ethical Hacking · Explainer
Also covers: Ethical Hacking
Quick answer: When Nmap marks a host you know is alive as down, a firewall is usually dropping its default discovery probes. Run nmap -sn --reason to see why each host was marked up, add --packet-trace to see every probe sent and every reply, then test one probe type per run: ICMP echo (-PE), ICMP timestamp (-PP), TCP SYN (-PS), TCP ACK (-PA) and UDP (-PU), each with ports the host is likely to answer on. If nothing works, -Pn skips discovery and treats every target as up. Only scan networks you own or are authorised in writing to test.
Key takeaways
- By default a privileged Nmap scan sends ICMP echo, TCP SYN to 443, TCP ACK to 80 and ICMP timestamp.
- On a local Ethernet segment Nmap uses ARP, which firewalls on the host rarely block.
--reasonand--packet-traceshow exactly which probe got an answer.- A TCP reset proves a host is alive just as well as a SYN-ACK.
- The same test tells defenders what their firewall gives away.
Table of Contents
- Why Does Nmap Report a Live Host as Down?
- Which Probes Does Nmap Send by Default?
- What Does Each Discovery Probe Test?
- How Do You Find the Probe a Host Answers?
- How Do You Read the Results?
- When Should You Use -Pn?
- What Does This Mean for Defenders?
- References
Why Does Nmap Report a Live Host as Down?
Nmap only port-scans hosts it believes are up. It decides that during host discovery by sending a few probes and waiting for any reply. If a firewall silently drops all of them, Nmap concludes the host is down and skips it. The host is fine; the probes were wrong for that network. MITRE ATT&CK lists this kind of live-host mapping as Remote System Discovery, and NIST SP 800-115 treats it as a standard step in authorised assessments.
Which Probes Does Nmap Send by Default?
According to the Nmap reference guide:
| Situation | Default discovery |
|---|---|
| Privileged user, remote IPv4 target | ICMP echo, TCP SYN to 443, TCP ACK to 80, ICMP timestamp (same as -PE -PS443 -PA80 -PP) |
| Privileged user, local Ethernet target | ARP request (IPv4) or Neighbor Discovery (IPv6) |
| Unprivileged user | TCP connect attempts to ports 80 and 443 |
What Does Each Discovery Probe Test?
| Option | Probe | Live-host evidence |
|---|---|---|
| -PE | ICMP echo request | Echo reply |
| -PP | ICMP timestamp request | Timestamp reply |
| -PM | ICMP address mask request | Address mask reply |
| -PS<ports> | TCP SYN (default port 80) | SYN-ACK or RST |
| -PA<ports> | TCP ACK (default port 80) | RST |
| -PU<ports> | UDP (default port 40125) | ICMP port unreachable or a UDP reply |
| -PO<protocols> | IP protocol ping (default ICMP, IGMP, IP-in-IP) | Any response |
ICMP message types come from RFC 792. A TCP reset to an unexpected segment is standard behaviour under RFC 9293, which is why a closed port still reveals a live host. Note there is no space between -PS and its port list.
How Do You Find the Probe a Host Answers?
Change one variable per run, against an authorised test target, so you know which probe worked:
# 1. Default discovery, with reasons and a packet log
sudo nmap -sn --reason --packet-trace 192.0.2.10
# 2. One probe type at a time
sudo nmap -sn -PE --reason 192.0.2.10
sudo nmap -sn -PP --reason 192.0.2.10
sudo nmap -sn -PS22,80,443,3389 --reason 192.0.2.10
sudo nmap -sn -PA80,443 --reason 192.0.2.10
sudo nmap -sn -PU53,161 --reason 192.0.2.10
# 3. On the same LAN, force IP probes instead of ARP
sudo nmap -sn --disable-arp-ping -PE --reason 192.0.2.10
The address 192.0.2.10 is a documentation example; replace it with a host in your approved scope. The output guide explains that --packet-trace prints every packet sent and received, so keep the target list small.
How Do You Read the Results?
- echo-reply: ICMP is allowed; ping-based discovery is fine.
- syn-ack or reset on a port: the firewall passes that TCP port, so use it in
-PSfor the whole range. - reset to
-PAonly: a stateless filter may be in place; stateful firewalls usually drop unsolicited ACKs. - port-unreach to
-PU: UDP is filtered less strictly than TCP. - arp-response: the host is on your segment; a host firewall cannot hide it from ARP.
- no-response to everything: the host may be down, or filtered completely.
The Nmap book chapter on host discovery strategies suggests combining several probe types across commonly open ports for large networks.
When Should You Use -Pn?
-Pn skips discovery and port-scans every address. It finds hosts that answer nothing but an open service port, but on a large range it is slow because Nmap scans every empty address too. Use it for small, known target lists, or after the method above has failed.
What Does This Mean for Defenders?
Run the same tests from outside your own perimeter. If a server answers ICMP timestamp or sends resets from closed ports, it confirms its presence to anyone scanning. Drop unsolicited inbound traffic, allow only required ports, and alert on bursts of discovery probes. Scanning networks without written permission can breach Sections 43 and 66 of India's IT Act 2000. Compare ICMP, ARP and TCP methods in our guide to host discovery techniques, or try the GUI route in host discovery with Zenmap. WebAsha runs ethical hacking training with practice labs.
References
Frequently Asked Questions
What's Your Reaction?
Like
0
Dislike
0
Love
0
Funny
0
Wow
0
Sad
0
Angry
0