ufw设置主机禁ping
修改ufw文件
-A ufw-before-input -p icmp --icmp-type echo-request -j (ACCEPT->DROP) #ipv4
-A ufw6-before-input -p icmpv6 --icmpv6-type echo-request -j (ACCEPT->DROP) #ipv6
修改ufw文件
-A ufw-before-input -p icmp --icmp-type echo-request -j (ACCEPT->DROP) #ipv4
-A ufw6-before-input -p icmpv6 --icmpv6-type echo-request -j (ACCEPT->DROP) #ipv6