I have a Raspberry Pi 4 acting as my Plex Media Server because I don’t currently need any transcoding. The RPi is also connected to a VPN via OpenVPN. PMS works fine on the local network, as expected. The issue is Remote Access (which is unsurprising, based on what I’ve read).
My router currently forwards a random port to my RPi’s IP and TCP port 32400 and I have manually set this public port in the PMS settings. Remote Access shows working for 1-2 seconds, then reports that it is “Not available outside your network”. The page shows the correct private IP (set at the router), but shows the public IP as my VPN IP, not the public IP from my ISP. Disabling the VPN changes the public IP and Remote Access works fine.
How do I work around this? I feel like the answer is a series of iptables rules, but I’m not sure where to start. My router is also set up to use DDNS. I feel like the “right” way to do this is to get Plex to use the public IP so that I can access it via something like myrpi.dyndns.com:12345, but maybe that’s not possible (or not a good idea)? I also feel like it would be awesome of I could specify use of the eth0 or tun0 interfaces, so I’m not dealing with IPs. Or maybe just using an IP range?
Anyway, any help would be greatly appreciated! This thread seems to be pretty close to what I want, but I’m not familiar enough with it to modify the commands to fit my needs: Remote Access with DD-WRT OpenVPN Client - #20 by kdecoster1
Thanks in advance!