永久允许或禁止ping,修改配置文件/etc/sysctl.conf 命令: net.ipv4.icmp_echo_ignore_all=1 1代表禁止,0代表允许 修改完成后保存退出 执行 sysctl -p 使新配置生效