synfinatic / udp-proxy-2020

A crappy UDP router for the year 2020 and beyond
MIT License
103 stars 7 forks source link

MacOS M1+Wireguard -> OPNsense -> Home network with Roon #138

Closed Hr46ph closed 10 months ago

Hr46ph commented 10 months ago

From what I gather here, I think I am out of luck. Here's my situation.

My home with RoonServer and Library is behind an OPNsense firewall. OPNsense is running Wireguard with several peers configured. My Macbooks and iPhones are the peers and can connect over Wireguard VPN to my entire home network. Everything here works, including home network DNS resolving and internet access. This part seems to be setup properly.

When I start Roon on the Mac with Wireguard active, it sees the server and connects, however it won't see any audio playback devices since this requires the udp-proxy-2020.

From what I gather I need to install that on OPNsense and on the Macbooks where that UDP traffic needs to end up. Unless I misunderstand and udp-proxy-2020 goes onto the Roon server and OPNsense (where it gets pushed into the tunnel?).

Any tips please?

Hr46ph commented 10 months ago

ps.

I just searched the OPNsense plugins and found something called os-udbproadcastrelay.

It comes with this description:

Control ubpbroadcastrelay processes

udbproadcastrelay is a UDP multicast relayer. Its intended use is to
rebroadbcast udp packets on a specific port across interfaces, be those
interfaces physical or VLAN.

It is used where devices such as Sonos or Sky are spread accross
different subnets and are not able to detect the servers or devices.

Examples of different devices and the ports are as follows:

Syncthing discovery
udp_vars="--id 1 --port 21027 --dev igb1 --dev igb2"

mDNS / Broadcast DNS (Chromecast Discovery + Bonjour + More)
udp_vars="--id 1 --port 5353 --dev eth0 --dev eth1 --multicast 224.0.0.251 -s 1.1.1.1"

(Chromecast requires broadcasts to originate from an address on its subnet) use
the rebroadbcast address option.

SSDP (Sonos Roku Discovery + More)
udp_vars="--id 1 --port 1900 --dev eth0 --dev eth1 --multicast 239.255.255.250"

Lifx Bulb Discovery
udp_vars=" --id 1 --port 56700 --dev eth0 --dev eth1"

Broadlink IR Emitter Discovery
udp_vars=" --id 1 --port 80 --dev eth0 --dev eth1"

Warcraft 3 Server Discovery
udp_vars=" --id 1 --port 6112 --dev eth0 --dev eth1"

It is a requirement that generally a firewall entry will be required to allow the server responses
back to the requesting client. As it's not known what the port/address of the server is then this
entry will need to be created manually.

Maintainer: mjwasley@gmail.com

I think this does a similar thing as your udp-proxy-2020?

Hr46ph commented 10 months ago

I tested both your package and the official plugin. Both seem similar in functionality and answered my own question as to whether it needs to be installed on clients and/or Roon Server. Just on the firewall.

However, While I see all audio devices in Roon when connected to Wireguard, I cannot play to local speakers. I hit play and it sits on 0:00 and never moves. Just skips to the next song after a while.

PS. I posted on Roon Community as well. Hopefully you or someone is able to help out! Thanks in advance!

synfinatic commented 10 months ago

So the Roon app sees the local speakers on iPhone/MacBook, but playing doesn't work?

All I can say is that is not a udp-proxy-2020 problem... it is doing what it needs to do (allow you to see the Roon core and expose the local speakers). But if it doesn't play that's either a Roon issue (try restarting the Roon client or core software) or a firewall issue (blocking the music playing which doesn't involve udp-proxy-2020.

Hr46ph commented 10 months ago

Yep, you're right! I enabled any-any rules on LAN and wireguard interfaces and now it works. Lame thing was, I didn't see any blocks. I need to figure out which traffic to allow (any-any is only for testing).

Since its working I'll close it. Cheers!