Plex generating incorrect secure connection URL - wrong local IP detected

Server Version#: 1.42.1.10060
Player Version#: 4.156.0 (plex-web)

Hi everyone,

I’m having an issue where Plex is generating secure connection URLs with an incorrect IP address that doesn’t exist on my network.

What’s happening:

  • https://192-168-16-1.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.plex.direct:32400 :cross_mark: does not resolve

  • after a while plex web falls back to XX-XXX-XX-XXX.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.plex.direct:public-port :white_check_mark: resolves fine (public Ip and open port)

The problem is that 192.168.16.1 doesn’t exist anywhere on my network.

My network topology:

Internet
  ↓
ISP Router (192.168.1.1/24 subnet)
  ↓
Internal Router at 192.168.1.40 (192.168.0.1/24 subnet)
  ↓
Plex Server at 192.168.0.170

It seems like Plex is detecting something incorrectly and generating the wrong IP in the secure URL. The public IP-based URL works fine, but the local one uses this non-existent 192.168.16.1 address.

Has anyone encountered this before? I’m running a double-NAT setup (two routers), which might be confusing Plex’s network detection.

I am really curios to know how plex web resolves the internal ip on the local network, there seem to be some heuristics in place as i have seen also other random ip combinations (domain) in the network logs of the browser.

I am aware on the downsides of double NATs, ports are configured so that all forwarding works fine from the internet. The problem I am experiencing is only on the local network and is specifically tied to the plex ecosystem.

Any help would be appreciated!

Please provide your server logs.

Sooo obviously I figured out what was happening like 10 minutes after posting but having had the issue for multiple months… Anyway I can explain at least for a portion of the problem.

I have plex running in docker compose on my NAS with “networking mode: host”. I have many many other services running on this host via docker and one of the docker networks is 192.168.160.0/24 .

So I figure the plex server was trying to find out which one was the actual LAN interface, but was failing to do so and at some point plex-web just decided to go via public ip.

I changed newtorking to ipvlan l2 in docker and gave the docker container its own ip. Here is a link to the docs for the interested reader ipvlan, macvlan .

Now I get plex-web trying for the correct ip on the network and connect to the 192.168.0.171 host via the DNS name “192-168-0-171.xxxxxxxxxxxxxxxxxxxxxxxxxxxx.plex.direct”

Now DNS resolution fails for this domain with a timeout, I tried it in the LAN with

$ nslookup 192-168-0-171.xxxxxxxxxxxxxxxxxxxxxxxxxxxx.plex.direct 8.8.8.8

But I also get a timeout.

I tried with the phone as a hotspot and it resolves

$ nslookup 192-168-0-171.xxxxxxxxxxxxxxxxxxxxxxxxxxxx.plex.direct        
Server:		172.20.10.1
Address:	172.20.10.1#53

Non-authoritative answer:
Name:	192-168-0-171.xxxxxxxxxxxxxxxxxxxxxxxxxxxx.plex.direct
Address: 192.168.0.171

So this looks like the DNS rebinding issue, unfortunately I have not been successful on disabling this on an ubiquity edgerouter-x .