depot/modules/fail2ban/default.nix

17 lines
342 B
Nix
Raw Normal View History

2023-03-07 02:25:57 +02:00
{ config, depot, ... }:
2021-10-16 15:31:10 +03:00
{
services.fail2ban = {
enable = true;
2022-05-16 20:39:04 +03:00
banaction = "iptables-multiport[blocktype=DROP]";
jails.sshd.settings.mode = "aggressive";
ignoreIP = [
"10.0.0.0/8"
2023-03-07 02:25:57 +02:00
depot.reflection.interfaces.primary.addr
];
bantime-increment = {
enable = true;
maxtime = "48h";
};
2021-10-16 15:31:10 +03:00
};
}