dairon
Posts: 28
Joined: Sat Dec 15, 2012 12:17 pm

minidlna - device discovery process

Thu May 30, 2013 12:05 pm

Hi all,

I have installed minidlna on my raspi to stream media to my tablet and pc. After installation the raspi was not discovered by the client.. After some troubleshooting I found following line in the log:

minissdp.c:335: error: sendto(udp_notify=7, 'IP OF MY RASPI'): Operation not permitted

The 'operation not permitted reminded me of some other tests I made where iptables were included so I turned it off for testing purposes and it worked. The messages also stop appearing after iptables turned off. When iptables turned on the messages appear after the 'notify interval' stated in the minidlna config file. Unfortunately I don't know why iptables blocks the DLNA discovery?! Iptables is configured to allow all communication within the same subnet.. See the following output from the iptables:

Code: Select all

Chain INPUT
ACCEPT     all  --  any    any     anywhere             loopback/8
ACCEPT     all  --  eth0   any     local subnet        local subnet

Chain OUTPUT
ACCEPT     all  --  any    any     loopback/8           anywhere
ACCEPT     all  --  any    eth0    local subnet        local subnet
There are also some other rule below but these are for internet connection which don't affect the first two rules mentioned here.
How is the discovery process working exactly? I only read it should be a udp http broadcast which should be allowed, right?
Please help me, working on this issue for hours and can't find the solution... Totally stuck here.

Thanks,
dai

dairon
Posts: 28
Joined: Sat Dec 15, 2012 12:17 pm

Re: minidlna - device discovery process

Thu May 30, 2013 1:17 pm

Hi again,

while trying to troubleshoot and enable logging for the iptables drop rule at the end I discovered another issue. It seems that the special target '-j LOG' module is not installed as it says:

Code: Select all

iptables: No chain/target/match by that name.
Anybody knows how to install the missing module? Why is it not included in the iptables package? It seems it works for everybody else...

Thanks, dai

dairon
Posts: 28
Joined: Sat Dec 15, 2012 12:17 pm

Re: minidlna - device discovery process

Thu May 30, 2013 1:51 pm

Shortly before I was going to lie on the floor and start crying I figured out what was going to block the discovery process. The protocoll which is responsible for discovering new neighbours is called SSDP and works with the multicast address 239.255.255.250! (http://en.wikipedia.org/wiki/Simple_Ser ... y_Protocol)
So I just made another rule from the local subnet to the multicast address (outout and input chain looks the same for multicast addresses) and it was working immediately! :D

Still, the LOG target in iptables is not working so maybe someone knows how to solve this issue :)

cheers, dai

javaboyuk
Posts: 18
Joined: Mon Mar 05, 2012 7:07 pm

Re: minidlna - device discovery process

Fri May 31, 2013 3:53 pm

Would you mind posting the new Iptables config you are now using?
I think I want to do something very similar!

Thanks
Russ

dairon
Posts: 28
Joined: Sat Dec 15, 2012 12:17 pm

Re: minidlna - device discovery process

Thu Jun 06, 2013 7:51 pm

Hi javaboyuk,

it looks like this:

Code: Select all

Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
target     prot opt in     out     source               destination
ACCEPT     all  --  *      *       local subnet         local ip
ACCEPT     all  --  *      *       local subnet         239.255.255.250 //multicast IP of ssdp for dlna discovery

Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
target     prot opt in     out     source               destination
ACCEPT     all  --  *      *       local ip             local subnet
ACCEPT     all  --  *      *       local ip             239.255.255.250 //multicast IP of ssdp for dlna discovery
hope that helps you :)

cheers dai

Return to “Media centres”