Created
January 22, 2016 18:22
-
-
Save awaxa/76d4956df1554f70c297 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
#!/usr/bin/env sh | |
iptables -F | |
iptables -I INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT | |
iptables -A INPUT -p tcp --tcp-flags ALL NONE -j DROP | |
iptables -A INPUT -p tcp ! --syn -m state --state NEW -j DROP | |
iptables -A INPUT -p tcp --tcp-flags ALL ALL -j DROP | |
iptables -A INPUT -i lo -j ACCEPT | |
iptables -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT | |
iptables -A INPUT -j DROP | |
iptables -P OUTPUT ACCEPT | |
iptables -P INPUT ACCEPT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment