nixos-config/hosts/falkenstein/modules/fail2ban/default.nix

29 lines
519 B
Nix
Raw Normal View History

2024-04-01 14:25:19 +02:00
{ ... }:
2023-10-22 15:45:30 +02:00
{
services.fail2ban = {
enable = true;
2023-12-12 17:44:28 +01:00
ignoreIP = [
"141.30.0.0/16"
"141.76.0.0/16"
];
2023-10-22 15:45:30 +02:00
bantime = "10m";
bantime-increment = {
enable = true;
};
jails = {
dovecot = ''
enabled = true
# aggressive mode add blocking for aborted connections
filter = dovecot[mode=aggressive]
maxretry = 3
'';
postfix = ''
enabled = true
filter = postfix[mode=aggressive]
maxretry = 3
'';
};
};
}