nixos: services: jellyfin: 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
The upstream documentation adds quotes around the IP, but I don't see them in my logs. Let's split the difference by making them optional.
This commit is contained in:
parent
4a38757db9
commit
c1eab0edee
|
@ -41,5 +41,21 @@ in
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.fail2ban.jails = {
|
||||
jellyfin = ''
|
||||
enabled = true
|
||||
filter = jellyfin
|
||||
port = http,https
|
||||
'';
|
||||
};
|
||||
|
||||
environment.etc = {
|
||||
"fail2ban/filter.d/jellyfin.conf".text = ''
|
||||
[Definition]
|
||||
failregex = ^.*Authentication request for .* has been denied \(IP: "?<ADDR>"?\)\.
|
||||
journalmatch = _SYSTEMD_UNIT=jellyfin.service
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue