nixos: services: audiobookshelf: add fail2ban jail

This commit is contained in:
Bruno BELANYI 2024-09-22 01:10:52 +02:00
parent c218a9f2cf
commit 22f0c2bfb4

View file

@ -35,5 +35,21 @@ in
};
};
};
services.fail2ban.jails = {
audiobookshelf = ''
enabled = true
filter = audiobookshelf
port = http,https
'';
};
environment.etc = {
"fail2ban/filter.d/audiobookshelf.conf".text = ''
[Definition]
failregex = ERROR: \[Auth\] Failed login attempt for username ".*" from ip <ADDR>
journalmatch = _SYSTEMD_UNIT=audiobookshelf.service
'';
};
};
}