fruitbasket/modules/core/fail2ban.nix

29 lines
538 B
Nix
Raw Normal View History

2024-03-11 22:49:12 +01:00
{ ... }:
2023-10-04 18:49:12 +02:00
{
services.fail2ban = {
enable = true;
2023-10-23 11:57:01 +02:00
ignoreIP = [
"141.30.0.0/16"
"141.76.0.0/16"
];
2023-10-20 16:57:02 +02:00
bantime-increment = {
enable = true;
};
2023-10-04 18:49:12 +02:00
jails = {
2023-10-19 14:24:11 +02:00
dovecot = ''
enabled = true
# aggressive mode to add blocking for aborted connections
filter = dovecot[mode=aggressive]
2024-12-05 19:16:04 +01:00
maxretry = 15
2023-10-19 14:24:11 +02:00
'';
postfix = ''
enabled = true
filter = postfix[mode=aggressive]
2024-12-05 19:16:04 +01:00
maxretry = 15
2023-10-19 14:24:11 +02:00
'';
2024-12-05 19:16:04 +01:00
sshd.settings.maxretry = 15;
2023-10-04 18:49:12 +02:00
};
};
}