方法在 /etc/sysctl.conf 文件中增加一行net.ipv4.icmp_echo_ignore_all=11 表示禁止ping0 标识开启ping修改后执行sysctl -p生效参考https://www.jianshu.com/p/53d198dea78a