[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Last revisionBoth sides next revision | ||
howtos:network_services:postfix_dovecot_mysql:email_firewall [2015/06/10 08:10 (UTC)] – typo fix and clarification of example firewall.rules file tim | howtos:network_services:postfix_dovecot_mysql:email_firewall [2018/02/06 00:58 (UTC)] – Removed UFW syntax added by others - added policy lines astrogeek | ||
---|---|---|---|
Line 14: | Line 14: | ||
< | < | ||
+ | --policy INPUT DROP | ||
+ | --policy FORWARD DROP | ||
+ | --policy OUTPUT DROP | ||
+ | |||
-A INPUT -m state --state INVALID -j DROP | -A INPUT -m state --state INVALID -j DROP | ||
-A INPUT -m state --state ESTABLISHED, | -A INPUT -m state --state ESTABLISHED, | ||
Line 55: | Line 59: | ||
To install these rules as your firewall save them to a text file using < | To install these rules as your firewall save them to a text file using < | ||
- | |||
- | < | ||
- | < | ||
- | :INPUT DROP [0:0] | ||
- | :FORWARD DROP [0:0] | ||
- | :OUTPUT ACCEPT [0:0] | ||
- | </ | ||
- | and to the end of the file, add < | ||
- | As per the note above, don't forget to uncomment the ssh rule if the server is not sitting in front of you, or you'll lock yourself out!</ | ||
There are many preferences for saving and loading firewall scripts. I generally use / | There are many preferences for saving and loading firewall scripts. I generally use / |