Created
February 16, 2017 12:43
-
-
Save garytan/df93e4aa15423bbb7fe9fc5c4c49aaca to your computer and use it in GitHub Desktop.
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
// Default | |
iptables -P INPUT DROP | |
iptables -P FORWARD DROP | |
iptables -P OUTPUT ACCEPT | |
// ACCEPT | |
iptables -A INPUT -i ens33 -s 192.168.1.0/24 -j ACCEPT | |
// STATEFUL | |
iptables -A INPUT -i ens33 -m state --state ESTABLISHED,RELATED -j ACCEPT | |
// ONLY ONE PORT | |
iptables -A INPUT -i ens33 -p tcp --dport 80 -j ACCEPT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment