How to set up Plex to work with PIA VPN?

server-mac

#1

Hi,

I am really struggling to find a solution to get this to work, so any help will be greatly appreciated.

I want to to be able to remotely use Plex, which is based on my Mac without having to turn my VPN off. Plex says the server is remotely accessible but it isn't.

I am using:
Mac - El Capitan
Apple Airport Extreme router
PIA VPN

Is this possible? If so, I could really do with an ELI5 solution.


#2

@Wermhatt said:
Hi,

I am really struggling to find a solution to get this to work, so any help will be greatly appreciated.

I want to to be able to remotely use Plex, which is based on my Mac without having to turn my VPN off. Plex says the server is remotely accessible but it isn’t.

I am using:
Mac - El Capitan
Apple Airport Extreme router
PIA VPN

Is this possible? If so, I could really do with an ELI5 solution.

I believe if you want it to work Universally in your network you must set it up in a compliant router. The airport will not do the job.


#3

You can do it locally on your mac without changing your router using pf anchors.

In PIA - Look at directions to enable port forwarding (must use assigned servers).

On your Mac:

Using terminal create a file in /etc/pf.anchors/plex.pia. run the following command:

sudo nano /etc/pf.anchors/plex.pia

in nano, copy the following:
#replace MYPORT, with the PIA forwarded port
#replace en0 with whatever your local interface is
#replace utun1 with whatever interface PIA is mapped to. Use ifconfig if you dont know
rdr pass on en0 inet proto tcp from any to any port MYPORT -> 127.0.0.1 port 32400
rdr pass on utun1 inet proto tcp from any to any port MYPORT -> 127.0.0.1 port 32400

Create a pf config file by using the following command:

sudo nano /etc/pf.plex.conf

Copy this into it:

rdr-anchor “my-plex”
load anchor “my-plex” from “/etc/pf.anchors/my.plex.vpn.forward”

Start pf by running:

sudo pfctl -ef /etc/pf.plex.conf

In Plex:

Go to settings -> server -> remote access and manually put in whatever your PIA forwarded port is (same as MYPORT above).

Hope this helps.


#4

@Tutu thank you so much for this, it feels like the closest I’ve been to solving this issue. I’m getting an error when I try to start pf at the end.

No ALTQ support in kernel
ALTQ related functions disabled
pfctl: /etc/pf.anchors/my.plex.vpn.forward: No such file or directory
pfctl: cannot open the main config file!: No such file or directory
pfctl: Syntax error in config file: pf rules not loaded
pfctl: load anchors

I was wondering if you might be able to help push me in the right direction on how I can correct it.


#5

Oh and it had this before the other lines I sent

pfctl: Use of -f option, could result in flushing of rules
present in the main ruleset added by the system at startup.
See /etc/pf.conf for further details.


#6

I am getting the same result as Sean_Cez

sudo pfctl -ef /etc/pf.plex.conf
pfctl: Use of -f option, could result in flushing of rules
present in the main ruleset added by the system at startup
See /etc/pf.conf for further details

No ALTQ support in kernel
ALTQ related functions disabled
pfctl: /etc/pf.anchors/my.plex.vpn.forward: No such file or directory
pfctl: cannot open the main config file!: No such file or directory
pfctl: Syntax error in config file: pf rules not loaded
pfctl: load anchors

I followed directions while in my user account using su in terminal to create the files mentioned above. I am wondering if these are not accessible from the user account after creation? Can anyone think of another reason we would get these errors following those directions? Thanks for help.


#7

Tutu,

You made some errors above when you copied the information from this site: