关于我们

质量为本、客户为根、勇于拼搏、务实创新

< 返回新闻公共列表

Linux(Centos)如何禁止ping

发布时间:2022/8/28 13:51:43
香港云服务器

Centos系统默认允许ping

如需禁止ping,请使用root账户登录到ssh中,并运行:

 

1.编辑/etc/sysctl.conf文件
vi /etc/sysctl.conf
2.增加下面这一行到最末尾
net.ipv4.icmp_echo_ignore_all = 1

然后保存退出,重启服务器即可