Arun’s Weblog

Feel power of linux Ubuntu

Posts Tagged ‘ping’

Disable or drop all ping packats all together

Posted by arun161087 on September 4, 2008

Generally you can use iptables to block or allow ping requests.

You can setup kernel variable to drop all ping packets. Type the following command at shell prompt:
# echo “1″ > /proc/sys/net/ipv4/icmp_echo_ignore_all

This instructs the kernel to simply ignore all ping requests (ICMP type 0 messages). To enable ping request type the command:
#echo “0″ > /proc/sys/net/ipv4/icmp_echo_ignore_all

You can add following line to /etc/sysctl.conf file:
# vi /etc/sysctl.conf
Append following line:
net.ipv4.icmp_echo_ignore_all = 1

Save and close the file.

Posted in Linux(others), Troubleshoot | Tagged: | Leave a Comment »