Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Solved: connecting networks via VPN
#1
Dear all,

situation:

- moodeaudio/mpd in LAN
- NAS (optional, with music and/or central mpd db server) in LAN
- control (e.g. to control spotify client which is discovery mode) via phone from WLAN
- WLAN and LAN are connected via VPN (e.g. wireguard)

Normally it is not possible to discover the spotify client on the moodeaudio player due to broadcast/ multicast being not routed via VPN. If one connects from LAN (spotify control app/client) to LAN (moodeaudio player) a WLAN phone will (interestingly?) sometimes find it (maybe due to spotify itself?), but not reliable and it requires first a LAN client to do the first connect. IF that does not happen it never discovers the moodeaudio with spotify client.

Solution:

- mdns daemon ie. multicast daemon (e.g. https://github.com/troglobit/mdnsd), there are debs available but requires 'bookworm' due to newer libc6 requirement.
- best to run it on the VPN server and it has to listen on all relevant interfaces, ie. LAN as well as WLAN. If a debian package is installed this is done automatically.
- spotify discovery from phone (WLAN) via VPN to LAN worked out of the box and reliable.

best regards
Reply
#2
Whats the environment for this type of network config?
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
(01-17-2024, 02:38 PM)Tim Curtis Wrote: Whats the environment for this type of network config?

Probably you outside you r home wanting to listen to your collection; you open the VPN towards home, and expect everything to be there as if you were on your sofa.
Cool thing (I believe Plex server can do the same, but it's not free), I'm very interested in this thing...
I'll probably grab you by a leg, @shiri1999
Reply
#4
Do I understand your situation correctly?:
You have a wired LAN and a WLAN. Both in separate networks, but at the same location?

Then the simplest solution would be to operate only one network that is accessible from both LAN and WLAN.

If, for various reasons, you want to keep two separate networks, routing between the two networks (possibly combined with a firewall that filters according to a set of rules) should be preferred to the VPN variant.

There are corresponding plug-ins for many routers, which then ensure that broadcast and multicast traffic can also take place between the networks.
With OPNsense, for example, there is the "mdns-repeater" and the "udpbroadcastrelay", which also enables UPnP traffic between two separate networks.

With the right configuration, this should also work via VPN connection to other locations.
Reply


Forum Jump: