Remote access and PureVPN

Has anyone here had any luck getting Plex to work remotely through PureVPN?

I have my media server set up on a Netgear ReadyNAS 214 that connects through PureVPN, and it all works fine on my local network, but I can’t seem to get it to work remotely. I have left it at the default port of 32400 and have that port forwarded through my router and opened via the PureVPN NAT Firewall add-on.

I sometimes get it connected via Plex’s servers, but I can’t seem to get a direct remote connection through anywhere. Can anyone help me?

VPN useage is directly limited to your VPN provider’s ability to allow port forwarding on their network.

Check to see if/how port forwarding is used for PureVPN…

If it turns out that they do not allow port forwarding, then you will need to check either of these 2 threads depending on your use case (how do you connect… through a router or via a PC based client?).

@CutGlass: Did you get this resolved yet?
Make sure the “route-noexec” directive is added to your “Additional Config” in your VPN settings tab.
Then run the following script:

    MY_PLEX_SERVER_IP=192.168.1.125 # change to your server ip
    MY_TUN=tun1 # change to your vpn tun interface name
    
    ip route flush table 100
    ip route del default table 100
    ip rule del fwmark 1 table 100
    ip route flush cache
    iptables -t mangle -F PREROUTING
    
    for i in /proc/sys/net/ipv4/conf/*/rp_filter ; do
    echo 0 > $i
    done
    
    ip route show table main | grep -Ev ^default | grep -Ev $MY_TUN \
    | while read ROUTE ; do
    ip route add table 100 $ROUTE
    done
    ip route add default table 100 via $(nvram get wan_gateway)
    ip rule add fwmark 1 table 100
    ip route flush cache
    
    iptables -t mangle -A PREROUTING -i br0 -s $MY_PLEX_SERVER_IP -j MARK --set-mark 0
    iptables -t mangle -A PREROUTING -i br0 -s $MY_PLEX_SERVER_IP -p tcp -m tcp --sport 32400 -j MARK --set-mark 1
    iptables -t mangle -A PREROUTING -i br0 -s $MY_PLEX_SERVER_IP -p tcp -m multiport --dport 443,80 -d plex.tv -j MARK --set-mark 1

This will redirect the traffic from your Plex server to the VPN - except for the plex traffic [which will still use the WAN interface]

@AdamSigel said:
@CutGlass: Did you get this resolved yet?
Make sure the “route-noexec” directive is added to your “Additional Config” in your VPN settings tab.
Then run the following script:

    MY_PLEX_SERVER_IP=192.168.1.125 # change to your server ip
    MY_TUN=tun1 # change to your vpn tun interface name
    
    ip route flush table 100
    ip route del default table 100
    ip rule del fwmark 1 table 100
    ip route flush cache
    iptables -t mangle -F PREROUTING
    
    for i in /proc/sys/net/ipv4/conf/*/rp_filter ; do
    echo 0 > $i
    done
    
    ip route show table main | grep -Ev ^default | grep -Ev $MY_TUN \
    | while read ROUTE ; do
    ip route add table 100 $ROUTE
    done
    ip route add default table 100 via $(nvram get wan_gateway)
    ip rule add fwmark 1 table 100
    ip route flush cache
    
    iptables -t mangle -A PREROUTING -i br0 -s $MY_PLEX_SERVER_IP -j MARK --set-mark 0
    iptables -t mangle -A PREROUTING -i br0 -s $MY_PLEX_SERVER_IP -p tcp -m tcp --sport 32400 -j MARK --set-mark 1
    iptables -t mangle -A PREROUTING -i br0 -s $MY_PLEX_SERVER_IP -p tcp -m multiport --dport 443,80 -d plex.tv -j MARK --set-mark 1

This will redirect the traffic from your Plex server to the VPN - except for the plex traffic [which will still use the WAN interface]

There is no option in the PureVPN app to add “Additional Config” like this. Any ide on how to make plex to work with PureVPN?

The “Additional Config” section is in the openvpn settings for router firmware like DD-WRT or Tomato.
The router establishes the “always on” vpn connection, not your pc.
I do use PureVPN, but I do not use the app.

Hi,
I’m experiencing a similar issue. I’m running my PMS on a Raspberri Pi and the PureVPN is configured on the PI itself through pptp. Do you know how to “translate” this solution to my configuration?

Thanks!

@Thronic said:
For Windows and Debian/Ubuntu based distributions I use my own software in my sig to bypass the VPN. A static route did not work when I made it, and probably won’t (reliably) still, as Plex uses load balancing and rotates their IP addresses a lot. The software keeps track of it and dynamically keeps all routes updated for you. All Plex domains involved should come preconfigured as I created it primarily for that. Tcpdump can help track down new ones that may be needed down the road or other hostnames you may want to bypass as well.

just tried your app, doesn’t seem to work. Plex still shows the VPN IP and says no direct connections.