Plex server with a VPN

@arrakis2 said:
I really wish there was a VPN setting in the Plex server app :confused:
This seems like a pretty useful feature for people like me that don’t have the technical knowledge but still want the protection of a VPN service.

I agree, there must be a way of setting the NIC you want all traffic for Plex to go out of, or to communicate from

Just today I installed the latest version of VyprVPN on a Mac Mini running my PMS. I’d been reluctant to try to figure out how to set it up and still allow remote access to my Plex server until reading this post. I’d already set up port forwarding in my router, so I decided to install VyprVPN. I made a pleasant discovery and, at least using it on a Mac, I may have found a much simpler way of getting it to work. In VyprVPN Preferences, under the Connection Settings tab, VyprVPN provides a Connection Per App feature. By default, every app uses the VPN’s spoofed address. Quite simply, if you click on Manage Apps, you can select Plex Media Server and set it to bypass the VPN. So far, in my limited testing, my server is still up and available over the Internet using Plex Web and on my phone using the app with cellular data. Apparently, the iP address Plex has been using all along (i.e., the public IP address of my router) is still being communicated properly to Plex for remote connections. I can’t think of any reason why this shouldn’t continue to work. I don’t know if VyprVPN offers similar features on other platforms, but this was too easy, assuming it works.

Hi @gracenote ,
Certainly a good and simple workaround for MAC users.
Unfortunately the Windows (10) version of the Vypr app does not have the “per app” option that you describe.
I just checked it and checked for any new version but no joy. It would certainly be a much easier way if this was available on Windows too. I know the Vypr app on Android includes this option per app too so it’s a pity it is not on Windows.
I might post this on the forums on the Vypr (GoldenFrog) site to see if it is a Windows restriction why this cannot be done or if it will be available in a future update.
Regards,
Sean

I have been playing around with this set up for a few days now and had not got very far until today. I have tried various forum topics on this and none worked.

I have spoken to both noip and my vpn provider and today my vpn provider cracked it. You need to be on a connection that allows port forwarding. I was using a connection that did not have any ports forwarded and it stopped the DUC from establishing an ip. I am running windows and fire stick, iOS app and web all work and using my vpn’s own client to connect.

Thank you for sharing and finding a solution to a problem I’ve had for several months now!

Just to add to my post above, I have been using the no-ip solution for a while and it has been working flawlessly, but one thing to add, if you are using the free noip account it does not come with any ssl which means your connection to plex is not over a secure connection. If you prefer a secure connection then use the https://forums.plex.tv/discussion/comment/602919#Comment_602919
As long as you have your port forwarded as explained in this post it will work and use plex own secure connection as if you didn’t have a VPN

Nice tutorial for those of us avoiding the Nasty Emails from our ISP for Streaming Content to our Family! Thanks alot!

@waynage I’m not so sure about that, when I had it set up that way before I got emails from my ISP that they were gonna shut my internet off.

This solution worked great! Even works with ExpressVPN, you should post this to reddit. Thank you!

I thought I’d update this thread and hopefully save others a MASSIVE headache getting this to work. The solution presented at the start of this thread may work for some applications, but here’s what I wanted to accomplish (using my existing hardware):
I’m running Plex on windows 7 which I call my ‘server’. On this same machine I have Sonnar, Raddar, and NzbGet connected to the various places on the web to download stuff.
I wanted to leave my Plex server open to the friends and family (as well as myself) but run all the other connections through a VPN for safety’s sake.
Also, I run other services that I wanted to be able to easily access using regular port forwarding on my router, this config also accomplishes that goal. I can easily use DDNS to access my server from anywhere I travel.
So here’s what I did:
My server machine has 2 nic cards in it, which will be necessary for this config.
First I flashed my router (Asus RT-N66U) with the latest version of AsusWRT-Merlin (https://asuswrt.lostrealm.ca/) this gave me the ability to use OPENVPN as a client for VyprVPN.
To configure that, you simply load the .ovpn file with the server that’s closest to you from here (https://www.giganews.com/support/vyprvpn/vpn-setup/iphone/openvpn-connect.html) - don’t worry that this list is for iOS, it works perfectly on your router. Use the ‘Import .opvn file’ button at the top, and it’ll set all the parameters correctly for you. Just add your username and password.
Then I added these extra parameters to the ‘Custom Configuration’ section at the bottom (to increase speed) just add them to what’s already there on the list:
persist-key
persist-tun
sndbuf 524288
rcvbuf 524288
push “sndbuf 524288”
push “rcvbuf 524288”
tun-mtu 1500
fast-io
After this click the ‘Apply’ button then when the page refreshes - hit the Service state to ‘ON’ - you should now have a working VPN for your entire LAN and all devices.

Now, here’s where the fun starts… Using Policy rules, we can decide which traffic gets routed through the VPN and what goes straight to my ISP.
To be able to add these rules, drop down the ‘Redirect Internet Traffic’ and select ‘Policy Rules (strict)’ a new box will appear.
In my case I wanted to route my plex traffic straight so I added these policy rules to the OpenVPN Rules:
Description Source IP Destination IP Iface
Home-Server-VPN Ipaddress 2 on server (i.e. 192.168.0.94) 0.0.0.0 VPN
Home-Server Ipaddress 1 on server (i.e. 192.168.0.185) 0.0.0.0 WAN
LAN 192.168.0.0/24 (use your subnet) 0.0.0.0 VPN
Router 192.168.0.1 (my router IP) 0.0.0.0 WAN

This protects all traffic on my lan through the VPN and the Plex server is open without any messing around with it’s config.

Now to protect any connections I want, I use a simple program called ForceBindIP (https://r1ch.net/projects/forcebindip) to start anything I want protected (Giganews Accelerator, uTorrent, ect…) and I bind the program to my VPN protected NIC. All traffic from that application will go through the tunnel - nice and encrypted.
Just follow the instructions on that page, it’s super simple to use.
This setup results with the best of both worlds… protection where I want it, and speed and ease of use when I want that too.

Your mileage may vary, but for me this has worked mint.

Enjoy!!

{c}guy.

@Cguy1234 said:
Enjoy!!

I’ve been trying to use VyprVPN’s Connection Per App’s feature to replicate exactly your setup. Although using ipleak.net I can see that the connection per app feature seems to work, my Plex server remains directly inaccessible from the outside world when VyprVPN is connected. I can’t explain it, can anyone? I’d really love not to have to buy a new router (so I can flash it…) when my current TP-Link C9 does a great job…

Cheers

Good thread and I was having the same issues. I do use dynamic DNS on my router and tried adding the “Custom server access URL” in the Plex Network config but I couldn’t get the server to use them in Remote Access for some reason.

Aside from the interesting DNS workaround proposed here, ultimately it was the “free” VyprVPN NAT Firewall that was causing the issue. It’s on by default and has to be disabled on their web page in the VypVPN/Giganews Control Panel. Once disabled, give it a few minutes, restart the VPN client and the plex server.

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