Minidlna relay with igmpproxy

Hello,

I trying to route / relay a dlna server ( mindlna ) from 1 lan to another. Both lans are connected via a wireguard VPN.
In details:
LAN 1 192.168.10.0/24 <-> Openwrt ( gateway for lan 1) and wireguard server <-> Wireguard VPN link 192.168.15.0/24 <-> Debian box wireguard client in a network lan 2 192.168.30.0/24

I have a minidlna server in lan 1 and want that dlna clients in lan 2 can access the dlna server.
The 2 lans are properly routed and talk to each other.

I installed igmpproxy on my openwrt box with the followings config:
/etc/config/igmpproxy

config igmpproxy
        option quickleave 1
        option verbose 3 # [0-3](none, minimal[default], more, maximum)

config phyint # lan side where is the dlna server
        option network lan
        option zone FW_lan
        option direction upstream


config phyint # VPN side
        option network VPN
        option zone FW_VPN
        option direction downstream
        list altnet 192.168.30.0/24

a specific firewall rule
iptables -t mangle -A PREROUTING -i lan -d 224.0.0.0/4 -p udp -j TTL --ttl-inc 3

Here is the log:

Wed Oct  9 19:45:31 2019 user.debug igmpproxy[5916]: Searching for config file at '/var/etc/igmpproxy.conf'
Wed Oct  9 19:45:31 2019 user.debug igmpproxy[5916]: Config: Got a phyint token.
Wed Oct  9 19:45:31 2019 user.debug igmpproxy[5916]: Config: IF: Config for interface br-lan.
Wed Oct  9 19:45:31 2019 user.debug igmpproxy[5916]: Config: IF: Got upstream token.
Wed Oct  9 19:45:31 2019 user.debug igmpproxy[5916]: Config: IF: Got ratelimit token '0'.
Wed Oct  9 19:45:31 2019 user.debug igmpproxy[5916]: Config: IF: Got threshold token '1'.
Wed Oct  9 19:45:31 2019 user.debug igmpproxy[5916]: IF name : br-lan
Wed Oct  9 19:45:31 2019 user.debug igmpproxy[5916]: Next ptr : 0
Wed Oct  9 19:45:31 2019 user.debug igmpproxy[5916]: Ratelimit : 0
Wed Oct  9 19:45:31 2019 user.debug igmpproxy[5916]: Threshold : 1
Wed Oct  9 19:45:31 2019 user.debug igmpproxy[5916]: State : 1
Wed Oct  9 19:45:31 2019 user.debug igmpproxy[5916]: Allowednet ptr : 0
Wed Oct  9 19:45:31 2019 user.debug igmpproxy[5916]: Config: Got a phyint token.
Wed Oct  9 19:45:31 2019 user.debug igmpproxy[5916]: Config: IF: Config for interface VPN.
Wed Oct  9 19:45:31 2019 user.debug igmpproxy[5916]: Config: IF: Got downstream token.
Wed Oct  9 19:45:31 2019 user.debug igmpproxy[5916]: Config: IF: Got ratelimit token '0'.
Wed Oct  9 19:45:31 2019 user.debug igmpproxy[5916]: Config: IF: Got threshold token '1'.
Wed Oct  9 19:45:31 2019 user.debug igmpproxy[5916]: Config: IF: Got altnet token 192.168.30.0/24.
Wed Oct  9 19:45:31 2019 user.debug igmpproxy[5916]: Config: IF: Altnet: Parsed altnet to 192.168.30/24.
Wed Oct  9 19:45:31 2019 user.debug igmpproxy[5916]: IF name : VPN
Wed Oct  9 19:45:31 2019 user.debug igmpproxy[5916]: Next ptr : 0
Wed Oct  9 19:45:31 2019 user.debug igmpproxy[5916]: Ratelimit : 0
Wed Oct  9 19:45:31 2019 user.debug igmpproxy[5916]: Threshold : 1
Wed Oct  9 19:45:31 2019 user.debug igmpproxy[5916]: State : 2
Wed Oct  9 19:45:31 2019 user.debug igmpproxy[5916]: Allowednet ptr : 27f50
Wed Oct  9 19:45:31 2019 user.debug igmpproxy[5916]: buildIfVc: Interface lo Addr: 127.0.0.1, Flags: 0x0049, Network: 127/8
Wed Oct  9 19:45:31 2019 user.debug igmpproxy[5916]: buildIfVc: Interface eth1 Addr: XX.XX.XX.XX, Flags: 0x1043, Network: XX.XX.XX.XX/24
Wed Oct  9 19:45:31 2019 user.debug igmpproxy[5916]: buildIfVc: Interface br-lan Addr: 192.168.10.1, Flags: 0x1043, Network: 192.168.10/24
Wed Oct  9 19:45:31 2019 user.debug igmpproxy[5916]: buildIfVc: Interface VPN Addr: 192.168.15.1, Flags: 0x00d1, Network: 192.168.15/24
Wed Oct  9 19:45:31 2019 user.debug igmpproxy[5916]: Found config for br-lan
Wed Oct  9 19:45:31 2019 user.debug igmpproxy[5916]: Found config for VPN
Wed Oct  9 19:45:31 2019 user.debug igmpproxy[5916]: Found upstrem IF #0, will assing as upstream Vif 2
Wed Oct  9 19:45:31 2019 user.notice igmpproxy[5916]: adding VIF, Ix 0 Fl 0x0 IP 0x010aa8c0 br-lan, Threshold: 1, Ratelimit: 0
Wed Oct  9 19:45:31 2019 user.debug igmpproxy[5916]:         Network for [br-lan] : 192.168.10/24
Wed Oct  9 19:45:31 2019 user.notice igmpproxy[5916]: adding VIF, Ix 1 Fl 0x0 IP 0x010fa8c0 VPN, Threshold: 1, Ratelimit: 0
Wed Oct  9 19:45:31 2019 user.debug igmpproxy[5916]:         Network for [VPN] : 192.168.15/24
Wed Oct  9 19:45:31 2019 user.debug igmpproxy[5916]:         Network for [VPN] : 192.168.30/24
Wed Oct  9 19:45:31 2019 user.debug igmpproxy[5916]: Got 262144 byte buffer size in 0 iterations
Wed Oct  9 19:45:31 2019 user.debug igmpproxy[5916]: Joining all-routers group 224.0.0.2 on vif 192.168.15.1
Wed Oct  9 19:45:31 2019 user.notice igmpproxy[5916]: joinMcGroup: 224.0.0.2 on VPN
Wed Oct  9 19:45:31 2019 user.debug igmpproxy[5916]: Joining all igmpv3 multicast routers group 224.0.0.22 on vif 192.168.15.1
Wed Oct  9 19:45:31 2019 user.notice igmpproxy[5916]: joinMcGroup: 224.0.0.22 on VPN
Wed Oct  9 19:45:31 2019 user.info igmpproxy[5916]: sendto to 224.0.0.1 on 192.168.15.1; Errno(126): No error information
Wed Oct  9 19:45:31 2019 user.debug igmpproxy[5916]: SENT Membership query   from 192.168.15.1    to 224.0.0.1
Wed Oct  9 19:45:31 2019 user.debug igmpproxy[5916]: Sent membership query from 192.168.15.1 to 224.0.0.1. Delay: 10
Wed Oct  9 19:45:31 2019 user.debug igmpproxy[5916]: Created timeout 1 (#0) - delay 10 secs
Wed Oct  9 19:45:31 2019 user.debug igmpproxy[5916]: (Id:1, Time:10)
Wed Oct  9 19:45:31 2019 user.debug igmpproxy[5916]: Created timeout 2 (#1) - delay 21 secs
Wed Oct  9 19:45:31 2019 user.debug igmpproxy[5916]: (Id:1, Time:10)
Wed Oct  9 19:45:31 2019 user.debug igmpproxy[5916]: (Id:2, Time:21)
Wed Oct  9 19:45:31 2019 user.notice igmpproxy[5916]: RECV Membership query   from 192.168.15.1    to 224.0.0.1
Wed Oct  9 19:45:31 2019 user.notice igmpproxy[5916]: RECV V2 member report   from 192.168.15.1    to 224.0.0.2
Wed Oct  9 19:45:31 2019 user.notice igmpproxy[5916]: The IGMP message was from myself. Ignoring.
Wed Oct  9 19:45:31 2019 user.notice igmpproxy[5916]: RECV V2 member report   from 192.168.15.1    to 224.0.0.22
Wed Oct  9 19:45:31 2019 user.notice igmpproxy[5916]: The IGMP message was from myself. Ignoring.

I was expecting the minidlna server to be seen by igmpproxy logs but nothing append.
I may be totally wrong in the approach or missing something obvious

Of course, next step will be to have the same igmpproxy and the Debian Box.

Can you help me in making it work.

Regards

@dr191, welcome to the community!

I wasn't aware that DLNA used IGMP.

Thank you for the welcome.

I may be totally wrong in the approach or missing something obvious

I wasn't aware that DLNA used IGMP.

You are probably right, do you know what is the network protocol used by DLNA ?

UPnP assumes the network runs Internet Protocol (IP) and then leverages HTTP, on top of IP, in order to provide device/service description, actions, data transfer and eventing. Device search requests and advertisements are supported by running HTTP on top of UDP (port 1900) using multicast (known as HTTPMU). Responses to search requests are also sent over UDP, but are instead sent using unicast (known as HTTPU).

~ from https://en.wikipedia.org/wiki/Universal_Plug_and_Play

(you may also wanna see https://en.wikipedia.org/wiki/Universal_Plug_and_Play#IGMP_snooping_and_reliability)

Thanks,
So it seems that igmpproxy is good approach for the multicast aspect of the issue ?
But I'm not sure to see how to handle the udp answer in unicast ?

1 Like