This is a kernel parameter that you can set with /etc/sysctl.conf by adding two lines:
# tail -n 2 /etc/sysctl.conf net.ipv4.icmp_echo_ignore_broadcasts = 1 net.ipv4.icmp_echo_ignore_all = 1 |
Apply the changes by using the sysctl -p command:
# sysctl -p . . . net.ipv4.icmp_echo_ignore_broadcasts = 1 net.ipv4.icmp_echo_ignore_all = 1 # |
There are various security reasons why you would want to do this. There are also some administration reasons why you shouldn’t do this. 🙂