Created
May 31, 2009 03:09
-
-
Save sr3d/120731 to your computer and use it in GitHub Desktop.
This file contains 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 lo -j ACCEPT | |
sudo iptables -A INPUT -i ! lo -d 127.0.0.0/8 -j REJECT | |
sudo iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT | |
sudo iptables -A OUTPUT -j ACCEPT | |
sudo iptables -A INPUT -p tcp --dport 80 -j ACCEPT | |
sudo iptables -A INPUT -p tcp --dport 10000 -j ACCEPT | |
sudo iptables -A INPUT -p tcp --dport 443 -j ACCEPT | |
sudo iptables -A INPUT -p tcp --dport 3333 -j ACCEPT | |
sudo iptables -A INPUT -p tcp --dport 3000 -j ACCEPT | |
sudo iptables -A INPUT -p tcp -m state --state NEW --dport 22000 -j ACCEPT | |
sudo iptables -A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT | |
sudo iptables -A INPUT -j REJECT | |
sudo iptables -A FORWARD -j REJECT | |
sudo service iptables save |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment