nixos: services: mealie: add fail2ban jail

This commit is contained in:
Bruno BELANYI 2024-09-22 00:43:17 +02:00
parent 129d4b3a5a
commit c218a9f2cf

View file

@ -71,5 +71,21 @@ in
};
};
};
services.fail2ban.jails = {
mealie = ''
enabled = true
filter = mealie
port = http,https
'';
};
environment.etc = {
"fail2ban/filter.d/mealie.conf".text = ''
[Definition]
failregex = ^ERROR.*Incorrect username or password from <HOST>
journalmatch = _SYSTEMD_UNIT=mealie.service
'';
};
};
}