Example iptables -A INPUT -s 127.0.0.1 -p icmp --icmp-type 8 -j DROP What this does: -A Append to INPUT -s source address 127.0.0.1 -p icmp protocol --icmp-type 8 (ping) -j DROP So, drop all pings from 127.0.0.1