Okay, need some advice here as I am at wits end.
Recently moved to new house and had to switch from AT&T Fiber to Starlink. Since Starlink uses CGNAT I had to enable the use relay option in Plex so that the users of my Plex server can get to it. They have no issues and can access just fine. The issue I’m having is on the local network as no matter what settings I set I can’t get my local client to connect directly as the container sees them as being remote and uses the relay which in turn causes insufficient bandwidth issues during playback.
My container network is 192.168.32.0/20.
My server has multiple IPs and I have Plex set to use 192.168.0.60 in the app config under network options by selecting the “Publish port on host for external access” and select the IP mentioned from the list.
I have entered my LAN network and my container network in Plex in the network settings under LAN networks.
If I check the “Host Network” option in the app settings I can get direct streaming to show but the playback errors out in the Plex app.
Any suggestions would be appreciated as I mentioned this only started when I had to start messing with Starlink and the Relay.
I’d suggest playing with some of the options in the “Network” tab on Plex itself, specifically the ‘LAN Networks’ & “Treat WAN IP as LAN Bandwidth” fields. See if that does the needful.
@Fleshmauler, thanks for the reply and appreciate any assistance.
I’ve been messing with them on and off for a few months. Sometimes it seems to resolve and then a few days later it’s back to messing up. I’m pretty sure even when it worked it wasn’t really going direct, it was just a good day on the Starlink connection.
All I know is that when I have issues, the only common thing I can see is that it shows my connect as remote. Even when I’m connecting to my servers IP of 192.168.0.60 on port 32400 and go into the network section as you suggested it shows my connection as “nearby” in the left side where the server name is noted. When I use the DNS name it says remote.
Okay, I think I might be on to something here and not sure if this is an issue with TrueNAS or Plex.
In the app settings under “Network Configuration”, if I select “Publish port on the host for external access”, enter the port number of 32400 and select the IP I want the app to use which is 192.168.0.60 and leave the “Host Network” option unchecked as shown in the pic below…
In the network settings for Plex it doesn’t show the 192.168.0.60 IP in the available selections for “Preferred network interface”, just the network for the container are shown. I would think defining the IP to use would allow Plex to see it however it seems this only sets up the mapping of the IP into the container.
If however I select the “Host Network” option (which is recommended on the Plex forums to check despite the app config saying not to), the options to define the IP I’d like to use for the app go away.
and all my configured network IPs show up in the Plex app to select as well as the IPs in use by my other containers.
If I select the one I want to have it use and click the save settings Plex then moves to one I didn’t select to use. I can only leave it on Any which I really don’t want to as it will use all the interfaces and advertise everywhere.
Selected 192.168.0.60 and hit save…
Plex changed it to 192.168.0.65…

Okay, for those following along and that find this thread later here is what I’ve done. I posted this question over on the Plex forums and got some help. This behavior appears to be caused by a couple of things.
First and foremost, checking the box for “Host Network” is pretty much what everyone on the Plex forums suggests. So I’ve done that. Next this appears to be a DNS rebinding issue with Plex so I had to setup my internal DNS servers to allow that, notes below.
I’ve setup my internal DNS servers with an rpc.whitelist zone which should allow the needed rebinding. I found a good write up for this at the URL below that I modified for my needs and included the changes I did below.
URL: DNS Whitelist in BIND with RPZ
Added an entry to my “options” section in my config file:
response-policy { zone “rpz.whitelist”; };
Created a new zone entry in my config file:
zone “rpz.whitelist” {
type master;
file “rpz/db.rpz.whitelist”;
allow-query { none; };
};
Zone file contents:
$TTL 86400 ; 1 day
@ IN SOA localhost. root.localhost. (
2025111801 ; serial
900 ; refresh (15 minutes)
600 ; retry (10 minutes)
86400 ; expire (1 day)
3600 ; minimum (1 hour)
)
NS localhost.
plex.direct CNAME rpz-passthru.
Now to test and see what happens. Still working on the issue where Plex switches the preferred interface but I have an idea how to address that via a dedicated network interface separate from my main bridge adapter.
After testing the above DNS entries appear to have addressed the issues. After adding them to my local BIND server I have had no issues getting Plex to stream directly to my clients on my local network. Remote users still need to use the relay but locally all is back to as it was. Thx to those that chimed in over in the Plex forums. Marking the above as the solution.
1 Like