Skip to content

Instantly share code, notes, and snippets.

@LevonBecker
Created August 19, 2015 22:26
Show Gist options
  • Save LevonBecker/b4c5ba657d5c8d3b6103 to your computer and use it in GitHub Desktop.
Save LevonBecker/b4c5ba657d5c8d3b6103 to your computer and use it in GitHub Desktop.
base_iptables_rules
# Default Chain Rules
-P INPUT DROP
-P OUTPUT ACCEPT
-P FORWARD ACCEPT
# Allow Loopback
-A INPUT -i lo -j ACCEPT
# Allow All Established and Related Conntections
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
# Allow Ping
-A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT
# Allow SSH
-A INPUT -p tcp -m tcp --dport 22 -m state --state NEW,ESTABLISHED -j ACCEPT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment