Indirect on HOME network

Server Version#:1.41.2.9200
Chart Version#:2.0.16
Pretty much what the title says. I have plex running on a TRUENAS server. My router is the fun at&t BGW320-500. I have full remote access when using the server outside of my home network and can direct play. Soon as I’m home and try on any device TV, phone, tablet, desktop, ect… its always indirect connection. I’ve done the port forwarding and the passthrough method and I still cant get a direct

What IP range does your home network use? Do you have a VPN active?

DHCPv4 Start Address|192.168.1.64

DHCPv4 End Address|192.168.1.253

No VPN active

Can you post a copy of your server logs?

Plex Media Server Logs_2024-11-30_17-04-53.zip (173.8 KB)

logs as requested

The Plex server has an IP address of 172.16.0.7 so something isnt configured correctly.

EDIT: Looking at the logs looks like you are using a Docker container. Check the network config for that.

It’s odd because the router shows 192.168.1.140

When using docker containers networking can be not obvious.
By default, Docker containers use the IP range 172.16.0.0/16 for their network Look into bridging the docker network settings

Can you provide the output from running the following on your Docker host?
sudo docker container inspect <container name> | jq '.[].NetworkSettings.Networks'

This will show the current network driver being used by the container and show its private IP address and gateway.

For example:
sudo docker inspect plex | jq '.[].NetworkSettings.Networks' would produce something like:

{
  "bridge": {
    "IPAMConfig": null,
    "Links": null,
    "Aliases": null,
    "NetworkID": "c4458a6dc3f74f7ebb7f38b4b4adbc9f0dd28db4f50b00dbeea41ad2ba847a2c",
    "EndpointID": "d2be38aea498ebaf2f8f332d6c55128b1dc186114d71b8bb0a26a0a70daa2a71",
    "Gateway": "172.17.0.1",
    "IPAddress": "172.17.0.2",
    "IPPrefixLen": 16,
    "IPv6Gateway": "",
    "GlobalIPv6Address": "",
    "GlobalIPv6PrefixLen": 0,
    "MacAddress": "02:42:ac:11:00:02",
    "DriverOpts": null
  }
}

This output means that this container is using the “bridge” network driver and has an IP address of 172.17.0.2.

You can also run sudo docker inspect plex | jq '.[].NetworkSettings.Ports' to see which (if any) ports you have published for the container.

Finally, the following will show some additional information which may prove interesting:
sudo docker inspect plex | jq '.[].Config'
In particular, it shows any environment variables passed at container creation time along with the image used by the container. The “ADVERTISE_IP” environment variable is needed if the bridge network driver is being used.

All of the above command examples assume the container name is “plex” and that you have the jq command available (JSON parser/processor). If you don’t have it available, you can just run sudo docker container inspect <container name> and find the data manually.

Ran this from shell and these commands didn’t work. I’m new to truenas scale btw but I got plex running pretty smoothly when I set it up a few months ago. Minus indirect at home of course.

Interesting. I went ahead and stood up a VM with TrueNAS Scale 24.10.0.2 and installed the Plex Docker app, using mostly default settings.

It defaulted to the bridge network driver, so that 172.16.0.0/12 address is absolutely expected.

It didn’t ask for (or set) the ADVERTISE_IP environment variable by default which could be problematic. It may also explain the behavior you’re seeing. Without that being set, your Docker PMS will advertise only its public IP address and the IP address inside the container.

When you’re really remote, clients will try to try to connect to your public IP; since you’ve forwarded that in your router it works as expected.

When you’re on your local network, clients will attempt to connect to your PMS Docker container address instead. This address isn’t available on your network, so local clients can’t connect directly. It therefore falls back to your public IP address.

You may need to delete and recreate the container, but this time enable the “Host Network” box in the network configuration when creating it. This will expose PMS through the host (TrueNAS server) IP address and generally makes life simpler.

1 Like

I love you. I didn’t have to delete it. I went to edit and selected it and I’m now direct on my home network.

1 Like

Nice, glad you got it working!

1 Like

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