Working VPN Setup using Dynamic DNS Addresses

I have a working environment for a Plex Server behind an Openvpn setup:

Edit: this can probably be done in various ways using a dynamic dns service, one router, and a vpn app. Read the whole post and then experiment with your own setup. Again, a dynamic dns and adding the dynamic dns to the plex/settings/network setting for “other urls” should work using “http://your dynamic dns address” as the format to enter in the setting for “other urls”. You won’t ever see in “remote settings” that plex is visible outside your network, but give a remote connection 20 seconds and you will see your screen populate with all your stream posters and streaming options. What you have is an “indirect connection” which plex will indicate. But all your streaming works flawlessly.

For this post, I wanted a router behind a router dedicated to openvpn for an easy wifi or ethernet connection via the vpn dedicated router. This uses 2 routers, with the second router connected to the first (main) router as a dhcp client. Before starting, be aware that you will need 2 dynamic dns addresses and a way to run one as a service on the main router and the other dynamic address on the second router. My setup is described below. From the beginning I desired to have a second router on my home net dedicated as an openvpn internet connection for privacy when I needed it. Later I decided I needed to run my Plex server behind the openvpn router connection for my own needs protect to my Plex streams. Yes, your bandwidth / speed in this environment is decreased due to the architecture of running a router behind a router, but for my needs, I have not had any performance issues.

I use a dd-wrt router behind my main router (via ethernet) with a different subnet address than the main router

I setup openvpn on the dd-wrt router with my vpn service provider, booted router to openvpn with verified ip address in another state

I Use a Windows 10 desktop for Plex server via ethernet to the dd-wrt router. Go to your ip settings for your ethernet connection / ipv4 setting / and change the setup to a static ip address with the gateway as your dd-wrt subnet address.

On the main router, Port forward 32400 to dd-wrt router ip using the assigned ip given to the dd-wrt router by the main router dhcp service

Again, on the Windows 10 Plex server setup the ipv4 service as a static ip address with the gateway being the dd-wrt router subnet. turn off wifi or be sure to disable somehow the Windows 10 pc reverting over to connect to the main router. Using an ethernet connection with wifi turned off works better for me to be sure of it. I like redundant instructions!

On the dd-wrt router Port forward 32400 to the Windows 10 plex server static ip address from #5 / #7 above

Go to noip.com and signup for 2 free dns addresses and download the Windows DUC client on the Windows 10 Plex machine and setup the service to handle one of the addresses you just setup with noip.com. Run the DUC client and choose (check mark) the first dynamic dns address for your Plex machine.

This is required: if your main router has a setup feature allowing the use of a dynamic dns (hopefully it does), enter that information into the main router’s setup using the second free dns address you got from noip.com. (Note: Not sure this will work if you can’t do this!! You can always covert your main router to a dd-wrt router and do this). So, now the main router has a dynamic dns, and the openvpn router has a separate dynamic dns address.

Important!! Open the Plex server app on the Windows 10 plex machine, and go to settings/network. Down the page there is an option called “Custom server access URLs”. In the blank space enter the 2 noip dns accounts you setup using the “http:// plus the exact free address you were given” protocol to enter the free dns addresses and “save”

On the Plex Setup/Remote Access settings page, be sure to check the box for “manually specify public port as 32400”. This is important

At this point, note that your Plex /settings/ remote access settings indicator will always say “remote access not available”. Just ignore that because it will always say that, but it is wrong!

use a remote device and open your Plex app. For windows machines, log out of your plex account and log back in. For android, go to the settings and force close the app and clear the cache. This is important and takes 2 seconds to do. Remember to clear the cache and NOT the data!

Open Plex on a remote device and wait for it to connect to your Plex server. It will say “not reachable”, but just wait. In 60 seconds or less it will connect and all of your Plex services should work. You will get a message that you are not connected directly to your server and that some streams may be of lesser quality. Just ignore and proceed to use Plex on your device

Remember, wait at least a minute but if your Plex remote app never connects, then play with the settings on your server. The dynamic dns service is what makes this all work. This setup is not difficult to do. i am not that tech savy, but i figured out that dynamic dns addresses would make running plex behind a vpn workable, and sure enough it works for me. Hope it works for you. Remember, your plex server will always say remote access is not available because Plex can’t see the dynamic dns setup in their network, but despite that, it will work!!

You may ask why put a Plex server behind a vpn? For me, I like streaming and doing so behind a vpn makes me more comfortable. That’s just me. Besides, I just like figuring things out.

I also wanted a router designated to vpn use only so I could connect my phone, ipad and other devices and have a vpn connection. I realize I could use an app and achieve the same thing, but this made it much simpler for me. So, if I don’t care about privacy, I just connect via wifi to my main router. If I want vpn level privacy then I connect to my openvpn dd-wrt router. My openvpn connection stays “up” 24/7 and it has yet to go down. I check my IP address periodically to verify it is still up. VERY pleased with this setup.

19: In theory this should also work on a single DHCP router connected to a Windows PC running a Plex server. Most vpn providers have a windows app. Again, use a dynamic dns with the ability run a DUC app to keep the dynamic dns updated. When you start your vpn app, the DUN will update your vpn dns address. Again, add the dynamic dns to Plex settings/network down the page where there is a block to enter the dynamic dns address in an http:// format. Lastly on your router be sure to port forward port 32400 to the static ip you setup on your Plex server pc. Again Plex setup on the remote access page will always say Plex is not available remotely, but just ignore that and when using Plex remotely just give it a minute to connect to the server with vpn running. The Plex routing through the free dynamic dns addresses takes a minute to connect. Once connected your remote Plex app should populate quickly with your posters for your streams. In my use remotely, Plex functions flawlessly. Lastly I’m no expert, just a tinkerer. Given that a dynamic dns was the key that made accessing Plex behind a vpn for me, I’m sure there are many other ways to get similar results knowing now how to overcome the dns problem in Plex. My goal was to design a setup that didn’t require me to do daily or periodic updates or checks to keep it working. I’ve tested remote access to my Plex server behind my open vpn router with my android phone, my iPad, my office pc, and at my lake house. In every case my access to my Plex server and streaming works flawlessly, even with HD streams.

3 Likes

Thanks for the guide here - I have a quick question on this regarding my infrasturcture.

My ISP modem is not the best, and currently have a Amplifi bridged to it for better wifi etc
I just checked my ISP modem settings and could see you can add DynDns.org server and option to add your username details. However it does not have any VPN option direct in there.

The question is if I use the ISP modem with a dynamic IP set in there, and a win 10 VPN app like PureVPN for example - would this make my ISP Modem VPN? for example - my Amplifi connected as bridge will it go through the app of the VPN or only my win 10 machine?

that’s sort of above my paygrade. However, seems to me that by running your vpn client on your windows 10 machine, anything done on that machine should filter through your vpn client and be subject to that protection. the function of your isp modem is still just your internet gateway where your isp provides your public dns address. So you don’t have a router with a firewall, or is your isp modem also the router? Am assuming your isp modem is also both modem and router/firewall. So you should proceed with testing running your plex server on your win 10 machine with your vpn client running. It will be trial and error from that point. Don’t forget to forward port 32400 in whatever you are using for a router.

My ISP modem is aldo router - i just turned off wifo and added an Amplifi for my wifi as its much better than the stock ISP modem/routers.

I have been looking around still and maybe I can set up a PfSense server, avoiding the need to an extra or change router and use your DNS idea… looking into this in more details now.

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