[Firewall] Open UDP-Port for Plex

Tobias Kirchhofer tobias at kirchhofer.net
Sat Jul 20 12:07:43 CEST 2013


From outside lan with running plex media server on my router:

TCP is working from outside:
# nc -v myrouter.host 32400
Connection to my router.host 32400 port [tcp/*] succeeded!
hello
HTTP/1.0 400 Bad Request
Content-Length: 89
Content-Type: text/html
X-Plex-Protocol: 1.0
Cache-Control: no-cache

UDP ist not working with running plex media server!:
# nc -uv myrouter.host 32400
hello
nc: Write error: Connection refused

If i start netcat on my router listening on udp port 32400:

# netcat -uv -l -p 32400
listening on [any] 32400 …

and type from outside lan:
 
# nc -uv myrouter.host 32400 
connect to [ip of myrouter.host] from outside.host [ip outside.host] 54020
hello

then:

# netcat -uv -l -p 32400
listening on [any] 32400 ...
connect to [ip of myrouter.host] from outside.host [ip outside.host] 54020
hello

Ok, everything is fine. UDP-Port is accessible. Conclusio: plex media server is not listening on UDP port 32400.

Strange. plex media server ist configured to listen on UDP 32400:

<Preferences MachineIdentifier="aab76058-38d7-XXXXXX-1bb05fe9e66f" ProcessedMachineIdentifier="79f0cd23c0ce78XXXXXXXXceb1b276dd0b8e" BlacklistedBundle="" FriendlyName="myrouter.host" FSEventLibraryUpdatesEnabled="1" ScheduledLibraryUpdatesEnabled="0" allowMediaDeletion="1" PlexOnlineMail="my at email" PlexOnlineToken="gcbxnXXXXXXXXmsqBa8x" PublishServerOnPlexOnlineKey="1" ManualPortMappingMode="1" ManualPortMappingPort="32400" LogDebug="1" LogVerbose="1" collectUsageData="0"/

plex media server Log:

DEBUG - [com.plexapp.system] HTTP reply status 200, with 0 bytes of content.
DEBUG - NAT: Switching to NAT-PMP strategy.
DEBUG - NAT: Initializing NAT-PMP, success=1
DEBUG - NAT: Finding public address from NAT-PMP.
DEBUG - NAT: Finished NAT-PMP request, result was: Not Supported by gateway
DEBUG - NAT: Found public address (success=0): 0.0.0.0
DEBUG - NAT: Finding public address failed the first way, switching.
DEBUG - NAT: Switching to UPnP strategy.
DEBUG - NAT: Initialized UPnP, result: UPnP Discovery failed!
DEBUG - HTTP request to: http://my.plexapp.com/pms/:/ip
DEBUG - MyPlex: Got public IP from http://my.plexapp.com: my.ip
DEBUG - NAT: Obtained public address of my.ip (failed: 0 myPlex: 1).
DEBUG - NAT: Checking for change in address: old was my.ip and new is my.ip.

But this is not a firewall issue anymore ;)


Thanks for guiding me, Greetings!
 Tobias







Am 19.07.2013 um 23:32 schrieb Gustin Johnson <gustin at meganerd.ca>:

> UDP can be a pain to test.  It is possible that the traffic is being filtered upstream by your ISP.  
> 
> First things first, I would use hping3 (or netcat) on a client machine and tcpdump on the router to see if you can actually get those packets to your router.  
> 
> Repeat this from outside your lan to see if it is an ISP issue.
> 
> 
> On Fri, Jul 19, 2013 at 1:27 PM, Tobias Kirchhofer <tobias at kirchhofer.net> wrote:
> Am 16.07.2013 um 07:39 schrieb Gustin Johnson <gustin at meganerd.ca>:
> 
> > Alternatively what does (as root or with sudo) "lsof -i:32400" return?
> 
> $ lsof -i:32400
> Plex    28544 plex   17u  IPv4 458252      0t0  TCP *:32400 (LISTEN)
> 
> > On Mon, Jul 15, 2013 at 11:37 PM, Mick <michaelkintzios at gmail.com> wrote:
> > On Monday 15 Jul 2013 21:08:48 Tobias Kirchhofer wrote:
> > > Hi list,
> > >
> > > trying to open an UDP-Port for plex mediaserver - no success. Plex runs on
> > > the same machine which is also the router.
> > >
> > > Arnos:
> > >
> > > 00debconf.conf: OPEN_UDP="32400"
> > >
> > > Scan from another server outside:
> > >
> > > $ nmap -sU -p 32401 myrouter
> 
> This was a copy and paste error. Should look like
> 
> $ nmap -sU -p 32400 myrouter
> ------------------^
> 
> Meanwhile i made some more investigation. Both TCP/UDP should be open.
> 
> OPEN_TCP="32400"
> OPEN_UDP="32400"
> 
> But it did not change anything. I followed the howto writen here: http://wiki.plexapp.com/index.php/MyPlex#When_Auto-Configuration_Fails
> 
> Its not like that myplex is a feature which i need desperatly but i would like to controle the  firewall 100%. Does anyone use Plex Media Server with myplex behind an arno firewall?
> 
> Greetings!
> 
> […]
> 
> --
> Tobias Kirchhofer
> tobias at kirchhofer.net
> 
> 
> 
> _______________________________________________
> Firewall mailing list
> Firewall at rocky.eld.leidenuniv.nl
> http://rocky.eld.leidenuniv.nl/mailman/listinfo/firewall
> Arno's (Linux IPTABLES Firewall) Homepage:
> http://rocky.eld.leidenuniv.nl
> 
> _______________________________________________
> Firewall mailing list
> Firewall at rocky.eld.leidenuniv.nl
> http://rocky.eld.leidenuniv.nl/mailman/listinfo/firewall
> Arno's (Linux IPTABLES Firewall) Homepage:
> http://rocky.eld.leidenuniv.nl

-- 
Tobias Kirchhofer
tobias at kirchhofer.net





More information about the Firewall mailing list