How to disable ping?

I want to disable ping response all the time
the following commands work not work

echo “1” > /proc/sys/net/ipv4/icmp_echo_ignore_all

sudo sysctl -a | grep "net.ipv[4,6].icmp.echo_ignore_all"
sudo sysctl -w net.ipv4.icmp_echo_ignore_all=1
sudo sysctl -w net.ipv6.icmp_echo_ignore_all=1
echo "net.ipv4.icmp_echo_ignore_all = 1" | sudo tee -a /etc/sysctl.d/99-ignore_echo_all.conf
echo "net.ipv6.icmp_echo_ignore_all = 1" | sudo tee -a /etc/sysctl.d/99-ignore_echo_all.conf
1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.