DISABLE PING RESPONSE IN LINUX

Disable The Ping Response On Linux?
Sometimes you may want to disable ping response for many reasons, may be for a security reason… This article explains how do I disable the ping response on Linux ?

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

SOMETIMES: YOU CAN USE THIS BELOW REMOVE THE .CONF.
net.ipv4.icmp_echo_ignore_all = 1

Execute sysctl -p to enforce this setting immediately
# sysctl -p

source: http://daddy-linux.blogspot.com/2012/02/disable-ping-response-on-linux.html

Advertisements
This entry was posted in LINUX. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s