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]";
|
2021-10-16 15:31:10 +03:00
|
|
|
jails.sshd = ''
|
|
|
|
enabled = true
|
|
|
|
port = 22
|
|
|
|
mode = aggressive
|
|
|
|
'';
|
2022-05-16 20:21:31 +03:00
|
|
|
ignoreIP = [
|
|
|
|
"10.0.0.0/8"
|
2023-03-07 02:25:57 +02:00
|
|
|
depot.reflection.interfaces.primary.addr
|
2022-05-16 20:21:31 +03:00
|
|
|
];
|
2022-05-17 11:40:35 +03:00
|
|
|
bantime-increment = {
|
|
|
|
enable = true;
|
2022-05-18 02:22:35 +03:00
|
|
|
maxtime = "48h";
|
2022-05-17 11:40:35 +03:00
|
|
|
};
|
2021-10-16 15:31:10 +03:00
|
|
|
};
|
|
|
|
}
|