时间:2021-10-27 作者:冰城心无泪 分类: Linux基础
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all
echo net.ipv4.icmp_echo_ignore_all=1 >> /etc/sysctl.conf && sysctl -p
firewall-cmd --permanent --add-rich-rule='rule protocol value=icmp drop'
firewall-cmd --complete-reload 或者 systemctl restart firewalld
firewall-cmd --permanent --remove-rich-rule='rule protocol value=icmp drop'
firewall-cmd --reload
iptables -A INPUT -p icmp --icmp-type 8 -s 0/0 -j DROP
service iptables save
service iptables restart
iptables -D INPUT -p icmp --icmp-type 8 -s 0/0 -j DROP
service iptables save
service iptables restart