服务器禁PING
方法1:
echo "net.ipv4.icmp_echo_ignore_all = 1" >> /etc/sysctl.conf sysctl -p
原文链接:https://www.cnblogs.com/kimshen/p/6007491.html
方法2:
修改/proc/sys/net/ipv4/icmp_echo_ignore_all文件数值,即时生效,0为允许ping,1为禁止ping
echo 1 > /proc/sys/net/ipv4/icmp_echo_igore_all echo 0 > /proc/sys/net/ipv4/icmp_echo_igore_all
发表评论