Last active
December 4, 2015 02:46
-
-
Save QuentinMoss/4c1678492a8df5a9d393 to your computer and use it in GitHub Desktop.
iptables default drop policy
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
# sample configuration for iptables service | |
# you can edit this manually or use system-config-firewall | |
# please do not ask us to add additional ports/services to this default configuration | |
*filter | |
:INPUT DROP [17:1530] | |
:FORWARD ACCEPT [0:0] | |
:OUTPUT ACCEPT [133:17662] | |
-A INPUT -p tcp -m comment –comment SSH -m tcp –dport 1122 -j ACCEPT | |
-A INPUT -i lo -j ACCEPT | |
# Rule 1 allows incoming ping. Rule 2 allows all related, or established traffic back to the server. ping, dns resolv, etc | |
-A INPUT -p icmp –icmp-type echo-request -j ACCEPT | |
-A INPUT -m conntrack –ctstate RELATED,ESTABLISHED -j ACCEPT | |
COMMIT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment