Shashikant shah

Friday, 31 August 2012

How to disable ping… in Linux servers


                           Disable to Ping

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

Or add the line
net.ipv4.conf.icmp_echo_ignore_all = 1 in /etc/sysclt.conf

                          Enable to ping

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

Or add the line
net.ipv4.conf.icmp_echo_ignore_all = 0 in /etc/sysclt.conf

Alternatively, we can use IPtables to disable ping
# iptables -A INPUT -p icmp -j DROP

No comments:

Post a Comment