Created
January 3, 2013 18:48
-
-
Save anonymous/4445900 to your computer and use it in GitHub Desktop.
iptables
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 -p tcp -m tcp --dport 80 -j ACCEPT | |
iptables -A INPUT -p tcp -m tcp --dport 443 -j ACCEPT | |
iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT | |
iptables -A INPUT -p icmp -j ACCEPT | |
iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT | |
iptables -A FORWARD -o lo -p tcp -m tcp --dport 80 -j ACCEPT | |
iptables -A FORWARD -o lo -p tcp -m tcp --dport 443 -j ACCEPT | |
iptables -A FORWARD -o eth1 -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