diff options
author | Seth Vidal <skvidal@fedoraproject.org> | 2013-05-15 21:39:29 +0000 |
---|---|---|
committer | Seth Vidal <skvidal@fedoraproject.org> | 2013-05-15 21:39:29 +0000 |
commit | c25ebc632c0916a8f79cff42737d95ad1f58f7ce (patch) | |
tree | 02a757ad522467c7a337407f2288aa5fde2e03bb | |
parent | c791133923444d18d7f7968bcdbeec552301258a (diff) | |
download | ansible-c25ebc632c0916a8f79cff42737d95ad1f58f7ce.tar.gz ansible-c25ebc632c0916a8f79cff42737d95ad1f58f7ce.tar.xz ansible-c25ebc632c0916a8f79cff42737d95ad1f58f7ce.zip |
add simple default iptables
-rw-r--r-- | files/iptables/iptables | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/files/iptables/iptables b/files/iptables/iptables new file mode 100644 index 000000000..85f56c1a2 --- /dev/null +++ b/files/iptables/iptables @@ -0,0 +1,15 @@ +# Simple static firewall loaded by iptables.service. Replace +# this with your own custom rules, run lokkit, or switch to +# shorewall or firewalld as your needs dictate. +*filter +:INPUT ACCEPT [0:0] +:FORWARD ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +-A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT +-A INPUT -p icmp -j ACCEPT +-A INPUT -i lo -j ACCEPT +-A INPUT -m conntrack --ctstate NEW -m tcp -p tcp --dport 22 -j ACCEPT +-A INPUT -m conntrack --ctstate NEW -m tcp -p tcp --dport 80 -j ACCEPT +-A INPUT -j REJECT --reject-with icmp-host-prohibited +-A FORWARD -j REJECT --reject-with icmp-host-prohibited +COMMIT |