Jump to content


Photo

DLNA Port Usage


  • Please log in to reply
8 replies to this topic

#1 EddieA

EddieA

    Member

  • Members
  • PipPip
  • 99 posts

Posted 04 January 2013 - 08:13 PM

I'm trying to find out what ports I have to open in my firewall to make sure the DLNA server runs correctly. Even though all the traffic is on my local network, the server where I run Plex still blocks access to services it doesn't know of, and so I need to open up all the required ports.

I found this in the FAQ which says:
What network ports do I need to allow through my firewall to enable access?

TCP 32400 (for access to the Plex Media Server)

UDP 1900 (for access to the Plex DLNA Server)

UDP 32469 (for access to the Plex DLNA Server)

UDP 5353 (for Bonjour/Avahi if you are using these products for service discovery)
Here's what I currently see in my system:
sudo netstat -tulpn | grep 'Plex DLNA' | sort -V -k 1,4
tcp        0      0 0.0.0.0:1221            0.0.0.0:*               LISTEN      23369/Plex DLNA Ser
tcp        0      0 0.0.0.0:32469           0.0.0.0:*               LISTEN      23369/Plex DLNA Ser
udp        0      0 0.0.0.0:1900            0.0.0.0:*                           23369/Plex DLNA Ser
udp        0      0 0.0.0.0:4459            0.0.0.0:*                           23369/Plex DLNA Ser
udp        0      0 0.0.0.0:7016            0.0.0.0:*                           23369/Plex DLNA Ser
udp        0      0 0.0.0.0:7793            0.0.0.0:*                           23369/Plex DLNA Ser
udp        0      0 0.0.0.0:7854            0.0.0.0:*                           23369/Plex DLNA Ser
udp        0      0 0.0.0.0:7878            0.0.0.0:*                           23369/Plex DLNA Ser
udp        0      0 0.0.0.0:14316           0.0.0.0:*                           23369/Plex DLNA Ser
udp        0      0 0.0.0.0:37078           0.0.0.0:*                           23369/Plex DLNA Ser
udp        0      0 0.0.0.0:47458           0.0.0.0:*                           23369/Plex DLNA Ser
So, it appears that UDP 1900 is used, but port 32469 is TCP, not UDP.

I did notice that the other TCP port is different each time the server is started:
Source/Core/PltUPnP.cpp(150): [platinum.core.upnp] 2013-01-04T10:48:07.577884000-08:00 [Start] (3047720656) INFO: Starting UPnP...
Source/Core/PltHttpServer.cpp(127): [platinum.core.http.server] 2013-01-04T10:48:07.579146000-08:00 [Start] (3047720656) INFO: HttpServer listening on 0.0.0.0:1570
Source/Core/PltHttpServer.cpp(127): [platinum.core.http.server] 2013-01-04T10:48:07.597954000-08:00 [Start] (3047720656) INFO: HttpServer listening on 0.0.0.0:32469
Or:
Source/Core/PltUPnP.cpp(150): [platinum.core.upnp] 2013-01-04T10:48:59.561393000-08:00 [Start] (3047245520) INFO: Starting UPnP...
Source/Core/PltHttpServer.cpp(127): [platinum.core.http.server] 2013-01-04T10:48:59.562497000-08:00 [Start] (3047245520) INFO: HttpServer listening on 0.0.0.0:1221
Source/Core/PltHttpServer.cpp(127): [platinum.core.http.server] 2013-01-04T10:48:59.564785000-08:00 [Start] (3047245520) INFO: HttpServer listening on 0.0.0.0:32469
So I'm hoping that is internal to the DLNA server, otherwise creating a firewall rule is going to be impossible.

What of the other UDP ports. Do any of those need a hole punched in the firewall to let other machines connect, or are they all used internally within the DLNA server.

I will probably post a similar question in the main Plex forum, covering the Media server, as that also appears to open many more ports than the FAQ shows.

Cheers.

#2 ouwendibbes

ouwendibbes

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 21 January 2013 - 08:52 PM

Hi Eddie,

I am using following ports, based on the SSDP protocol description and your post:

# Plex SSDP port (Simple Service Discovery Protocol)
-A INPUT -p udp --dport 1900 -d 239.255.255.250/32 -j ACCEPT

and in a separate iptables chain:

# Plex www (manage)
## http://wiki.plexapp....nable_access.3F
## http://forums.plexap...__1#entry334494
-A RH-Firewall-DMZ-INPUT -m state --state NEW -m tcp -p tcp --dport 32400 -j ACCEPT
# Plex DLNA Server
-A RH-Firewall-DMZ-INPUT -m state --state NEW -m tcp -p tcp --dport 32469 -j ACCEPT


Btw, I am not using bonjour / avahi.

Regards,

Tom

#3 mradc

mradc

    Member

  • Members
  • PipPip
  • 25 posts

Posted 31 January 2013 - 04:37 PM

Would be good to add rules to take a destadd and remap to a new port so that multiple pms instance can be run in order to have multiple separated libraries

the PlexApp for SmartTV cannot set a pms port, it can only set address, therefore a workaround...

On the Smart TV client, have two "PlexMedia Server" entries set up...

1) 192.168.0.2 (real IP)
2) 192.168.0.3 (dummy IP)

then, iptables could use the dummy IP to direct traffic to 192.168.0.2 but on port 12345 where the second pms install is listening.

This would result in a completely different library. e.g. one for the kids separated from the parents stuff ;)

Given that PlexApp for SmartTV will most definitely not be updated soon due to commitments, this would serve as an interim solution.

#4 grype

grype

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 20 February 2013 - 04:25 AM

I am baffled by the amount of ports Plex and friends utilize. Does anyone have any idea and be willing to explain why are there so many ports being used?

Plex        292          media    3u  IPv4      0t0    UDP *:*
Plex        292          media   13u  IPv4      0t0    UDP *:32415
Plex        292          media   14u  IPv4      0t0    UDP 127.0.0.1:54360
Plex        292          media   15u  IPv4      0t0    UDP 10.0.1.10:55643
Plex        292          media   16u  IPv4      0t0    UDP *:32412
Plex        292          media   20u  IPv4      0t0    TCP *:3000 (LISTEN)
Plex        292          media   21u  IPv4      0t0    UDP *:9777
Plex        292          media   22u  IPv4      0t0    TCP *:9090 (LISTEN)
PlexHelpe   339          media    1u  IPv4      0t0    UDP *:*
PlexHelpe   339          media    2u  IPv4      0t0    UDP *:65180
Plex\x20M   346          media   26u  IPv4      0t0    TCP *:32400 (LISTEN)
Plex\x20M   346          media   39u  IPv4      0t0    UDP *:*
Plex\x20M   346          media   43u  IPv4      0t0    UDP 127.0.0.1:54609
Plex\x20M   346          media   49u  IPv4      0t0    UDP *:32414
Plex\x20M   346          media   50u  IPv4      0t0    UDP *:32410
Plex\x20M   346          media   51u  IPv4      0t0    UDP 127.0.0.1:61987
Plex\x20M   346          media   52u  IPv4      0t0    UDP 10.0.1.10:51261
Plex\x20M   346          media   53u  IPv4      0t0    UDP 10.0.1.10:63541
Plex\x20D   500          media   13u  IPv4      0t0    UDP *:1900
Plex\x20D   500          media   16u  IPv4      0t0    TCP *:1990 (LISTEN)
Plex\x20D   500          media   19u  IPv4      0t0    UDP *:8617
Plex\x20D   500          media   22u  IPv4      0t0    UDP *:10978
Plex\x20D   500          media   25u  IPv4      0t0    UDP *:7402
Plex\x20D   500          media   29u  IPv4      0t0    TCP *:32469 (LISTEN)
Plex\x20D   500          media   32u  IPv4      0t0    UDP *:60388
Plex\x20D   500          media   45u  IPv4      0t0    UDP *:51568
Plex\x20D   500          media   46u  IPv4      0t0    UDP *:63122
Plex\x20D   500          media   49u  IPv4      0t0    UDP *:32414
Plex\x20D   500          media   50u  IPv4      0t0    UDP *:32410
Plex\x20D   500          media   51u  IPv4      0t0    UDP *:32413
Plex\x20D   500          media   52u  IPv4      0t0    UDP 127.0.0.1:62419
Plex\x20D   500          media   53u  IPv4      0t0    UDP 10.0.1.10:54159
Plex\x20D   500          media   54u  IPv4      0t0    UDP 127.0.0.1:51682
Plex\x20D   500          media   55u  IPv4      0t0    UDP 10.0.1.10:64034

Excluding the *:* assignments, here's a list of all the 29 ports:
1900
1990
3000
7402
8617
9090
9777
10978
32400
32410
32412
32413
32414
32415
32469
51261
51568
51682
54159
54360
54609
55643
60388
61987
62419
63122
63541
64034
65180


#5 OhDannyBoy

OhDannyBoy

    Member

  • Members
  • PipPip
  • 16 posts

Posted 27 March 2013 - 07:42 PM

I found this in the FAQ which says:

What network ports do I need to allow through my firewall to enable access?

TCP 32400 (for access to the Plex Media Server)

UDP 1900 (for access to the Plex DLNA Server)

[b]UDP 32469 (for access to the Plex DLNA Server)[/b]

UDP 5353 (for Bonjour/Avahi if you are using these products for service discovery)
So, it appears that UDP 1900 is used, but port 32469 is TCP, not UDP.

I see this, too.

 

My client connects to PLEX server at port 32469 using TCP in order to get "DeviceDescription.xml" via HTTP protocol.

 

 

Maybe somebody who is empowered enough could please correct the FAQ?

 

Cheers

Dan


PLEX Media Server Version 0.9.7.17 running on QNAP NAS TL-269L


#6 bitwise

bitwise

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 03 April 2013 - 06:55 AM

I am curious about this one- in particular- and would like to know about the others, too. i dont feel comfortable opening up my machine in such ways. and also on a related note, the server connections like wikipedia, themoviedb, etc seem like they could be open for privacy issues. are any more discreet than others since i might not want corps like videosurf (now msft owned) seeing my data?

9090


#7 yetinet

yetinet

    Newbie

  • Members
  • Pip
  • 9 posts

Posted 26 July 2013 - 05:17 AM

I find it amazing that this question has not been answered authoritatively yet.  I've ended up completely opening the iptables firewall on my PMS server (a CentOS VM) to my T-Box (a generic DNLA client, I guess).

 

My external firewall only exposes my nominated PMS port which is Port Forwarded to 32400 on the PMS host.

 

I don't have Windows or Mac, so the only clients I have are:

- the T-Box on the main TV

- Chrome on a Fedora desktop (which works really well!)

- a Samsung Galaxy Note running the Android client.

- and I'm going to go and find an old Motorola Xoom - it is must be somewhere in my study - just to play with.



#8 Voight-Kampff

Voight-Kampff

    Member

  • Members
  • PipPip
  • 40 posts

Posted 31 July 2013 - 07:23 AM

Actually what the Plex crew post on which ports to open is in al fairness pretty correct (except for a typo where udp should be tcp on port 32469)

 

It is true that Plex (media server or dlna server) listens on all sorts of other ports over tcp/udp, but these are not necessarily required by clients.

 

What their post doesn't mention is how to actually allow traffic to/from any of these ports, as some traffic is redirected after the initial 'handshake' is made to different ports, or just redirected alltogether.

 

Therefore, it is important on linux machines (I don't do Windows) to accept RELATED,ESTABLISHED packets, and not just allow everything on the base set of ports.

Look at this thread: http://forums.plexap...dlna-with-plex/

It's somewhere in the explanations.

In addition to my posts there, you might want to also accept all traffic sent from lo and sent to lo

:INPUT ACCEPT
-i lo -j ACCEPT

and

:OUTPUT ACCEPT
-o lo -j ACCEPT


#9 premejo

premejo

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 19 October 2013 - 02:08 AM

I had to open both UDP and TCP ports on 32469 and 32400 for my plex server. 

 

Then of course the same UDP ports suggested: 5353,1900.

 

Hope this helps save someone time.  I know it would have saved me some.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users