• 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 Real Client IP Not Showing Behind Proxy

     
    • 0 Vote(s) - 0 Average

    Real Client IP Not Showing Behind Proxy

    Proxied behind Cloudflare and reverse proxied with Caddy
    alchemy
    Offline

    Junior Member

    Posts: 6
    Threads: 2
    Joined: 2024 Apr
    Reputation: 0
    Country:Sweden
    #1
    2024-04-15, 10:58 PM
    Hey everyone, I'm having some trouble getting jellyfin to correctly register client IPs. I currently have it partially behind cloudflare for the sign-in etc, so html stuff only and no TOS issues. I am also reverse proxying through Caddy.

    Currently I have caddy built with the cloudflare trusted_proxies module and therefore have this directive in my config:

    {
            servers {
                    trusted_proxies cloudflare {
                            interval 12h
                            timeout 15s
                    }
            }
    }

    jellyfin.domain.com {
            reverse_proxy 127.0.0.1:8096
    }


    in my request logs for caddy I have the following, where remote_ip is a cloudflare ip, and all other entries are my true IP.
    handled request {"request": {

    "remote_ip": "100.100.100.100",
    "client_ip": "50.50.50.50",
    "X-Forwarded-For": ["50.50.50.50"],
    "Cf-Connecting-Ip": ["50.50.50.50"],

    Though the requests look like this, in Jellyfin's UI I am still seeing cloudflare addresses attached to user activity. Jellyfin and Caddy are running on the same debian machine.

    I'm still not sure I entirely understand the "known proxies" configuration option in jellyfin. I'm hoping I wouldn't have to list the cloudflare proxies as this is 20 megabytes of text and the codebase suggests comparing these searches through a list. I've tried adding what should be my Caddy IP as jellyfin sees it (127.0.0.1) but this hasn't worked.

    Thanks so much for any help.
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #2
    2024-04-16, 05:05 PM
    Known proxies would need to be 100.100.100.100. Once you've specified that it will use the "X-Forwarded-For" field for the client IP in the dashboard.
    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]
    alchemy
    Offline

    Junior Member

    Posts: 6
    Threads: 2
    Joined: 2024 Apr
    Reputation: 0
    Country:Sweden
    #3
    2024-04-16, 11:12 PM (This post was last modified: 2024-04-16, 11:12 PM by alchemy.)
    Ah I'm blind, I see now in the codebase that the known proxies list does indeed include support for CIDR blocks. Thanks so much!
    « 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