Skip to content

Instantly share code, notes, and snippets.

@lukecampbell
Created September 27, 2012 14:38
Show Gist options
  • Save lukecampbell/3794355 to your computer and use it in GitHub Desktop.
Save lukecampbell/3794355 to your computer and use it in GitHub Desktop.
iptables-save
# Generated by iptables-save v1.4.7 on Thu Sep 27 14:26:55 2012
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [400786:573921566]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -p udp -m state --state NEW -m udp -s 192.168.1.0/24 --dport 5432 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp -s 192.168.1.0/24 --dport 5432 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
# Completed on Thu Sep 27 14:26:55 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment