Plex Network Activity / Restrict Server Internett Access to Plex Only

After starting my Plex Media Server i have a look in the Resource Monitor to check the Plex network activity and I see that there are a bunch of active connections to remote addresses. This is probably normal, but I just want to understand what is going on. I thought Plex used port 32400?

I also want to restrict the internet traffic on the server where my Plex Server is running to allow for Plex only. Does anyone have any knowledge on how to configure this on the Asus RT-AC66U router, or similar?

TCP Port 32400 is the local port for incoming requests
Outgoing requests could use any local port as source and destination port would be whatever the service that is being connected to uses. 443 is the common https port

Plex Media Server does establish connections to crash reporting server, to the Amazon AWD servers where plex.tv services are hosted and pubub servers which appear as linode servers. There are other systems Plex Media Server connects to for metadata

@sa2000 said:
TCP Port 32400 is the local port for incoming requests
Outgoing requests could use any local port as source and destination port would be whatever the service that is being connected to uses. 443 is the common https port

Plex Media Server does establish connections to crash reporting server, to the Amazon AWD servers where plex.tv services are hosted and pubub servers which appear as linode servers. There are other systems Plex Media Server connects to for metadata

@sa2000 Thanks! I guess that answers the first part of my question. So if I understand you correctly TCP Port 32400 is used when I connect to the server from e.g. a Plex web-client, and the other ports in use are for the Plex server services connections to remote 443 ports. Is outgoing data (e.g. video stream) back to the web-client also using the TCP 32400 port?

(sorry if my questions are phrased poorly, I have limited knowledge on the subject)

Inward connections to the server come into tcp port 32400. Outward communication goes to the port for the service being connected to uses or to the source port of the originator when responding to a request.

Every request has a source port and a destination port. Responses to a received request goes with a destination port that equals to the source port of the request. I do not think you need to concern yourself with how tcp communication works.

There is a support article on ports to allow inbound through the firewall
https://support.plex.tv/articles/201543147-what-network-ports-do-i-need-to-allow-through-my-firewall/

Thank you for clarifying and for the article. It is interesting that the only required port for the inbound connection through the firewall i TCP Port 32400. Is there no outbound reply from the Plex server on the remote HTTPS connections or is the reply happening on the 32400 port (or is there some fundamental principle here i do not fully grasp? I guess that is most likely :smile: )

@“magnus.roekke” said:
Thank you for clarifying and for the article. It is interesting that the only required port for the inbound connection through the firewall i TCP Port 32400. Is there no outbound reply from the Plex server on the remote HTTPS connections or is the reply happening on the 32400 port (or is there some fundamental principle here i do not fully grasp? I guess that is most likely :smile: )

the reply goes to the port that the remote site used as a source port

what is your problem and what are trying to achieve ?

the reply goes to the port that the remote site used as a source port

I am sorry, I messed up that question. It is clear which ports the Plex server uses for outgoing server connections and that the remote ports are 443. What I actually meant to ask is to which port on the Plex server does the services reply? Do they reply to the 32400 port? (since this is the only port for inbound connections required to open in the firewall as pr the referenced article I am assuming so).

what is your problem and what are trying to achieve ?

I am just trying to understand which inbound and outbound ports that are in use and for what on the Plex server. Both because I am curious and because I would like to limit the traffic from/to the Plex server to include only the ports used by Plex (either on the server firewall itself or on the local network router).

What I actually meant to ask is to which port on the Plex server does the services reply? Do they reply to the 32400 port? (since this is the only port for inbound connections required to open in the firewall as pr the referenced article I am assuming so).

The port is opened for new unsolicited requests and that would be what firewalls block.

Once a connection is established then there would be no firewall block and different source port would get used and responses always have source and destination port so they are matched

I am just trying to understand which inbound and outbound ports that are in use and for what on the Plex server. Both because I am curious and because I would like to limit the traffic from/to the Plex server to include only the ports used by Plex (either on the server firewall itself or on the local network router).

That would not be advised

Unsolicited inbound requests on unknown ports would normally get blocked

You can observe the tcp communication using Wireshark if you want to see how it is done