If you have not already, we suggest setting your Plex username to something else rather than email which is displayed on your posts in forum. You can change the username at https://app.plex.tv/desktop#!/account
Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

The problem with VPN for Opera based devices

mattseeleymattseeley HawaiiPosts: 1,377Members, Plex Employee, Plex Pass, Plex Ninja Plex Employee

Running Plex Media server on a computer which is also running VPN software causes some very real headaches for TV app users on some Opera based devices including but not limited to those from SONY and VIZIO. Here's what is happening and what we're doing about it.

Why is there a problem in the first case?

We need to work around problems caused by televisions running the Plex app through the Opera SDK. This SDK has a network protection protocol call "Cross Network Protection" enabled by default. Opera implemented this by themselves in 2012 then promptly proceeded to bury and/or ignore all online references to it. The only references remaining are in the Archive.org WayBackMachine. Incredulously Opera left it enabled by default in the Opera SDK.

The protection disallows websites from hacking insecure routers on home (private) networks. Or in our case, the protection disallows the Plex application from legitimately communicating with the media server on your home network. If our application tries to directly communicate with the private IP used by any other Plex client, the TV immediately exits the application and shows a scary "Network Error" dialog. The protection also does the same thing we attempt to access any private IP. I kid you not.

Okay, what do VPNs have to do with this?

When Plex Media Server (PMS) starts up, or after a network changes, it publishes its private (LAN) IP and public (WAN) IP to plex.tv. When PMS is running on a computer with a VPN the public address is that of the VPN.

Later when the app starts up it requests server information from our website. The information is filtered to include remote servers and those with the same public IP as the startup request. And, that's the issue right there. To us the server and television look to be on different networks. We can't tell them apart.

Additionally computers on VPNs sometimes have multiple private IPs. One private IP is the expected LAN IP for the media server. The other is the private IP of the VPN network. Only the former is accessible from the smart TV device yet our code doesn't have enough information to choose which IP is safe to connect to. Instead of risking the dreaded "Network Error" screen we stop further connection attempts to the server.

What can I do about it?

Disable your VPN software then start PMS. Then you can reenable your VPN. You'll need to do the same steps as frequently as you sign out of your media server or change networks. We know it's handy to run PMS and VPN apps on the same always-on computer. So, what are we going to do about it?

Grrrrr, what is Plex doing about it?!

Well, we're going to need your help. During connection attempts we can ask you to pick which IP is the safe IP to connect to. This is challenging as connection attempts frequently happen in the background and IPs can change unexpectedly when not static.

We're also considering support for manual IP entry on TV devices. Although recovering from a bad or stale IP is difficult. 

Hope this context helps communicate the VPN situation.

(Please no private messages for support unless requested, please)

This discussion has been closed.