Skip to content

Instantly share code, notes, and snippets.

@wynemo
Created August 20, 2012 02:45
Show Gist options
  • Select an option

  • Save wynemo/3399657 to your computer and use it in GitHub Desktop.

Select an option

Save wynemo/3399657 to your computer and use it in GitHub Desktop.
disable incoming icmp
#/etc/rc.local
iptables -A OUTPUT -p icmp -o eth0 -j ACCEPT
iptables -A INPUT -p icmp --icmp-type echo-reply -s 0/0 -i eth0 -j ACCEPT
iptables -A INPUT -p icmp --icmp-type destination-unreachable -s 0/0 -i eth0 -j ACCEPT
iptables -A INPUT -p icmp --icmp-type time-exceeded -s 0/0 -i eth0 -j ACCEPT
iptables -A INPUT -p icmp -i eth0 -j DROP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment