Last active
October 11, 2015 07:57
-
-
Save Chavao/3827080 to your computer and use it in GitHub Desktop.
iptables
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
iptables -F | |
iptables -X | |
iptables -N block | |
iptables -A block -m state --state ESTABLISHED,RELATED -j ACCEPT | |
iptables -A block -m state --state NEW ! -i eth0 -j ACCEPT | |
iptables -A block -p tcp --destination-port 80 -j ACCEPT | |
iptables -A block -p tcp --destination-port 8080 -j ACCEPT | |
iptables -A block -p tcp --destination-port 22 -j ACCEPT | |
iptables -A block -j DROP | |
iptables -A INPUT -j block | |
iptables -A FORWARD -j block |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment