以root进入Linux系统,然后编辑文件icmp_echo_ignore_all
vi /proc/sys/net/ipv4/icmp_echo_ignore_all
将其值改为1后为禁止PING
将其值改为0后为解除禁止PING
直接修改会提示错误:
WARNING: The file has been changed since reading it!!!
Do you really want to write to it (y/n)?y
"icmp_echo_ignore_all" E667: Fsync fAIled
Hit ENTER or type command to continue