I need to access my Plex server from Rokus and android players at two locations. I have no desire or intention to poke a hole in my firewall for the Plex port or get the corporate Plex servers involved in any way, so I’m not going to use the Remote Access feature.
Instead I set up an SSH tunnel from location B to location A (where the server is). It’s running on an always-on machine (“the bridge”) physically connected to location B’s LAN with a command that looks like:
ssh -p [location A ssh port] -L 0.0.0.0:32400:[plex server IP on LAN A]:32400 [location A IP]
For anyone not up on their SSH, that makes [the bridge]:32400 forward all traffic from LAN B to [plex server]:32400. As far as anything on LAN B is concerned, there’s a plex server running on [the bridge]:32400.
This worked great when I first set it up the other day. The only oddity was that the players didn’t detect the server on the network automatically like they would any other server I started up here - I had to use the “manual setup” feature and add [the bridge’s IP]. I still don’t understand why. If I start a Plex server on my laptop at location B they all see it immediately. As far as they’re concerned this shouldn’t look any different. It should be completely transparent to them.
The connection went down briefly the other day as I restarted the router for unrelated reasons. When it came back up I ran the command to establish the tunnel again. It connected to location A fine, and in a web browser I can access [the bridge IP]:32400 and get the Plex web ui with no problem.
But none of the Rokus or android devices at location B can see the Plex server anymore. They all claim the server is offline, even when I tell them to retry the connection. [the bridge IP] hasn’t changed, and they all still have it configured in their manual setup. Absolutely nothing about the connection, the network setup or the Plex server has changed.
If I watch the ssh tunnel session in a terminal, I occasionally see traffic from my laptop (where I have Plex web open for the server) but I never see traffic from the IPs of the Rokus or android devices, even when I’ve just told them to refresh. They’re obviously not even trying to connect to [the bridge ip].
Plex must be monkeying around trying to “magically” do something behind the scenes instead of just a straightforward connection to the port like you would expect. I’ve noticed that when I’m testing with my laptop, if I connect to the web interface on the real Plex server and then switch and connect to the one on my laptop, I still see the real server’s libraries and settings until I explicitly switch to the laptop’s. Even though it’s my laptop’s instance of Plex I’m looking at.
Call me crazy, but when I connect to an instance of a web app I expect to be managing that instance, not logging into some weird floating umbrella app that’s trying to manage every instance of that web app I own. Anyway, I can only speculate that something like that is related to the problem.
I found similar issues in the forum (like this one) but nothing helpful. The resolution there was “an upgrade fixed it”, but that’s from 2015 and I’m running 1.21.0.3616.
This same tunnel setup would work fine with virtually any other web app. I’ve got several others running this way with absolutely no problems. But as always Plex has to do something weird and break everything…
To sum up:
-
Port 32400 isn’t being blocked by the ISP or router - or if it was it would be irrelevant. The actual connection is to my ssh port, which is not blocked and working fine.
-
There’s no problem with the tunnel or the Plex server - I can connect to the server on port 32400 through the tunnel just fine as long as I do it from a web browser.
-
Nothing has been changed on the server.
-
Nothing has been changed on the apps.
-
It worked just fine a couple days ago.
Tearing my hair out.
Edits - forum ate a bunch of my markup