Add firewall rules that mitigate spam
This commit is contained in:
parent
2c9ccff84b
commit
11afd23d99
1 changed files with 6 additions and 0 deletions
|
@ -1,6 +1,12 @@
|
|||
{ pkgs, config, ... }:
|
||||
|
||||
{
|
||||
networking.firewall.extraCommands = let user = config.services.postfix.user;
|
||||
in ''
|
||||
iptables -I OUTPUT -m owner ! --uid-owner ${user} -m tcp -p tcp --dport 25 -j REJECT --reject-with icmp-admin-prohibited
|
||||
ip6tables -I OUTPUT -m owner ! --uid-owner ${user} -m tcp -p tcp --dport 25 -j REJECT --reject-with icmp6-adm-prohibited
|
||||
'';
|
||||
|
||||
services.postfix = {
|
||||
enable = true;
|
||||
enableSubmission = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue