Created
September 24, 2017 05:24
-
-
Save 0x9090/57bbebd350cce6dcc51253b28894708d to your computer and use it in GitHub Desktop.
iptables example
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
iptables -P INPUT ACCEPT | |
iptables -F | |
iptables -A INPUT -i lo -j ACCEPT | |
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT | |
iptables -A INPUT -p tcp --dport 22 -j ACCEPT | |
iptables -P INPUT DROP | |
iptables -P FORWARD DROP | |
iptables -P OUTPUT ACCEPT | |
iptables -L -v |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment