CH-J Server Managerserver management over SSH
Menu
All guides and articles →

Ping fails but SSH and HTTPS work: why, and is it a problem?

Why a server can ignore ping and still run normally, how to test the services directly, and when blocked ICMP causes real faults.

Why this happens

Ping uses ICMP, while SSH and HTTPS use TCP ports. These are separate traffic, and a firewall can drop one and let the other through. Many networks and cloud security groups block ICMP echo by default. A missing reply therefore does not mean that the server is down, and a reply does not prove that its services work.

Test the service, not the ping

Check the ports and protocols you really need. If these succeed, the server is reachable for those services and the failed ping only shows a filter somewhere on the path.

nc -vz -w 5 server.example 22
nc -vz -w 5 server.example 443
curl -sSI https://server.example/

Trace the path with TCP

A classic traceroute may show only asterisks when ICMP or UDP is filtered. With TCP to a port that is open, you can often get further. This needs root, and traceroute may have to be installed first, because minimal systems do not include it.

sudo traceroute -T -p 443 server.example

Look for the filter on your server

If you manage the server, look at its firewall and at the kernel setting that ignores echo requests. Remember that the block may also be outside the server, in a security group or a router, and that a provider may filter ICMP on its network without you seeing a rule.

sysctl net.ipv4.icmp_echo_ignore_all
sudo nft list ruleset | grep -i icmp
sudo ufw status verbose

When blocked ICMP does cause faults

Blocking echo is mostly harmless, but blocking all ICMP is not. Path MTU discovery relies on the messages for a packet that is too big. Without them, small exchanges work and large ones stall, for example an SSH login that succeeds and then hangs on large output. IPv6 depends on ICMPv6 even more. The second command tests a path for a 1500 byte MTU on Linux.

ip route get 192.0.2.10
ping -M do -s 1472 -c 3 192.0.2.10

Comparing them in CH-J Server Manager

Server Diagnostics runs ping through the system tool, without root, next to separate TCP, SSH identification, HTTP and TLS tests, so a failed ping can be read in context. A failed ping there means that no reply arrived. It does not say where the packet was dropped, and a traceroute may not answer that either.

Detailed documentation

RFC 4890: ICMPv6 filtering →

man: ping →

Biometric unlock and security →