#1098367 nmap reports pingable IPv6 host as down

Package:
nmap
Source:
nmap
Description:
The Network Mapper
Submitter:
Lee Garrett
Date:
2025-02-19 18:03:01 UTC
Severity:
normal
#1098367#5
Date:
2025-02-19 16:06:38 UTC
From:
To:
Hello,

$ ping -c 3 2a01:4f8:231:161c::1
PING 2a01:4f8:231:161c::1 (2a01:4f8:231:161c::1) 56 data bytes
64 bytes from 2a01:4f8:231:161c::1: icmp_seq=1 ttl=58 time=21.4 ms
64 bytes from 2a01:4f8:231:161c::1: icmp_seq=2 ttl=58 time=20.9 ms
64 bytes from 2a01:4f8:231:161c::1: icmp_seq=3 ttl=58 time=20.9 ms
I'd expect nmap to show the host as up since I can ping that address. Using -Pn
scan the host and shows the open ports correctly.

Greets,
Lee

#1098367#10
Date:
2025-02-19 17:59:23 UTC
From:
To:
* Lee Garrett:

Curious, this does not happen here™ for other hosts, but for the address
you tried.

Using tcpdump, I don't even see anything resembling "ping probes", but
failing attempts to 80/tcp, 443/tcp:
,----
| $ sudo tcpdump -ni enp9s0 ip6 host 2a01:4f8:231:161c::1
| tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
| listening on enp9s0, link-type EN10MB (Ethernet), snapshot length 262144 bytes
| 18:46:07.083120 IP6 <MY-ADDRESS>.47374 > 2a01:4f8:231:161c::1.80: Flags [S], seq 1605758339, win 64440, options [mss 1432,sackOK,TS val 1103345539 ecr 0,nop,wscale 7], length 0
| 18:46:07.087845 IP6 <MY-ADDRESS>.41286 > 2a01:4f8:231:161c::1.443: Flags [S], seq 3130674863, win 64440, options [mss 1432,sackOK,TS val 1103345539 ecr 0,nop,wscale 7], length 0
| 18:46:07.100433 IP6 2a01:4f8:231:161c::1 > <MY-ADDRESS>: ICMP6, destination unreachable,  unreachable prohibited 2a01:4f8:231:161c::1, length 88
| 18:46:07.105415 IP6 2a01:4f8:231:161c::1 > <MY-ADDRESS>: ICMP6, destination unreachable,  unreachable prohibited 2a01:4f8:231:161c::1, length 88
`----

Apparently ICMP messages are only generated if nmap is run as root and
those TCP connection attempts serve as a backup.

Cheers,
-Hilko