20 08 2010

Linux 服务器禁止ping

bigCat Posted in Linux - Comment.isBlank

禁\r\n

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

\r\n开\r\n

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

\r\n\r\n如果要重启后继续,则在/etc/sysctl.conf 文件中添加下面一行即可\r\n

net.ipv4.icmp_echo_ignore_all = 1

Host: (miao) | Word: Press | Code: HTML5