Remote access with multiple interfaces active not working

I’m running Plex natively on a Synology behind a NAT firewall.
It’s internally on the A.A.A.32 address.
The external Internet address could be B.B.B.56, for example.

I’ve got a port forwarding on the NAT firewall pointing HTTP/HTTPS and TCP 32400 at the Plex server.
I can get to plex externally at http://B.B.B.56:32400/web

I’ve also got a DNS entry to resolve plex.mydomain.com to the B.B.B.56 address.
I’ve got an Nginx reverse proxy on the server pointing http://plex.mydomain.com at http://localhost:32400
I can access Plex externally by going to http://plex.mydomain.com/

On the server I can go to Settings → Remote Access and see that remote access shows the correct info.

This all works just fine, as you would expect.

… and then I break it :wink:

On the Synology I’ve also got an external VPN connection that becomes the default gateway for the server.
I’ve put in some policy routing to ensure that any unsolicited traffic that comes in via the NAT gateway on the A.A.A.32 address will go back out that interface, to prevent asymmetric routing.
The idea being that my port forwarded services will still be available via the NAT router, but internally generated traffic from the server will go via the VPN.
This works with a lot of other services, but not Plex.

With the VPN active, remote access will still work via the configured URL, but the remote access tab on the server picks up the public address as being that of the VPN exit point.
There’s no port forwarding via the VPN, and so the remote access tab has the big red not available outside your network message.

This is caused by the Plex server initiating the ‘what’s my ip address’ query and going via the VPN.
Once it’s in this state, plex apps, like IOS, android and app.plex.tv, simply can’t discover or connect to the server.
Direct access by browser remains unaffected throughout.
Direct access by clients that allow manual server configuration will work, but only allow IP configuration, not DNS.

So, to try and fix this sorry mess, I go to Settings → Network and add http://plex.mydomain.com to the “Custom server access URLs” field.
The field help suggests that this should be “A comma-separated list of URLs (http or https) which are published up to plex.tv for server discovery.”
This seems like exactly what I need … except it doesn’t work, or is for some other purpose.
You’d think that a server configured with this field would be advertising that address to plex.tv to downstream advertise to clients, but it’s not.

I can’t see any way to have the VPN active while retaining Plex app remote access.

I know I can add remote server addresses into the IOS client, but that doesn’t help me much with dynamic addressing. I need to be able to use DNS.
I couldn’t see any manual server settings on the app.plex.tv version either.

Any ideas?

It’d be great if the remote access tab allowed an option to override the detection and specify a URL, DNS or IP address for this situation. I see a lot of forum posts with a similar scenario that could be solved by disabling the automatic detection.

That is one way to do it, but it’s a game of whack-a-mole.
Manually adding a bunch of addresses to a route table to bypass the VPN isn’t a good solution.
Periodically plex will change those addresses, add new servers … go to AWS’s land of a thousand server, etc. It’s not sustainable. But it does work …

Being able to manually configure what the published URL should be for remote server access would be ideal. Isn’t that what the custom server access URL is for? Is that feature not working?

I’m not clear about part of this.

You WANT or DO NOT WANT your Plex traffic to use the VPN?

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