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.

Apr 09, 2025 - 11:15
Updated: 
105.8k

Security Tools, Authorized Labs & CTFs in Cybersecurity & Ethical Hacking · Explainer

Ethical Hacking

Host Discovery With Nmap: Find Which Probe a Firewalled Host Answers

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.
  • --reason and --packet-trace show 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?

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:

SituationDefault discovery
Privileged user, remote IPv4 targetICMP echo, TCP SYN to 443, TCP ACK to 80, ICMP timestamp (same as -PE -PS443 -PA80 -PP)
Privileged user, local Ethernet targetARP request (IPv4) or Neighbor Discovery (IPv6)
Unprivileged userTCP connect attempts to ports 80 and 443

What Does Each Discovery Probe Test?

OptionProbeLive-host evidence
-PEICMP echo requestEcho reply
-PPICMP timestamp requestTimestamp reply
-PMICMP address mask requestAddress 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 -PS for the whole range.
  • reset to -PA only: 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

It runs host discovery only and skips the port scan, listing which targets responded. It was previously called -sP in older Nmap versions.

A privileged scan sends ICMP echo, TCP SYN to port 443, TCP ACK to port 80 and ICMP timestamp, or ARP on a local Ethernet network.

It shows why each host was marked up or down and why each port has its state, such as an echo reply or a TCP reset.

A reset to a probe on a closed port normally comes from a live host, so it shows something is at that address, though some firewalls send resets too.

The Nmap reference guide gives 40125 as the default UDP ping port, chosen because it is unlikely to be open and should trigger port unreachable.

Rarely. Hosts must answer ARP to communicate on a local network, so ARP discovery usually finds them even when ICMP is blocked.

Use -Pn for small target lists when hosts drop every discovery probe, accepting that it is slow because every address is fully scanned.

Only on networks you own or have written permission to test. Unauthorised scanning can breach Sections 43 and 66 of the IT Act 2000.

What's Your Reaction?

Like Like 0
Dislike Dislike 0
Love Love 0
Funny Funny 0
Wow Wow 0
Sad Sad 0
Angry Angry 0
Vaishnavi

Vaishnavi is a skilled tech professional at the Ethical Hacking Training Institute in Pune, responsible for managing and optimizing the technical infrastructure that supports advanced cybersecurity education. With deep expertise in network security, backend operations, and system performance, she ensures that practical labs, online modules, and assessments run smoothly and securely. Her behind-the-scenes contributions play a vital role in delivering a seamless and secure learning experience for aspiring ethical hackers.