Quantcast
Channel: Synology — Plex Forums
Viewing all articles
Browse latest Browse all 3609

NAS Synology VPN Bypass Plex

$
0
0

Hi guys,

After several attempts, I finally got my dream setup to work -- and the solution is quite simple!
I've tried everything. So many hours spent at trial and error with iptables. Luckily, several months later, I gave it another go.

What this guide will do:

  • All traffic from Synology Download Station will be through VPN.
  • Direct connections, like Synology WEB GUI, SSH, Plex etc. will go through your regular WAN.
  • All traffic will be Letencrypt SSL certified HTTPS

Make sure you have access to your NAS locally before switching on your VPN.
Also, make sure these ports are forwarded from your home Router to your NAS:

  • 5001 (Synology Web GUI, HTTPS)
  • 32400 (Plex)
  • 80 (for Let's Encrypt verification)

Let's go

  1. Connect your VPN connection from Network > Network Interface > i.e. "VPN - VyprVPN"
  2. Check ON this bad ass mf option: Network > General > Advanced Settings (Gateway): Enable Multiple Gateways
  3. Confirm that your Download Station is downloading with the correct VPN IP using this tool

Cool, eh?

Now, like me, you probably already have a domain set up to your dedicated ISP IP, say example.com.
So, heading over to https://example.com:5000 should be available to you, even if the NAS is connected to VPN.

Plex on the other hand is trying to AutoDiscover your VPN IP, which is why your Plex Media server won't be available through the Plex services. Though, you could access your Plex directly through https://example.com:32400

If you don't have SSL activated for your domain yet, let's do that first!

On your NAS:
1. Security > Certificate > Add
2. Next (Add a new certificate)
3. Next (Get a certificate from Let's Encrypt)
4. Download your certificate files.
5. Now, press Configure (within Security > Certificate) and set your fresh Letsencrypt certificate as Default.

To make Plex available by autodiscover and all your friends, do the following.

  1. At your Plex Server settings, make sure you've specified ur public port manually (Server > Remote Access) to i.e. 32400.
  2. Dont worry about Plex not reaching your server at this page. It never will as long as it tries to autodiscover your VPN IP.
  3. Now, go to Server > Network. We're going to fill example.com into the "Custom certificate domain".

You also need to specify a value for "Custom certificate location".

  1. Connect to your NAS via SSH
  2. Open i.e. /volume1/Plex (wherever you've installed Plex)
  3. Create a folder i.e. certificate
  4. Using your File Station app at your NAS GUI, upload the certificate files you downloaded earlier directly to this folder.
  5. Back into your shell, generate the pfx by writing the following:
    openssl pkcs12 -export -out domain.pfx -in cert.pem -inkey privkey.pem -certfile chain.pem -name "domain"
  6. Head back over to your Plex > Server > Network and type in your complete pfx path
    ie. /volume1/Plex/certificate/domain.pfx
  7. If you typed in any keyphrase, enter this into the "Custom certificate encryption key" field.
  8. Further down on the same page, you'll see "Custom server access URLs". Add your domain https://example.com
  9. Save changes.

Now, this should do the trick.

If you have remarks to this tutorial, please let me know in the comments so I can update it.


Viewing all articles
Browse latest Browse all 3609

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>