Block/Drop ICMP Messages


Can this be done from FreePBX? Searches have resulted primarily of the below solutions but none work for me.

Asterisk 13.12.1

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

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

You can add following line to /etc/sysctl.conf file:

vi /etc/sysctl.conf

Append following line:
net.ipv4.icmp_echo_ignore_all = 1

You could also block it with iptables rule.

1 Like

I have tried with iptables rule also but box still replies to pings. Could you post the correct syntax for me please?

Take a look at this link as a starting point. Consider that this will only work if you are running iptables on your server, otherwise it will not do anything.

1 Like

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