For security resones we can disable ping response of our linux server, means other servers can not ping our server and our server can not be detectable for bots or scaning tools.

 

Disable ping response Temporarily

To disable the PING response, login as root and type the following command

# echo 1 >/proc/sys/net/ipv4/icmp_echo_ignore_all


To reenable the PING response do this:

# echo 0 >/proc/sys/net/ipv4/icmp_echo_ignore_all

 

Disable ping response Permanently

Edit the /etc/sysctl.conf file and add the following line

 

net.ipv4.conf.icmp_echo_ignore_all = 1


Execute sysctl -p to enforce this setting immediately

# sysctl -p
 
Disable ping response