Skip to content

Instantly share code, notes, and snippets.

@nigelbabu
Created June 12, 2011 09:13
Show Gist options
  • Save nigelbabu/1021368 to your computer and use it in GitHub Desktop.
Save nigelbabu/1021368 to your computer and use it in GitHub Desktop.
Iptables script
iptables -A INPUT -s 127.0.0.1 -j ACCEPT
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment