Jellyfin Forum
SOLVED: Nginx Proxy Manager How do I IP forward - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+---- Forum: Networking & Access (https://forum.jellyfin.org/f-networking-access)
+---- Thread: SOLVED: Nginx Proxy Manager How do I IP forward (/t-solved-nginx-proxy-manager-how-do-i-ip-forward)



Nginx Proxy Manager How do I IP forward - heeerold - 2024-03-23

How do I forward the real IP address with nginx proxy manager to jellyfin?

Setup: Jellyfin and nginx proxy manager installed via container (podman/ docker).


As stated in https://jellyfin.org/docs/general/networking/nginx/ you have to add following to the advanced tab in nginx proxy manager.


    # Disable buffering when the nginx proxy gets very resource heavy upon streaming
    proxy_buffering off;
    # Proxy main Jellyfin traffic
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-Protocol $scheme;
    proxy_set_header X-Forwarded-Host $http_host;
    proxy_headers_hash_max_size 2048;
    proxy_headers_hash_bucket_size 128;
   
    # Security / XSS Mitigation Headers
    # NOTE: X-Frame-Options may cause issues with the webOS app
    add_header X-Frame-Options "SAMEORIGIN";
    add_header X-XSS-Protection "0";
    add_header X-Content-Type-Options "nosniff";
    # Content Security Policy
    # See: https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP
    # Enforces https content and restricts JS/CSS to origin
    # External Javascript (such as cast_sender.js for Chromecast) must be whitelisted.
    # NOTE: The default CSP headers may cause issues with the webOS app
    #add_header Content-Security-Policy "default-src https: data: blob: http://image.tmdb.org; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' https://www.gstatic.com/cv/js/sender/v1/cast_sender.js https://www.gstatic.com/eureka/clank/95/cast_sender.js https://www.gstatic.com/eureka/clank/96/cast_sender.js https://www.gstatic.com/eureka/clank/97/cast_sender.js https://www.youtube.com blob:; worker-src 'self' blob:; connect-src 'self'; object-src 'none'; frame-ancestors 'self'";



yet it does not forward the real ip address to the jellyfin log. The requests still come from nginx proxy manager.

What am I missing? Do I have to specify something in jellyfin?


RE: Nginx Proxy Manager How do I IP forward - TheDreadPirate - 2024-03-23

In the Jellyfin Networking config there is a "Known proxies" config. Put in the IP of the Nginx Proxy Manager container. This will require you restart Jellyfin. That should trigger Jellyfin to read the X-Forwarded-For field in the header.


RE: Nginx Proxy Manager How do I IP forward - heeerold - 2024-03-26

thank you. I guess that is the solution.

Somehow nginx proxy manager changes its ip very often. I have to investigate that.