How does plex obtain external IP address?


#1

I don't know if it uses an HTTP(S) GET request or the like. I'd like to know how, because I have a VPN and I don't want to send my plex traffic through it. But simply allowing port 32400 to bypass the VPN is not enough, because it accidently registers the VPN IP instead of my ISP one.

Do I need to allow the plex server to communicate out on port 80 and 443 as well?

Thanks.


#2

Just did a packet capture and some tests.

It uses an HTTP request to obtain the external IP address from a “plex.tv” server.

The pcap also has some 443 (HTTPS) traffic to plex.tv and amazonaws.com. So I’m guessing both are required for the remote access feature to work.

With port 80 off the VPN it obtains the correct external address, but is unable to make a direct connection.
With both 80 and 443 off the VPN, it’s able to work.

I’m assuming it makes the initial connection with 80 to get the external IP, but because the remote access connection is brokered by an amazon AWS server, there is an additional test using AWS to try and make a connection.

Cheers!