Keeping Plex remote access up while connecting and disconnecting to a VPN

So I currently have my server running Windows 10 which I RDP into in order to acquire more content. When I turn on my VPN to do so, it messes with the ability to use Plex outside of my network, which is my primary use case. To be specific, when I enable the VPN the remote access does not stop it only buffers the thing being watched at the time. When I turn off the VPN however, the remote access is turned off and I have to reenable it each time manually. I was wondering if there was a way to avoid this and not interrupt streaming quality while downloading things from indexers.

You likely have the option “allow indirect connection through relay” enabled, and when you start the VPN, you’re losing your direct connection to your server and are going through the bandwidth limited Plex Relay.

Since I read your VPN doesn’t support split tunneling and you’re on Windows, there is an easy fix for this…and that is setting up static routes.

This is remarkably easy to do and works perfectly. There is a guide here: How to bypass VPN for specific websites and services on Windows - HideIPVPN services

But here is the gist:

Get the IP address of your router

Open a cmd window (with admin privileges) on windows (search cmd, right click and run as admin)

In the cmd window run:

nslookup plex.tv

Copy/paste the above as is, and press enter

It will return four IP addresses. Use the returned IP addresses and run the following command for each of them:

route -p add plex-IP-here router-IP-here

So would look something like:

route -p add 54.171.208.81 192.168.1.1

Replace “Plex-IP-here” with one of the returned Plex IP addresses, replace “router-IP-here” with your router IP address and press enter. Repeat that four times with each of the Plex IP addresses

What you’re doing is adding a “static route” (and the -p makes it persistent so it remains on restart) so that any calls to any of those IP addresses (Plex in this case) bypass the VPN entirely and are directly routed to your WAN

Does your VPN support split tunelling?

Sorry to necro but thank you! This was my first time searching up the issue and I think we all can appreciate a one and done network problem.

Funny, just recently started having this issue as well. I found if you go to the remote access settings and tell it to refresh there it will reconnect. Why it’s not doing this automatically I’m not sure.

It’s probably stuttering because it’s lost its direct connection and is proxying through plex.tv, which is throttled. Once you connect to the VPN and you know your external address you can add it to Plex so your Plex client knows it can connect to that IP (Settings > Your Server > Network > Custom server access URLs). Of course your VPN provider will have to support you forwarding that port.

Run the apps you want on vpn in a docker, then you can assign the vpn to specific docker apps.

Or be lazy like me and setup a script to turn on vpn during off hours and have Sonarr and Radarr do their thing over night, then turn off vpn and downloading programs before anyone will be up to use plex.

Dockers run differently. You could have individual instances of each running independently. I am a hobbyist/amateur computer geek at best with no formal training. I have been messing around with them since before the internet. I run my Plex in a docker on open media vault which is debian based. I know in my instance I can set up individual Dockers to run on a VPN and have my Plex not. Sorry I can’t be of more help.

So I did this yet my remote access still fails after a bit when my VPN is active. Is there a way to check if this is working as intended? Also, would I need to change anything on the port forwarding settings?

Just want to say this is an awesome reply and helps solve an issue for me too. Thanks!

This - enable split tunnelling on an app level

This setting seems to be asking for a url address instead of an ip address to be inputted. Where would I find a specific url to input

So i just set up a Vm within Oracle VirtualBox but I was wondering the proper way to use the two with plex. For instance, while the VPN is running withing the VM and the plex server is on the host computer, where would I be using the indexer (my caser qbit) and the arr family (prowlarr, sonarr, and radarr)?

From within the Plex server, mine will regularly report as “no remote access”. The easiest way I’ve found to test it, is to simply use the Plex app on my phone, and disable WiFi and use my phone data to stream.

If when you begin to stream the movie/show, if it doesn’t have direct access, you’ll get a message that reads something along the lines of “you’re not accessing your server directly and your speeds will be limited” (can’t remember the exact verbiage, but that’s the gist).

Point is, if you’ve done it correctly, you’ll have direct access, even remotely outside of your LAN, and you’ll still occasionally see Plex reporting their is no remote access. If you disable the relay function in your settings and still have access outside you’re LAN (which you should) you’ll know you’re good.

PS - also restart your PC and VPN after you’ve completed the above steps, and also see my previous reply before doing so.

Thanks brother!! Very happy to hear it helped! Can’t even begin to tell you the headache I had prior to getting this figured out haha.

I use ipvanish and it seems split tunneling works only on fireos and android

There should already be a URL there. You want to add an additional URL that looks just like that, except with your VPN IP. It would look something like https://VPNIP:32400.

I think it was the restart that did it for me thank you so much you are a godsend. One thing I was wondering though was it doesn’t say what Ip addresses are being used. Where it used to say what my public and internal IP addresses were, in their places is “Unkown IP.” Is this to be expected? It still says Fully accessible outside your network on top.

Unfortunately, I jumped the gun and it’s actually not working. I couldn’t tell you why however when following your steps in the first post I ran into no issues and had an “OK” message after each entry