Quick Overview
Ping is a well known internet tool used to check if a machine is running. Occasionally, it is desirable to block pings, either to avoid detection, or to hide from some very stupid hackers.
The Firewall Way
This is probably the more proper way. However, messing with firewalls can be a pain sometimes (I HATE iptables), and might be overkill. Instead, try…
…The Easy Way
echo "1" >> /proc/sys/net/ipv4/icmp_echo_ignore_all
To turn ping response back on,
echo "0" >> /proc/sys/net/ipv4/icmp_echo_ignore_all
Enjoy.