Destination port unreachable.
The target rejected the packet with port unreachable
Seen in Windows ping, Linux ping (Destination Port Unreachable), traceroute
The host or a firewall replied with ICMP port unreachable, which is how many firewalls reject traffic they are told to block.
Common causes
- An iptables or nftables REJECT rule; its default reply is icmp-port-unreachable, even for ping.
- A firewall on the path rejects instead of dropping the traffic.
- With UDP traceroute, the final hop replying "port unreachable" is normal and means the trace reached the target.
How to fix it
- Check the target's firewall for a REJECT rule matching ICMP, for example `sudo iptables -S | grep REJECT` or `sudo nft list ruleset`.
- Allow ICMP echo requests if ping should work, or test the service port directly.
Got a different message? Paste it into the error explainer.
Related errors
- ECONNREFUSED · Connection refused
- ETIMEDOUT · Connection timed out
- WSAETIMEDOUT (10060) · Windows connection attempt timed out
- WSAECONNREFUSED (10061) · Windows connection refused
- ECONNRESET · Connection reset by peer
- EHOSTUNREACH · No route to host
- getaddrinfo ENOTFOUND · The hostname doesn't exist in DNS
- getaddrinfo EAI_AGAIN · Temporary DNS failure
- ENETUNREACH · Network is unreachable
- Broken pipe · Wrote to a connection or pipe that was already closed
- Software caused connection abort · Your own system aborted the connection
- Request timed out. · Ping got no reply