1、Debian
可通过ufw来实现
nano /etc/ufw/before.rules
找到 -A ufw-before-input -p icmp-tyoe echo-request -j ACCEPT,将ACCEPT改成DROP即可
2、Centos7
firewall-cmd –permanent –add-rich-rule=’rule protocol value=icmp drop’
1、Debian
可通过ufw来实现
nano /etc/ufw/before.rules
找到 -A ufw-before-input -p icmp-tyoe echo-request -j ACCEPT,将ACCEPT改成DROP即可
2、Centos7
firewall-cmd –permanent –add-rich-rule=’rule protocol value=icmp drop’