You can setup kernel variable to drop all ping packets. Type the following command at shell prompt:
[root@afzalkhan ~]#echo “1” > /proc/sys/net/ipv4/icmp_echo_ignore_all
This instructs the kernel to simply ignore all ping requests (ICMP type 0 messages).
[root@afzalkhan ~]#echo “0” > /proc/sys/net/ipv4/icmp_echo_ignore_all
This instructs the kernel to allow all ping requests from remote.
You can add following line to /etc/sysctl.conf file to make this changes permanently.
[root@afzalkhan ~]#vi /etc/sysctl.conf
net.ipv4.icmp_echo_ignore_all = 1