How to check if ICMP blocking is enabled in a system..?

Solution 1:

To check whether ICMP is enabled or disabled run the command:

cat /proc/sys/net/ipv4/icmp_echo_ignore_all

The output is 0 or 1:

  • 0 means that ICMP is enabled
  • 1 means that ICMP is disabled

If it's disabled and you want to enable it:

  • change 1 to 0 in the above file
  • Or run the command:

    iptables  -I  INPUT  -i  ech0  -p   icmp  -s  0/0  -d  0/0   -j  ACCEPT