• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Support Troubleshooting Get ip-address from login attempts in log level warning

     
    • 0 Vote(s) - 0 Average

    Get ip-address from login attempts in log level warning

    Merkanom
    Offline

    Junior Member

    Posts: 2
    Threads: 1
    Joined: 2024 Sep
    Reputation: 0
    #1
    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?
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #2
    2024-09-27, 12:57 PM
    You're using the filter as provided in our documentation, correct? If so, there should be an INF level log with the public IP of the failed login.

    Code:
    [2024-09-27 08:54:44.271 -04:00] [INF] [112] Jellyfin.Server.Implementations.Users.UserManager: Authentication request for "Chris" has been denied (IP: "[My Public IP]").

    The filter we provide in our documentation looks for this line.

    Code:
    2024-09-27 08:54:44,274 fail2ban.filter         [1684]: INFO    [jellyfin-testing] Found [My Public IP] - 2024-09-27 08:54:44
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    Merkanom
    Offline

    Junior Member

    Posts: 2
    Threads: 1
    Joined: 2024 Sep
    Reputation: 0
    #3
    2024-09-30, 01:40 PM
    Ah my fault.. Probably the log level was "debug" and not "info" before.
    With "info" its working how you describes it.

    Thank you!
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode