Not able to ping my public IP, but can SSH

Posted May 7, 2020 4.2k views
DigitalOcean Cloud FirewallsUbuntu 18.04

I have set up a droplet and firewall with specific rule. I have added the icmp rule in firewall for both inbound and outbound traffic. The outbound connections and icmp is working fine but am not able to ping my droplet even if the inbound icmp is allowed to IPv4 and IPv6. I have no trouble in resolving my domain and ssh using the domain name.

I have checked the ufw firewall and flushed ‘Iptable’ rules but still the ping result is unsatisfactory. I need to check the network latency to the droplet.

$ ping
PING ( 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2

Am able to ping the box using the private.
$ ping
PING ( 56(84) bytes of data.
64 bytes from icmp_seq=1 ttl=64 time=3.10 ms
64 bytes from icmp_seq=2 ttl=64 time=1.39 ms
64 bytes from icmp_seq=3 ttl=64 time=0.824 ms

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Hi there @nirmalnath,

I’ve just tested this with a fresh new Droplet and a fresh new Firewall and it seems to be working as expected, I was able to ping my IP with the ICMP rule in place and if I removed the ICMP rule the ping would stop.

Do you by any chance have a firewall on your Droplet as well like UFW or CSF?