Created
February 21, 2018 10:10
-
-
Save fnzv/36a9bcb2e8203212a1a8761d3cc9b3cb to your computer and use it in GitHub Desktop.
clean-fw-ipt
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
*filter | |
-A INPUT -i lo -j ACCEPT | |
-A INPUT ! -i lo -d 127.0.0.0/8 -j REJECT | |
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT | |
-A OUTPUT -j ACCEPT | |
-A INPUT -p tcp --dport 80 -j ACCEPT | |
-A INPUT -p tcp --dport 443 -j ACCEPT | |
-A INPUT -p tcp -m state --state NEW --dport 22 -j ACCEPT | |
-A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT | |
-A INPUT -m limit --limit 5/min -j LOG --log-prefix "iptables denied: " --log-level 7 | |
-A INPUT -j REJECT | |
-A FORWARD -j REJECT | |
COMMIT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment