Allow Incoming/Outgoing ICMP traffic in IPTables


Enable or allow ICMP ping incoming client request.

iptables -A INPUT -i eth0 -p icmp --icmp-type 8 -s-d
-m state --state NEW,ESTABLISHED,RELATED -j ACCEPT

iptables -A OUTPUT -p icmp --icmp-type 0 -s -d
-m state --state ESTABLISHED,RELATED -j ACCEPT

Allow or enable outgoing ping request.

iptables -A INPUT -i eth0 -p icmp --icmp-type 0 -s-d
-m state --state ESTABLISHED,RELATED -j ACCEPT

iptables -A OUTPUT -p icmp --icmp-type 8 -s -d
-m state --state NEW,ESTABLISHED,RELATED -j ACCEPT