nixos: services: navidrome: add fail2ban jail
All checks were successful
ci/woodpecker/push/check Pipeline was successful
All checks were successful
ci/woodpecker/push/check Pipeline was successful
This commit is contained in:
parent
a059828a58
commit
1aa3385e13
|
@ -52,5 +52,21 @@ in
|
|||
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
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue