-
-
Save anonymous/9268ef1dcd5875c025be to your computer and use it in GitHub Desktop.
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
# Dropping incoming connections that don't have explecit rules bellow | |
:INPUT DROP [68:4456] | |
:FORWARD ACCEPT [0:0] | |
:OUTPUT ACCEPT [1628:151823] | |
# Allow established connections for both public and private connections | |
-A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT | |
-A INPUT -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT | |
# Opening ports wide open for FTP(21), SSH/SFTP(22), SMTP(25), HTTP(80), POP3(110), IMAP(143), HTTPS(443), and MySQL(3306), | |
-A INPUT -p tcp -m tcp --dport 21 -j ACCEPT | |
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT | |
-A INPUT -p tcp -m tcp --dport 25 -j ACCEPT | |
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT | |
-A INPUT -p tcp -m tcp --dport 110 -j ACCEPT | |
-A INPUT -p tcp -m tcp --dport 143 -j ACCEPT | |
-A INPUT -p tcp -m tcp --dport 443 -j ACCEPT | |
-A INPUT -p tcp -m tcp --dport 3306 -j ACCEPT | |
# Commmiting the rules to the firewall | |
COMMIT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment