Skip to content

Instantly share code, notes, and snippets.

@Depicus
Last active August 29, 2015 14:12
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 Depicus/566782dd449229646f17 to your computer and use it in GitHub Desktop.
Save Depicus/566782dd449229646f17 to your computer and use it in GitHub Desktop.
iptables setup
sudo iptables -F
sudo iptables -A INPUT -i eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT
sudo iptables -A INPUT -i eth0 -p tcp --dport 80 -j ACCEPT
sudo iptables -A INPUT -i eth0 -p tcp --dport 443 -j ACCEPT
sudo iptables -A INPUT -i eth0 -j DROP
sudo apt-get install iptables-persistent -y
sudo dpkg-reconfigure iptables-persistent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment