Home » » How to disable ping… in Linux servers

How to disable ping… in Linux servers

Written By 1 on Wednesday, April 27, 2011 | 10:20 PM


How to disable ping… in Linux servers

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

To re-enable 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

0 Comment:

Post a Comment