Skip to content

/errors/nmap/host-seems-down-try-pn

nmap: Note: Host seems down. If it is really up, but blocking our ping probes, try -Pn

The commands on this page have not been executed by our verification runner yet.updated
tool
Nmap
exit code
0
versions
Nmap 7.x
os
linux, macos, windows

Note: Host seems down. If it is really up, but blocking our ping probes, try -Pn means Nmap's host discovery phase got no answer, so it skipped the port scan. Host discovery sends ICMP echo and a few TCP probes; many hosts and firewalls drop all of them. If you know the host is up, run the scan with -Pn, which treats the host as online and goes straight to port scanning: nmap -Pn -p 22,80,443 HOST. Nmap still exits with status 0, as the run itself succeeded.

What it looks like

text
Note: Host seems down. If it is really up, but blocking our ping probes, try -Pn
Nmap done: 1 IP address (0 hosts up) scanned in N seconds

Fixes

bash
nmap -Pn HOST                        # skip discovery, scan the top 1000 ports
nmap -Pn -p 22,443 HOST              # only the ports you care about (much faster with -Pn)
sudo nmap HOST                       # root: ICMP, timestamp, SYN to 443 and ACK to 80 as discovery
sudo nmap -PS22,443 -PA80 HOST       # custom discovery probes the firewall allows
nmap -Pn --reason -p 22 HOST         # show why each port got its state

With -Pn and many targets, scans take longer: every address is scanned even if nothing lives there. On a local network, sudo nmap -sn 192.168.1.0/24 uses ARP, which firewalls on the hosts cannot block.

Which discovery probes are used

SituationDefault discovery probes
Root, target on the local Ethernet networkARP requests (and IPv6 neighbor discovery)
Root, remote targetICMP echo, TCP SYN to 443, TCP ACK to 80, ICMP timestamp
Unprivileged userTCP connect() to ports 80 and 443
-PnNone: every target is treated as up

Sources