Created
March 14, 2014 14:29
-
-
Save taylortrimble/9548811 to your computer and use it in GitHub Desktop.
A simple iptables config script, using some tutorial's best practices.
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 -A INPUT -i lo -j ACCEPT # Local loopback | |
sudo iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT # Established connections | |
sudo iptables -A INPUT -p tcp --dport 22 -j ACCEPT # SSH | |
sudo iptables -A INPUT -p tcp --dport 28600:28699 -j DROP # Block 286XX | |
sudo iptables -A INPUT -j DROP # Drop everything else |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment