modules: services: calibre-web: add fail2ban jail
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
b9f6c5d534
commit
2485a60d62
|
@ -53,5 +53,21 @@ in
|
|||
cfg.libraryPath
|
||||
];
|
||||
};
|
||||
|
||||
services.fail2ban.jails = {
|
||||
calibre-web = ''
|
||||
enabled = true
|
||||
filter = calibre-web
|
||||
port = http,https
|
||||
'';
|
||||
};
|
||||
|
||||
environment.etc = {
|
||||
"fail2ban/filter.d/calibre-web.conf".text = ''
|
||||
[Definition]
|
||||
failregex = ^.*Login failed for user ".*" IP-address: <HOST>$
|
||||
journalmatch = _SYSTEMD_UNIT=calibre-web.service
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue