> ## Content Index
> Fetch the complete content index at: https://blog.coopnet.us/llms.txt
> Use this file to discover other available public pages before exploring further.

# Closing my Plex port forward: Plex behind the NetBird reverse proxy
- URL: https://blog.coopnet.us/plex-behind-netbird-proxy/
- Published: 2026-11-17T23:27:22.000Z
- Updated: 2026-11-17T23:27:22.000Z
- Description: I wanted the Plex port forward gone, so Plex now sits behind the NetBird reverse proxy with Remote Access and Relay off. Before deleting the forward: set the custom server URL, narrow the login-free networks, and repoint anything that used the public IP. Tautulli was one.
- Author: Renstur
- Tags: networking, plex, netbird, reverse-proxy

Until late October my Plex server had the classic setup. Remote Access on, relay on, and a router forward sending the Plex port straight to the NAS from any source address. It worked, and it was an inbound hole I wanted gone.

I already run a self-hosted NetBird server, and its reverse proxy was serving a handful of other apps by then. So the plan was simple on paper: publish Plex as a NetBird proxy service, turn off Remote Access and Relay, and delete the forward. The part that wasn't simple was everything Plex had quietly been relying on.

```tested-on
truenas scale: 25.10
plex media server: 1.43.5
truenas plex app: 1.3.20
netbird: 0.81.x

```

## What the proxy actually sends to Plex

Which source address Plex sees decides whether it asks for a login. So I worked that out before touching any setting.

A NetBird reverse proxy service points at a target. Mine point at the peer itself, meaning the NAS's mesh address and port, something like 100.64.x.x:32400\. When a stream comes in through the proxy, Plex sees the request arrive from the proxy's own mesh address. Not the phone's address. Not anything on my LAN.

That's what you want. A 100.64.x.x source isn't in Plex's list of networks allowed without auth, so Plex treats it as remote and demands a sign-in. Every outside stream still has to log in.

Pointing the service at the NAS's LAN address would have broken that. A routing peer carrying the traffic there masquerades it by default, so Plex would see a LAN source address. And my "allowed without auth" list was wide. Wide enough that every remote stream coming through the proxy would have looked local and skipped login entirely.

That case comes from NetBird's routing docs, not from my own logs. The peer-target behaviour is what the Plex log showed once I tested it.

So two rules came out of that before anything else:

- Target the peer, not a routed LAN address.
- Narrow the login-free networks to the subnets that are actually your home LAN.

## Narrow the login-free networks first

My "List of IP addresses and networks that are allowed without auth" was set to an entire private range. That covered the home VLANs, sure. It also covered networks that get routed in over the mesh from other sites. None of those should get a free pass into Plex. Plex's own docs are blunt about why: anything that connects this way without signing in is treated as the server owner, with every library and the server settings.

I narrowed it to the real home subnets:

```text
List of IP addresses and networks that are allowed without auth
192.168.x.0/24,192.168.y.0/24,192.168.z.0/24

```

This one cost me a redo. The TrueNAS Plex app has its own allowed networks setting, and it injects that value into Plex every time the app redeploys. I narrowed the list in Plex's UI, then later updated the app for something unrelated, and the list went straight back to the wide default.

If you run Plex as a TrueNAS app, change it in the app's configuration. The field is called Local Networks, under Plex Configuration, and it ships with all three private ranges filled in. Changing the list only in Plex's settings lasts until the next redeploy.

## Tell Plex where it lives now

Outside clients need to learn the proxy's address from somewhere. In Settings, under Network, I set "Custom server access URLs" to the proxy hostname:

```text
Custom server access URLs
https://plex.example.com:443

```

Plex publishes that URL to plex.tv, and apps outside the house pick it up from there. I wrote the port in explicitly because if you leave it off, Plex fills in the port from the Remote Access page, which isn't the one the proxy listens on.

On the NetBird side the service itself was nothing special. It's public, targets the NAS peer on the Plex port over plain HTTP, and passes the host header through. The proxy terminates TLS with its own certificate. I also had CrowdSec watching it in observe mode at first, then switched it to enforce later the same day.

## Find what was using the public IP

This one would have bitten me if I'd deleted the forward first.

Tautulli was talking to Plex through my public IP. Its config had the public address as the Plex server, with "remote server" ticked, and the URL was a plex.direct name built from the public IP. Plex logged those connections as coming from the router, because the router was hairpinning them back in. That's NAT reflection doing its job, and it meant Tautulli depended on the very forward I was about to delete.

The fix was dull. I pointed Tautulli at the NAS's LAN address on the Plex port and unticked "remote server".

```text
Plex IP or hostname   192.168.x.x
Port                  32400
Remote server         off

```

If you've had Plex for a while, check anything that talks to it before you close the forward: stats tools, request apps, Home Assistant, a dashboard tile. Anything pointed at your public IP or a plex.direct name built from it is a candidate for the same hairpin.

## The cutover order

I did it in this order, and I'd do it in this order again:

1. Repoint Tautulli, and anything else that used the public IP, to the LAN address.
2. Turn off Remote Access in Plex.
3. Turn off "Enable Relay" in Plex's network settings.
4. Delete the router forward for Plex.

Relay matters more than it sounds. With it on, a client that can't reach your server directly gets bounced through Plex's Relay service, which is bandwidth limited. That hides problems. With relay off, a broken path shows up as broken, which is what you want during a cutover.

## Checking it from outside

Three checks told me it was done. From a machine outside the house:

```console
$ curl -s -o /dev/null -w '%{http_code}\n' https://plex.example.com/identity
200
$ curl -s -o /dev/null -w '%{http_code}\n' https://plex.example.com/library/sections
401
$ curl -s -m 10 -o /dev/null https://<public-ip>:32400/identity; echo "exit $?"
exit 28

```

The identity endpoint answers without auth, so the proxy reaches Plex. The library endpoint refuses without a token, so login is still enforced through the proxy. The old public port times out (exit 28 is curl giving up). The forward is really gone.

The last check was the one I cared about. I turned off Wi-Fi on my phone and played something over cellular while tailing the Plex log. On TrueNAS the log lives inside the container:

```console
$ docker exec ix-plex-plex-1 tail -F "/config/Library/Application Support/Plex Media Server/Logs/Plex Media Server.log"

```

The transcode segments went out to the proxy's mesh address with 206 responses, and nothing went through a relay. The whole stream came in through the proxy, with the router out of it.

## LAN Networks, and the part that wasn't finished

One side effect showed up the same day. Streams that come through the proxy all arrive from a 100.64.x.x address, so Plex treats them as remote for quality and bandwidth rules too. That's correct for people outside the house. It was less fun when a TV at home also ended up going out through the proxy and back.

As a stopgap I added the mesh range to "LAN Networks", the setting Plex uses to decide which clients count as local for bandwidth (it needs Plex Pass). That stopped home devices getting remote quality caps through the proxy. It's not where I left it, though. Once home clients connected directly again, I set LAN Networks back to just the home subnets and dropped the mesh range. Treating the whole mesh as local is too generous to leave in place.

Also worth knowing: if you clear LAN Networks completely while Plex runs in Docker bridge mode, only the container's own subnet counts as local. Every home client then gets classed as remote. Set it to your real home subnets rather than empty.

Why the home TV was choosing the proxy in the first place is its own story, mostly about bridge mode and the URLs Plex advertises. I'll write that one up separately.

## Was it worth it

Yes. The Plex forward is gone, outside streams still require a sign-in, and Tautulli kept working. The proxy also means CrowdSec sees Plex traffic now, which it never did when the router passed it straight to the NAS.

The work was almost all on the Plex side. The NetBird service was a short form. The Plex side meant finding the settings that had been leaning on an open port. If I were starting again, I'd do the three prep steps first, narrow the login-free list in the app config rather than the UI, and only then touch the router.

If you want the NetBird background first, I covered reaching [LAN-only services through NetBird](https://blog.coopnet.us/netbird-lan-only-services/) and a [proxy that relayed everything because of a Docker hairpin](https://blog.coopnet.us/netbird-proxy-relayed-docker-hairpin/).