linux禁用icmp(ping )
永久禁用:
echo net.ipv4.icmp_echo_ignore_all=1 >>/etc/sysctl.conf
永久启用:
echo net.ipv4.icmp_echo_ignore_all=0 >>/etc/sysctl.conf
临时禁用:
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all
临时启用:
echo 0 > /proc/sys/net/ipv4/icmp_echo_ignore_all
2019-11-19