Print Logo

Disable Ping (ICMP) Responses With Linux




<<  <   >  >>

This is a kernel parameter that you can set with /etc/sysctl.conf by adding two lines:

# tail -n 2 /etc/sysctl.conf
net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.icmp_echo_ignore_all = 1

Apply the changes by using the sysctl -p command:

# sysctl -p
.
.
.
net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.icmp_echo_ignore_all = 1
#

There are various security reasons why you would want to do this. There are also some administration reasons why you shouldn't do this. :)



This article comes from NetAdminTools:
http://www.netadmintools.com/

The URL for this story is:
http://www.netadmintools.com/art427.html

Copyright 1997-2009 NetAdminTools.com. Read our Terms of Use.