blob: be79de553a2006e1b0b361e89c049880ff4ce930 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
{ lib, config, pkgs, ... }:
with lib; let
cfg = config.local.net.fail2ban;
in
{
options.local.net.fail2ban = {
enable = mkEnableOption "fail2ban";
};
config = mkIf cfg.enable {
services.fail2ban = {
enable = true;
bantime = "10m";
bantime-increment = {
enable = true;
maxtime = "48h";
rndtime = "10m";
overalljails = true;
};
#TODO: No quemar
ignoreIP = [
"10.34.0.0/16"
"fd34:2::/64"
"37.205.12.147"
"2a03:3b40:fe:3ec::1"
];
};
};
}
|