Created
June 6, 2014 22:08
-
-
Save ezynda3/d45f293c5a023d6535b4 to your computer and use it in GitHub Desktop.
Webserver Iptables Rules
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
# Generated by iptables-save v1.4.12 on Mon Jan 13 21:10:32 2014 | |
-F | |
*filter | |
:INPUT DROP [1:40] | |
:FORWARD DROP [0:0] | |
:OUTPUT ACCEPT [16:3248] | |
-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT | |
-A INPUT -i lo -j ACCEPT | |
-A INPUT -i docker0 -j ACCEPT | |
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT | |
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT | |
-A INPUT -p tcp -m tcp --dport 443 -j ACCEPT | |
-A FORWARD -i docker0 -o docker0 -j ACCEPT | |
-A FORWARD -i docker0 ! -o docker0 -j ACCEPT | |
-A FORWARD -o docker0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT | |
COMMIT | |
# Completed on Mon Jan 13 21:10:32 2014 | |
# Generated by iptables-save v1.4.12 on Mon Jan 13 21:10:32 2014 | |
*nat | |
:PREROUTING ACCEPT [5:200] | |
:INPUT ACCEPT [0:0] | |
:OUTPUT ACCEPT [0:0] | |
:POSTROUTING ACCEPT [0:0] | |
:DOCKER - [0:0] | |
-A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER | |
-A OUTPUT ! -d 127.0.0.0/8 -m addrtype --dst-type LOCAL -j DOCKER | |
-A POSTROUTING -s 10.0.3.0/24 ! -d 10.0.3.0/24 -j MASQUERADE | |
-A POSTROUTING -s 172.17.0.0/16 ! -d 172.17.0.0/16 -j MASQUERADE | |
COMMIT | |
# Completed on Mon Jan 13 21:10:32 2014 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment