Created
July 28, 2016 18:54
-
-
Save chr33s/fab7ce71d2bf4a9bf4daadb37dc13cc0 to your computer and use it in GitHub Desktop.
firewall
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
| #!/bin/bash | |
| # /etc/network/if-pre-up.d/iptables | |
| iptables-restore < /etc/iptables/rules.v4 | |
| ip6tables-restore < /etc/iptables/rules.v6 |
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
| *filter | |
| -A INPUT -m conntrack --ctstate INVALID -j DROP | |
| -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT | |
| -A INPUT -i lo -j ACCEPT | |
| -A INPUT -p tcp -m multiport --dports 80 -j ACCEPT | |
| -A INPUT -j DROP | |
| -A FORWARD -j DROP | |
| -A OUTPUT -j ACCEPT | |
| COMMIT |
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
| *filter | |
| -A INPUT -j DROP | |
| -A OUTPUT -j DROP | |
| -A FORWARD -j DROP | |
| COMMIT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment