Plex, PIA, and Port Forwarding

Hey everyone. So last night I just set up PIA. I found out this morning my Plex server was no longer able to communicate outside of my own network.

I did some brief research and figured out how to enable port forwarding for PIA, however, the ports provided still won't allow Plex to connect remotely. 

Ideally, I would have Plex bypass PIA altogether because I don't really need that on the VPN. 

So this leads me to two questions:
1. How can I get Plex to communicate while using PIA?
2. How can I get Plex to bypass PIA entirely?


  • If PIA is on the workstation, and not a router, there is a good solution.  Google Xflak.  This is the author of a script and instructions to use the task scheduler to run it.  It checks the IPs of the PLEX servers, and updates the routing table accordingly.  I have been using it for a while, it's brilliant.

  • Posts: 1
    I had Plex remote working with PIA until the last few months.  One day it stopped functioning.  I believe it was when the port of Canada, Toronto changed.  I attempted to change the forwarded port in my router but to no avail.  I have tried Xflak and it still will not work.  I run plex media server on my main machine and am using windows 10 with a linksys E4500 router.  I got $20 in paypal if someone can get it working again.  It is very frustrating when I have a deluge, Sonarr setup that can't be utilized.  -- Adam
  • Posts: 2
    I set it all up on Ubuntu last night and there seemed to be a lot of confusion about how to do it.  Here's the solution.
    This set up assumes that both Plex and OpenVPN runs on the same box.  You can do it on a router with some modification. 

    Add this to your OpenVPN config file: ( is your router gateway with port 32400 forwarded to your plex server).


    restart OpenVPN (If you have no kill switch firewall, plex remote access should work now.)

    If you have a ufw kill switch firewall:

    ufw allow from port 32400 proto tcp

    ufw allow from port 32400 proto tcp

    ufw allow from port 32400 proto tcp

    ufw allow from port 32400 proto tcp

    ufw allow from port 32400 proto tcp

    ufw allow from port 32400 proto tcp

    If/when Plex adds/removes/changes ip's for this will stop working so you'll have to look there if it suddenly doesn't work anymore.

Sign In or Register to comment.