Skip to content

Instantly share code, notes, and snippets.

@notxarb
Forked from anonymous/gist:4445900
Last active December 10, 2015 14:09
Show Gist options
  • Save notxarb/4445912 to your computer and use it in GitHub Desktop.
Save notxarb/4445912 to your computer and use it in GitHub Desktop.
iptables
iptables -P INPUT ACCEPT
iptables -F INPUT
iptables -F FORWARD
iptables -F OUTPUT
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -i eth0 -j ACCEPT
iptables -A INPUT -s 24.116.177.208/29 -i eth1 -p tcp -m tcp --dport 22 -j ACCEPT
iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A INPUT -p icmp -j ACCEPT
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT
ip6tables -P INPUT ACCEPT
ip6tables -F INPUT
ip6tables -F FORWARD
ip6tables -F OUTPUT
ip6tables -A INPUT -p icmp -j ACCEPT
ip6tables -A INPUT -i lo -j ACCEPT
ip6tables -A INPUT -i eth0 -j ACCEPT
ip6tables -P INPUT DROP
ip6tables -P FORWARD DROP
ip6tables -P OUTPUT ACCEPT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment