2024-09-27, 08:42 AM
(This post was last modified: 2024-09-27, 09:25 AM by Merkanom. Edited 1 time in total.)
Hello,
im trying to use fail2ban to block users who failed with login 3 times.
My fail2ban filter is working fine, but jellyfin logs are increasing several gigabyte over hours and jellyfin is spamming "login denied"-messages with just 1 login try. This didnt seems correct. Now i changed the logging to "WARNING" in system.xml. I can see login attempts now like
"jellyfin | [10:31:25] [ERR] [25] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request: Invalid username or password entered. URL POST /Users/authenticatebyname." and this logs are correct now (1 try > 1 log entry). But now i have the problem that the IP the login attempt was created is missing. Is there a way to get to this ip? Reverse proxy etc is correct i can see in INFO-log level the public ip-adresses. I just want them in that log.
How i can see ip-adresses in log level warning?
thank you very much!
edit:
chatgpt says i have to create a middleware.. is there no other option to see IP at just that log entry?
is this hard to implement that?
im trying to use fail2ban to block users who failed with login 3 times.
My fail2ban filter is working fine, but jellyfin logs are increasing several gigabyte over hours and jellyfin is spamming "login denied"-messages with just 1 login try. This didnt seems correct. Now i changed the logging to "WARNING" in system.xml. I can see login attempts now like
"jellyfin | [10:31:25] [ERR] [25] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request: Invalid username or password entered. URL POST /Users/authenticatebyname." and this logs are correct now (1 try > 1 log entry). But now i have the problem that the IP the login attempt was created is missing. Is there a way to get to this ip? Reverse proxy etc is correct i can see in INFO-log level the public ip-adresses. I just want them in that log.
How i can see ip-adresses in log level warning?
thank you very much!
edit:
chatgpt says i have to create a middleware.. is there no other option to see IP at just that log entry?
is this hard to implement that?