modules: services: calibre-web: add fail2ban jail
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Bruno BELANYI 2023-02-19 18:36:52 +01:00
parent b9f6c5d534
commit 2485a60d62

View file

@ -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
'';
};
};
}