Block ping from the internet

August 27, 2014 4k views


I setted up an openvpn server on ubuntu.

But how can I block incoming ping (icmp) on my public ip from the internet?

Thank you

1 Answer
sudo iptables -A INPUT -p icmp --icmp-type echo-request -j DROP
sudo iptables -A OUTPUT -p icmp --icmp-type echo-reply -j DROP
Have another answer? Share your knowledge.