Fix "Plex API - Sessions Status not honoring X-Forwarded-For & X-Real-IP with IPv6 clients"

Plex API - Sessions Status not honoring X-Forwarded-For & X-Real-IP with IPv6 clients has existed since 2017 and been unaddressed, I believe, since it’s sitting in the 3rd party development category.

Please fix Plex ignoring IPv6 in the X-Forwarded-For/X-Real-IP headers.

Edit: Moved forums?

1 Like

It should probably go to the https://forums.plex.tv/c/plex-media-server/remote-access subforum as this is a bug not a feature.

Apparently fixing IPv6 is now finally on the radar of the Plex devs, since a significant part of the userbase now finds itself in a public IPv6/private IPv4 situation. The Remote Access subforum (and the Plex subreddit) are flooded with people who find themselves behind CG-NAT.

1 Like

Thanks for the heads up. I’ll see if I can more easily move this to the correct subforum when I’m not on mobile.

There, I think it’s in the right forum now.

I am UNTAGGING all the platforms.

Please tell me which platform is impacted.
SPAMMING all of them is poor form.

1 Like

Literally all of them? It’s a misfunction of the Plex Server, regardless of platform.

How about we determine which platforms are impacted?

Logfiles of a recreation please?

Sure, there’s good info in the originally linked thread: Plex API - Sessions Status not honoring X-Forwarded-For & X-Real-IP with IPv6 clients

This thread may prove useful as well: NGINX Proxy - X-Forwarded-For ignored for 192.168 / 10.0 / private addresses

No longer relevant.

Since that thread, IPv6 implementation began. The timeframe of that thread had no IPv6 support.

We need to start fresh.

It’s still the same issue as the old was never fixed.

Plex Media Server.log:Nov 14, 2019 13:25:16.604 [0x7f90e625a700] VERBOSE - X-Forwarded-For: 192.168.1.30
Plex Media Server.log:Nov 14, 2019 13:25:16.604 [0x7f90e6a5b700] VERBOSE -  * X-Forwarded-For => 192.168.1.30
Plex Media Server.log:Nov 14, 2019 13:25:16.604 [0x7f90e6a5b700] VERBOSE -  * X-Forwarded-Port => 443
Plex Media Server.log:Nov 14, 2019 13:25:16.604 [0x7f90e6a5b700] VERBOSE -  * X-Forwarded-Proto => https

That should be showing as 192.168.1.30 but since it still isn’t.

Version 1.18.2.2015 on Debian 10.

2 Likes

And here’s the example with IPv6. Yes, IPv6 is enabled in the Plex Media Server network settings. Yes PMS has been rebooted. Plex is quite clearly seeing the IP then just choosing to ignore it, I guess? The .113 is my webserver.

PlexPy

Plex

Logs with some censored info:

Nov 14, 2019 21:08:18.901 [5004] VERBOSE - X-Forwarded-For: 2600:1700:[censored], 2600:1700:[censored]
Nov 14, 2019 21:08:18.901 [1932] VERBOSE -  * Host => [censored]
Nov 14, 2019 21:08:18.901 [1932] VERBOSE -  * X-Real-IP => 2600:1700:[censored]
Nov 14, 2019 21:08:18.901 [1932] VERBOSE -  * X-Forwarded-For => 2600:1700:[censored], 2600:1700:[censored]
Nov 14, 2019 21:08:18.901 [1932] VERBOSE -  * X-Forwarded-Proto => https
Nov 14, 2019 21:08:18.901 [1932] VERBOSE -  * Connection => upgrade
Nov 14, 2019 21:08:18.901 [1932] VERBOSE -  * x-playback-session-id => [censored]
Nov 14, 2019 21:08:18.901 [1932] VERBOSE -  * accept-language => en-us
Nov 14, 2019 21:08:18.901 [1932] VERBOSE -  * cookie => __cfduid=[censored]
Nov 14, 2019 21:08:18.901 [1932] VERBOSE -  * CF-Connecting-IP => 2600:1700:[censored]
Nov 14, 2019 21:08:18.901 [1932] VERBOSE -  * CDN-Loop => cloudflare

Edit: Version 1.18.2.2029 on Windows 10 Pro.

I’m having the same issue, but also on ipv4 address. I turned off IPv6 to force IPv4 to connect and it still shows my server IP on the dashboard instead of the local client.

Just commenting to say the issue remains in Version 1.18.4.2171.

Any updates on this issue? It really sucks that we have to disable IPv6 to see client IPs.

Confirmed the issue is still present in 1.18.5.2309 on Windows 10.

Confirmed issue is still present.

Platform: Docker
Plex Version: 1.18.6.2348

This topic was automatically closed after 90 days. New replies are no longer allowed.

I have a build with a fix, anyone want to try it out?

1 Like

Absolutely @StSimm1. Name a platform/build and I’m down!

1 Like