DLNA server is off yet Plex keeps port UDP *:1901 open

Server Version#: 1.32.1.6999
Player Version#: 1.67.2

I disabled the DLNA server in Plex preferences.
https://support.plex.tv/articles/201543147-what-network-ports-do-i-need-to-allow-through-my-firewall/

I also ran chmod -x on the executable at:
/Applications/Plex Media Server.app/Contents/MacOS/Plex DLNA Server

I still see a connection UDP *:1901
With UDP I am not sure what the status of that connection is.

Am I misconstruing the information? Is this a local connection from PMS waiting for the DLNA Server

The article says:

UDP: 1900 (access to the Plex DLNA Server)

zsh% sudo lsof +c 0  -i :1901
COMMAND                   PID USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
Plex\x20Media\x20Server 62718 john   97u  IPv4 0x64c1a6ef4cdbabd3      0t0  UDP *:fjicl-tep-a

This likely has nothing to do with the DLNA server for at least a few reasons:

  • You’ve disabled the DLNA server in the server’s settings; and,
  • You’ve made the DLNA server’s binary non-executable; and,
  • Your lsof output shows that the executable listening on UDP 1901 is Plex Media Server, not Plex DLNA Server.

Based on what you’ve described, you’ve sufficiently neutered the DLNA server.

Having said that, there is currently no way to disable Plex’s use of SSDP (the Simple Service Discovery Protocol) which operates on UDP 1900. It’s used for local server and client discovery and network tuner discovery (and possibly other things). You can disable Settings → [Server Name] → Network → Enable local network discover (GDM) and it will eliminate some traffic, maybe. But the server is always going to send SSDP “discover” requests to 239:255.255.250:1900.

However, regarding UDP port 1901, it’s not a standardized port as far as I can tell. My assumption is that Plex is using it for some internal communication.

Also keep in mind that the article you referenced only describes the ports which should be passed through on any local firewall on the Plex Media Server host itself. On your router, the only port which should ever be passed through for Plex is TCP 32400 (the external port can be whatever you want it to be). (There may be exceptions to this for certain network topologies.)

Is there a specific problem which you’re trying to solve? Or is it a matter of wanting to understand every port Plex uses and for what purpose, and being able to disable it?

1 Like

Thank you for the explanation… can you take a look at this screenshot. I keep a shell script running that displays on my desktop in the background. The shell script is using lsof

With just the Plex server running this is what I see. ( I am connected to a VPN thus the 10.x.x.x address)

It’s mostly UDP connections that I wonder about since those ports are open to every IP address AND looking at the list of ports below that use UDP they all match up except port 1901

  • TCP: 32400 (access to the Plex Media Server) [required]

The following additional ports are also used within the local network for different services:

  • UDP: 1900 (access to the Plex DLNA Server)
  • UDP: 5353 (older Bonjour/Avahi network discovery)
  • TCP: 8324 (controlling Plex for Roku via Plex Companion)
  • UDP: 32410, 32412, 32413, 32414 (current GDM network discovery)
  • TCP: 32469 (access to the Plex DLNA Server)

Unfortunately, I’m not sure what UDP port 1901 is used for in Plex. It’s not a well-known port, unless you count “Fujitsu ICL Terminal Emulator Program A.”

If I had to make a guess, I’d say it’s likely used for some form of device discovery or inter-server/player communication. My own servers show Plex Media Server listening on this port. I performed some packet captures using tcpdump however and they didn’t show any traffic at all.
sudo tcpdump -i any -A -vv udp port 1901

Perhaps someone from Plex will come along and clear up the mystery. Myself, I’m not terribly concerned about it as my router/firewall only passes TCP port 32400.

Sorry I couldn’t be more help.

1 Like

Maybe port 1900 is already in use on macOS for some other process and Plex is just grabbing the next port in order to communicate with the DLNA server (whether it’s running or not? )

Thanks for the command line command. I used that to test my theory and there is indeed stuff happening on port 1900 on my mac, i.e. packets being captured.

12:24:49.903340 IP (tos 0x0, ttl 64, id 50643, offset 0, flags [DF], proto UDP (17), length 366)
    192.168.80.6.ssdp > 192.168.80.195.53760: [udp sum ok] UDP, length 338
8...a...l..c..E..n..@.@.Q...P...P..l...Z..HTTP/1.1 200 OK
CACHE-CONTROL: max-age=120
ST: upnp:rootdevice
USN: uuid:Upnp-BasicDevice-1_0-00166CD4A963::upnp:rootdevice
EXT:
SERVER: Ubuntu/precise UPnP/1.1 MiniUPnPd/1.7
LOCATION: http://192.168.80.6:49152/rootDesc.xml
OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01
01-NLS: 1
BOOTID.UPNP.ORG: 1
CONFIGID.UPNP.ORG: 1337

I see in the packets a few ports so I ran a command. It looks like port 1900 is open and packets are moving. Not sure why I am seeing port 1901 only maybe my original shell script is not right.

05/06/23_12:30:19 /Users/john
0-zsh% lsof -i :49152

05/06/23_12:30:34 /Users/john
1-zsh% lsof +c 0 -i :53760
COMMAND                   PID USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
Plex\x20Media\x20Server 51785 john   97u  IPv4 0x64c1a6ef4cdcd9c3      0t0  UDP 192.168.80.195:53760

Unfortunately, UDP port 1900 (the standard port for SSDP) is always going to be used on your Plex server. There is no way to turn that off. Plex uses SSDP for several things, some of which can be disabled (DLNA being a great example).

However, there is at least one function which cannot be disabled: Device discovery. Specifically, Plex uses SSDP to find UPnP devices such as network tuners (think SiliconDust’s HDHomeRun tuners here). Also, it’s used to discover UPnP-enabled routers for NAT-PmP when remote access is enabled.

There are things you can do with a firewall to block outbound requests to UDP port 1900 (and/or responses from the same). However, there’s no way to tell Plex not to send those requests entirely. It is always going to attempt to send SSDP discovery requests, which will be a multicast to 239.255.255.250:1900. Something like this:

13:43:58.351065 IP (tos 0x0, ttl 1, id 59432, offset 0, flags [none], proto UDP (17), length 129, bad cksum 0 (->d6da)!)
    10.10.0.101.60288 > 239.255.255.250.ssdp: [bad udp cksum 0xfae7 -> 0x1eae!] UDP, length 101
E....(......

.e.......l.m..M-SEARCH * HTTP/1.1
HOST: 239.255.255.250:1900
MAN: "ssdp:discover"
ST: upnp:rootdevice
MX: 5

What you show above is actually the response to one of these multicasts.

These forums are littered with threads regarding questions about this very issue (just search for “SSDP” or “port 1900” or similar). Ultimately, in every one which has been “resolved,” the reporter ended up blocking something, either the actually sending of the requests, or the responses.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.