本文共 802 字,大约阅读时间需要 2 分钟。
Linux服务器安全防护
禁止ping centos服务器 ip地址
两条命令搞定,主要是下面第一条
echo 'net.ipv4.icmp_echo_ignore_all = 1' >>/etc/sysctl.conf
sysctl -p
[root@localhost ~]# cat /etc/sysctl.confnet.ipv6.conf.all.disable_ipv6=0net.ipv6.conf.default.disable_ipv6=0net.ipv6.conf.lo.disable_ipv6=0kernel.printk = 5[root@localhost ~]# [root@localhost ~]# echo 'net.ipv4.icmp_echo_ignore_all = 1' >>/etc/sysctl.conf[root@localhost ~]# [root@localhost ~]# sysctl -pnet.ipv6.conf.all.disable_ipv6 = 0net.ipv6.conf.default.disable_ipv6 = 0net.ipv6.conf.lo.disable_ipv6 = 0kernel.printk = 5net.ipv4.icmp_echo_ignore_all = 1[root@localhost ~]#[root@localhost ~]# cat sysctl.confnet.ipv6.conf.all.disable_ipv6=0net.ipv6.conf.default.disable_ipv6=0net.ipv6.conf.lo.disable_ipv6=0kernel.printk = 5net.ipv4.icmp_echo_ignore_all = 1[root@localhost ~]#
转载地址:http://qsry.baihongyu.com/