Can't fling while connected remotely, Plex says connection is OK

Server Version#: 1.20.1.3252
Player Version#:

I have searched high and low and can’t find a solution to my problem. Any help is appreciated. I have my dedicated Plex machine set up so that I can access it remotely and stream movies when connected from outside of my network. This works fine within a browser on a laptop. When I try to access my Plex on my iPhone, I can stream movies to my iPhone, so that works fine also. However, when I want to cast movie to Chromecast or Apple TV, it only works from within my network, it doesn’t work from outside of my network.

Network: No public IPv4, local provider did however publish a port for me under their domain (you can see where this is going). So my remote access to Plex is like “http://port.provider.com:12345” This is forwarded to Ubiquiti dish (provider’s hardware), which presents first NAT. Behind this dish is my own ASUS router, which presents second NAT. Ubiquiti forwards port 12345 from outside to port 12345 on ASUS router. ASUS router forwards port 12345 from outside to port 32400 on the Plex machine.

Plex: In Plex settings, I have enabled “Manually specify public port” and entered value 12345. Since my public IPv4 is an IP of some node that my provider manages (and could change), I have also enabled the option “Custom server access URLs” and entered value of: “http://port.provider.com:12345”.

Again, with this setup, I can connect remotely :white_check_mark: just fine from both laptop’s browser :white_check_mark: and from my phone also :white_check_mark:. When I visit my friend’s house, I can connect to their Wi-Fi with my phone and stream movies to my phone :white_check_mark:. When I click “Cast” button in my phone and I want to fling the movie to their LG TV sitting on their local network, the Plex App on their TV loads for a bit and then says “SERVER is currently offline” :x:.

Interestingly, when I go into my Plex Settings console, and I go into Remote Access, I see this:

But when I click retry, I can see this:

The green status will last anywhere between several minutes and several hours before it goes to red, but the server is available outside the network at all times, I have no problems accessing it on my laptop or on my phone. It’s just the casting feature that never works.

I have the same problem too with my Plex Media Server running on Server 2019.

The internet connection has a red X, I suspect plex is having an issue.

In your text, you said the port forwarding used :12345, but in the screenshot it shows :5206. Because your server is accessible, I assume the ISP and router port forwarding is actually on :5206, and :12345 was just an example?

Is the “Custom server access URL” an IP address or an FQDN?

I’m wondering about SSL. I don’t think Plex would get a magical one for port.provider.com anyway. I imagine that the specified custom URL is used when casting, and I wonder if that could be the hitch.

On the server and Plex app, you might test with Secure connections set to Preferred if they are currently Required.

Have you verified that port.provider.com:5206 (or :12345?) is accessible? https://canyouseeme.org/ is helpful.

I’m also wondering if your ISP is using designated CGNAT IP addressing, or their assigned addresses but behind CGNAT, or if they’re hijacking other address space. What are the first couple octets of the public IP address that Plex reports? Is it 100.64.x.x?

Correct.

FQDN. It is the “port.provider.com:5206” mentioned earlier. Both http and https links work. If I were to send you a link in a PM right now, you would be able to watch my movie library on your laptop. To be crystal clear, this is how it’s set:

2020-09-30_004715

They are already set to Preferred.

Yes, it is fully accessible. I have friends that connect through that link. They get a warning that Plex is hosted elsewhere and to continue at their own risk:

2020-09-30_003646

However, the service canyouseeme.org only allows checking IP address. Again, I don’t have a a reserved public IP address, I have a domain. If I go to the canyouseeme.org, it automatically fills in my public IP, which is some node mile away from me, serving as public IP for bambillion other users. If you try to access that IP with the port 5206, it still won’t work. It only works if I access it through the FQDN mentioned above. For the argument’s sake, say the FQDN in question really is “http://port.provider.com:5206”. If I run a tracert http://port.provider.com, it will end up with a hop to something like mer-10.224.86.39.provider.com at 10.224.86.39 public IP. Not my public IP. The domain’s public IP. If I try to enter mer-10.224.86.39.provider.com:5206 into my browser, it will work and open my Plex. Also, if I enter 10.224.86.39:5206 into my browser, it will work also. However, my public IP isn’t 10.224.86.39. This could be why Plex is having issues. The App running on my server will claim that it is accessible under 10.224.86.39:5206. But when the server actually talks to Plex.tv service, it will be coming from some random public IP. Plex.tv would the have to be able to understand, that it needs to talk to me over one address, but expect responses from another. Does this make sense?

So to reiterate the problem my users are having: They can then log in with their Plex account that I have invited and they can watch movies. But they can’t fling the movie to their TV. The TV will launch Plex App and it will just say “servername” is currently offline. If I’m chillin’ on my own couch at home connected to my own network, I can fling movies to my Chromecast just fine, both from iPhone and some generic Android tablet. If I then go to my friends house, connect to their network, my phone can still stream movies from my Plex just fine, but it, too, can’t fling the stream to my friends TV. Individual devices can access my Plex, but Plex TV App on Chromecast, AppleTV, Android TV, can’t.

Yes I understand. Complicated. I think you’ve done everything correctly.

When a server connects to MyPlex the apparent IP address is tested for reachability. That won’t be your router’s outside address because of CGNAT, and the ISP’s “bambillion other users” (how many is a bambillion?) address doesn’t have port forwarding, so it won’t be added.

I don’t know if a connectivity test is performed for the “Custom server access URLs” or if they are registered blindly. But it’s obviously being registered, because your server is accessible remotely.

It’s definitely interesting that it works directly, but not for “flung” media.

I wonder if it’s worth looking more at the “Secure …” and “Allow Fallback to Insecure Connections” settings on the remote clients, and making sure Fallback is Always allowed.

I don’t know how flinging works - I assume the media URL is passed to the target, which goes and fetches the media to play. I imagine the target device settings for security then apply. But it’s obviously behaving differently. :-/

It would be interesting to capture and share logs from the target devices you are flinging/casting to.

You can also try using the .plex.direct certificate Plex gets automagically. That would enable secure connections to work.

I imagine port.provider.com is using a static IP address, right?

That means you can look up that IP address, and can enter this in your Custom server access urls...:

https://[ip-ad-dr-es].[yourhash].plex.direct:5206

Look up the IP address for port.provider.com, replace the dots with dashes.

Get the hash by visiting your server’s https://internal.ip.add.ress:32400 and looking at the certificate. (Or by looking at the CertificateUUID in the registry, but that’s harder.)

It should look like this:

https://123-123-123-123.229garbage405a9b.plex.direct:5206

This actually works. My friend has confirmed they can open the Plex app on their Android phone, click the cast icon, launch Plex App on their Android TV, pick a movie and watch it in their desired quality setting. I’m waiting for my other friend to confirm it works on his Apple TV (will confirm).

Thanks for the help! Hopefully this thread will help others in the future.

UPDATE: I can confirm this works for everyone now. We were able to watch 4K documentary remotely on Apple TV, through Apple TV Plex App.