Skip to content

Instantly share code, notes, and snippets.

@BillKeenan
Created January 30, 2014 19:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BillKeenan/8717417 to your computer and use it in GitHub Desktop.
Save BillKeenan/8717417 to your computer and use it in GitHub Desktop.
iptable lockdown
# Generated by iptables-save v1.4.12 on Thu Jan 30 18:36:16 2014
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [7385395:3804992500]
-A INPUT -i lo -j ACCEPT
-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -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 INPUT -j DROP
COMMIT
# Completed on Thu Jan 30 18:36:16 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment