nixos: services: navidrome: add fail2ban jail
All checks were successful
ci/woodpecker/push/check Pipeline was successful

This commit is contained in:
Bruno BELANYI 2024-09-22 02:12:48 +02:00
parent a059828a58
commit 1aa3385e13

View file

@ -52,5 +52,21 @@ in
inherit (cfg) port; inherit (cfg) port;
}; };
}; };
services.fail2ban.jails = {
navidrome = ''
enabled = true
filter = navidrome
port = http,https
'';
};
environment.etc = {
"fail2ban/filter.d/navidrome.conf".text = ''
[Definition]
failregex = ^.*msg="Unsuccessful login".*X-Real-Ip:\[<HOST>\]
journalmatch = _SYSTEMD_UNIT=navidrome.service
'';
};
}; };
} }