[[NordVPN]]
[[Plex Media Server]]
[[Mullvad VPN]]
I want to keep my [[Plex Media Server]] server (running on my PC, Ubuntu 22.04) accessible within my local network (specifically my Apple TV) while my PC is still connected to [[Mullvad VPN]]. As of now, if my VPN is connected, media is streamed through Plex's relay, which crushes the quality. Some VPNs allow for split tunneling, where you can choose which applications or addresses are routed through the VPN and which are not. This feature allows specific applications or IP addresses to bypass the VPN tunnel, ensuring direct local network connectivity.
NordVPN does not natively support split tunneling on Linux, so it will need to be done manually.
setting up your Plex server to be accessible within your local network while your PC is connected to NordVPN. The key here is to use the split tunneling feature offered by NordVPN. This feature allows specific applications or IP addresses to bypass the VPN tunnel, ensuring direct local network connectivity.
Here's a step-by-step guide to achieve this:
1. **Install and Configure NordVPN**:
- Make sure NordVPN is installed on your Ubuntu PC.
- Open NordVPN and log in with your credentials.
2. **Enable Split Tunneling**:
- NordVPN's application for Linux does not have a GUI that allows easy configuration of split tunneling. Therefore, you'll need to configure it via the command line.
- You can use the `nordvpn whitelist` command to add specific ports, subnets, or applications to bypass the VPN.
- Since Plex primarily uses port 32400 for local traffic, you could whitelist this port. For instance, use the command:
bashCopy code
`nordvpn whitelist add port 32400`
- Alternatively, you could whitelist your entire local subnet. For example, if your local network is on the 192.168.1.0/24 subnet, use:
bashCopy code
`nordvpn whitelist add subnet 192.168.1.0/24`
- If you're not sure about your local network subnet, you can find it by running `ip addr` and looking for your local network interface.
3. **Configure Plex**:
- Ensure that your Plex server is set up correctly to allow local network discovery. Go to Plex Server settings, navigate to `Network`, and check the `LAN Networks` and `List of IP addresses and networks that are allowed without auth` settings. Add your local subnet if it's not already listed.
4. **Restart Services**:
- After making these changes, it might be necessary to restart the NordVPN service and your Plex Media Server to ensure the new settings take effect.
5. **Test the Configuration**:
- Connect your PC to NordVPN.
- Attempt to access your Plex server from your Apple TV. It should now connect directly over your local network, bypassing the VPN for local traffic, which will prevent streaming through Plex's relay and maintain the quality of your media.
6. **Troubleshooting**:
- If you encounter issues, double-check your whitelist settings in NordVPN.
- Ensure that your firewall settings on Ubuntu are not blocking the necessary Plex ports.
Remember, the effectiveness of this setup can depend on your specific network configuration and the behavior of your VPN client. NordVPN’s command-line interface and features may update over time, so it’s a good practice to refer to the latest NordVPN documentation for any new options or changes in commands.