Last active
August 29, 2015 14:12
-
-
Save Depicus/566782dd449229646f17 to your computer and use it in GitHub Desktop.
iptables setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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