Project

General

Profile

Actions

Feature #10818

closed

UDP Broadcast Relay

Added by Mark Whitworth over 3 years ago. Updated 11 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
New Package Request
Target version:
-
Start date:
08/06/2020
Due date:
% Done:

0%

Estimated time:
Plus Target Version:

Description

Current packages like Avahi and PIMD can help users cast across VLANs, which is great for HOME/GUEST to IOT type scenarios, but it doesn't seem to address everything and IGMP proxies, snooping, etc. don't either. Google Home, for example, won't list speaker groups which involve the devices on the downstream VLAN. Apparently Chromecasts do some interesting things like changing source/destinations as Chromecast requires broadcasts to originate from an address on its subnet.

I found this package that runs a UDP relay daemon. [[https://github.com/marjohn56/udpbroadcastrelay]]

It's an updated version of a UDP relay from a few years back and it is working perfectly in identifying my Chromecast speaker groups on my IOT VLAN (while I remain on GUEST). It appears to be effective at all of these things:
  • mDNS / Multicast DNS (Chromecast Discovery + Bonjour + More)
  • SSDP (Roku Discovery, DLNA Media, Sonos, UPnP + More)
  • ifx Bulb Discovery
  • Broadlink IR Emitter Discovery
  • Warcraft 3 Server Discovery
  • Windows Network Neighborhood Discovery
  • Syncthing Discovery
  • Raknet Discovery (Minecraft)

This would be a great addition as a package in pfSense. As it stands, it is a bit tricky to run as a daemon (it hangs other services if not handled properly) and it would be nice to have an indicator on the dashboard with the other services when it is started and stopped.


Files

UDPBroadcastRelay.JPG (104 KB) UDPBroadcastRelay.JPG Garth Kirkwood, 12/26/2020 01:43 AM
clipboard-202212070759-fqczv.png (48.5 KB) clipboard-202212070759-fqczv.png John Stafford, 12/07/2022 09:59 AM
clipboard-202306031301-l9do0.png (78.6 KB) clipboard-202306031301-l9do0.png Alhusein Zawi, 06/03/2023 08:01 PM
udprelay.png (53.9 KB) udprelay.png Alhusein Zawi, 06/03/2023 08:02 PM
Actions #1

Updated by Jim Pingle over 3 years ago

  • Category set to New Package Request
Actions #2

Updated by Garth Kirkwood over 3 years ago

I have found this tool really handy for me so I want to help to make it happen, unfortunately I don't have the programming skills to do any of the behind the scenes nuts and bolts stuff, but what I can do is front-end stuff and help develop the logic so that a programmer can simply follow that.

To show my genuine interest I have made a package panel and am wondering if it is worth perusing any further, i.e. developing the underlying logic etc? Here is what it looks like:

Actions #3

Updated by Chetan Rao over 3 years ago

I just came here to say the same, and saw your post Garth. I'm a programmer by profession, but have never built any PfSense packages. However, I'm strongly motivated, since this tool solved a nagging problem that I've had.

In case you're unaware, there's a thread for this tool here: https://forum.netgate.com/topic/155698/how-can-i-get-this-udp-relay-package-for-casting-across-vlans

If you'd like, please post your screenshot there, and we can collaborate and see where it goes.

Thanks.

Actions #4

Updated by Kevin L over 3 years ago

Would absolutely love to see this becoming a pfSense package. Thank you Chetan and Garth for taking a shot at this.

Actions #6

Updated by Carl Schmitz almost 3 years ago

Would also like to this this as pfSense package with GUI.

Actions #7

Updated by MILO MEDIN over 2 years ago

Is there any work going on to integrate this? I have a problem with chromecast audio groups that this would fix (that avahi doesn't).

Actions #8

Updated by Axel Taferner over 2 years ago

MILO MEDIN wrote in #note-7:

Is there any work going on to integrate this? I have a problem with chromecast audio groups that this would fix (that avahi doesn't).

I can't answer your question but you can already fix your problem by manually setting this up by following the instructions from the forums linked above in the reply from Chetan Rao.

Actions #10

Updated by James M about 2 years ago

Hello Viktor Gurov, is there any ETA for this package to be merged into pfSense? It seems the GitLab linked does not resolve (maybe an internal link?). Thanks and Cheers!

Actions #11

Updated by Øystein Gåsdal almost 2 years ago

Hi.
Any news on this?
Eagerly awaiting this one

Actions #12

Updated by Marcos M almost 2 years ago

There's no GUI for it, but it can be installed on 22.05/2.7:

[22.05-BETA][root@gw]/root: pkg search udp
udpbroadcastrelay-0.3.b        UDP multicast/unicast relayer

If @Garth Kirkwood is still interested, they should be able to start building a package for it.

Actions #13

Updated by Øystein Gåsdal almost 2 years ago

Thank you for the information.
Let's hope @Garth Kirkwood sees this then

Actions #14

Updated by Garth Kirkwood almost 2 years ago

Hey guys thanks for the shout out, but I have NO clue how to make this a package.

All I was able to do was build a webpage that could be used to manage it, and again there is no smarts behind this webpage, it is simply a webpage.

I am happy to help someone who can do the backend stuff.

Actions #15

Updated by Djon K over 1 year ago

Thanks for the interest in this package. I took some time this weekend to create an initial version of a pfSense package around the udpbroadcastrelay solution. It is indeed based on the already existing port in the latest development branch.

If you are still interested in the package, it would be great to get some support in further developing and testing. Please find more info and the link to the repo (added a ready to go .pkg file as well) here: [[https://forum.netgate.com/topic/174725/udp-broadcast-relay]]

Actions #16

Updated by Marcos M over 1 year ago

  • File pfSense-pkg-udpbroadcastrelay-0.1_4.pkg added
  • Assignee set to Marcos M

There's currently pull requests open to add the package on both 2.6 and 2.7 (PHP8). These include added functionality that I'm not seeing in yours. I'll move the PHP8 MR to the public github repo since it should be ready to use from the testing I've done so far. Here's a pkg that can be added (in 2.6) for anyone that wants to test.

Add attached package with pkg install -fy /path_to_file - for 2.7/23.01 only.

https://gitlab.netgate.com/pfSense/FreeBSD-ports/-/merge_requests/280

Actions #17

Updated by Marcos M over 1 year ago

  • Status changed from New to Pull Request Review
Actions #18

Updated by Djon K over 1 year ago

That's a coincidence! Saw the pull request you created this morning. Looking at the code, it seems you took a very similar approach. Let's consolidate efforts here. Thanks.

Actions #19

Updated by Marcos M over 1 year ago

  • File deleted (pfSense-pkg-udpbroadcastrelay-0.1_4.pkg)
Actions #20

Updated by Marcos M over 1 year ago

  • File pfSense-pkg-udpbroadcastrelay-0.1_4.pkg added
Actions #21

Updated by Marcos M over 1 year ago

  • File deleted (pfSense-pkg-udpbroadcastrelay-0.1_4.pkg)
Actions #22

Updated by Marcos M over 1 year ago

  • File pfSense-pkg-udpbroadcastrelay-0.1_4.pkg added
Actions #23

Updated by Marcos M over 1 year ago

  • File deleted (pfSense-pkg-udpbroadcastrelay-0.1_4.pkg)
Actions #24

Updated by Marcos M over 1 year ago

  • File pfSense-pkg-udpbroadcastrelay-0.1_5.pkg added
Actions #25

Updated by Marcos M over 1 year ago

  • File deleted (pfSense-pkg-udpbroadcastrelay-0.1_5.pkg)
Actions #26

Updated by Marcos M over 1 year ago

  • File pfSense-pkg-udpbroadcastrelay-0.1_5.pkg added
Actions #27

Updated by Marcos M over 1 year ago

  • File pfSense-pkg-udpbroadcastrelay-1.0.pkg added
Actions #28

Updated by Marcos M over 1 year ago

  • File deleted (pfSense-pkg-udpbroadcastrelay-1.0.pkg)
Actions #29

Updated by Marcos M over 1 year ago

  • File pfSense-pkg-udpbroadcastrelay-1.0.pkg added
Actions #30

Updated by Marcos M over 1 year ago

  • File deleted (pfSense-pkg-udpbroadcastrelay-0.1_5.pkg)
Actions #31

Updated by Marcos M over 1 year ago

  • File deleted (pfSense-pkg-udpbroadcastrelay-1.0.pkg)
Actions #32

Updated by Marcos M over 1 year ago

  • File pfSense-pkg-udpbroadcastrelay-0.1_6.pkg added
  • File pfSense-pkg-udpbroadcastrelay-1.0.pkg added
Actions #33

Updated by gen hwe over 1 year ago

So glad you sirs are developing this. Thank you very much.

However, my only issue right now is I cant add wireguard interface. Any solution to this?

Actions #34

Updated by Marcos M over 1 year ago

Wireguard interfaces are point-to-point interfaces and do not support the broadcast flag, hence cannot be used.

Actions #35

Updated by James M over 1 year ago

Hello Marcos M, many thanks for your great work. This package will definitely be interesting for a lot of people! Since udpbroadcastrelay will be available on 22.05/2.7, do you think it would be feasible to add it to the roadmap for the 2.7 release (https://redmine.pfsense.org/versions/70)?

Many thanks!

Actions #36

Updated by Marcos M over 1 year ago

I believe it's in a good enough state where it can at least be added to the dev branch, but if/when it's merged is up to the devs and their time so I don't know when it will be available.

Actions #37

Updated by Dean Arnold over 1 year ago

I've successfully installed the 1.0 package on the 2.7.0 snapshots and was able to configure mDNS (5353/224.0.0.251) and SSDP (1900/239.255.255.250) for Sonos & AppleTV/Airplay, this is something I was not able to achieve with Avahi/PIMD/IGMP-Proxy.

Thank you for developing this package. I hope to see it offered in the official packages soon.

Actions #38

Updated by John Stafford over 1 year ago

I installed pfSense-pkg-udpbroadcastrelay-0.1_6.pkg on my 2.6 install, but am unable to start the service...

Suggestions?

Actions #39

Updated by Øystein Gåsdal over 1 year ago

Sadly it doesn't seem to IPv6.
I have set up mDNS (5353/224.0.0.251) and SSDP (1900/239.255.255.250), only with IPv6 equivalents, but it doesn't seem to work

Actions #40

Updated by Djon K over 1 year ago

The underlying package (https://github.com/marjohn56/udpbroadcastrelay) does not support IPv6 (https://github.com/marjohn56/udpbroadcastrelay/issues/5). I'm sure it will be added over time and the pfSense package can follow.

I've been running the package successfully for months. Think we got the interface to a stable point that is very usable for a wide group of folks. Would love to see it integrated into the main package repository and was hoping for 2.7.0.

What is the path forward?

Actions #41

Updated by Joe Lippa over 1 year ago

Very nice job @Marcos M, thank you to you and everyone else that has contributed to the creation of this package.

I'm currently using pfSense-pkg-udpbroadcastrelay-0.1_6.pkg with psSense 2.6 and it's working perfectly for my use-case but I agree with @John Stafford and the issue that he identified above, a UI bug of sorts exists.

In my experience the underlying udpbroadcastrelay process/service is running and working fine but /status_services.php reports that the service is stopped as shown in the screenshot above.

It's not a showstopper but is probably something that wants to be ironed out before this package gets picked up for merge into 2.7

Actions #42

Updated by Marcos M over 1 year ago

Check Diagnostics / System Activity and make sure that the process is actually running. There are some errors which are not captured in logs which would prevent the process from starting (and hence show stopped in services).

Edit: Additional logging has been added (under System Logs) which includes startup errors. I'm only providing a pre-built package for 2.7/23.01.

Actions #43

Updated by Marcos M over 1 year ago

  • File deleted (pfSense-pkg-udpbroadcastrelay-0.1_6.pkg)
Actions #44

Updated by Marcos M over 1 year ago

  • File deleted (pfSense-pkg-udpbroadcastrelay-1.0.pkg)
Actions #45

Updated by Marcos M over 1 year ago

  • File pfSense-pkg-udpbroadcastrelay-1.0.pkg added
Actions #46

Updated by M J over 1 year ago

Is there any way to install 1.0 package in pfSense 2.6? Installation failed, see below. Or do I have to use the older 0.1_6 package?

Actions #47

Updated by James R over 1 year ago

I've installed 23.01 RC and pfSense-pkg-udpbroadcastrelay-1.0.pkg installs without issue.

Actions #48

Updated by D. I. over 1 year ago

I'm seeing a lot of talk about a package for pfSense 2.6. However, the package seems to be removed from this page (and the Netgate GitLab is unreachable). Is this just me?

Actions #49

Updated by James R over 1 year ago

D. I. wrote in #note-48:

I'm seeing a lot of talk about a package for pfSense 2.6. However, the package seems to be removed from this page (and the Netgate GitLab is unreachable). Is this just me?

23.01 had reached RC so a release is imminent. Author removed 0.1_6 as they likely do not want to support different versions of the package.

Actions #50

Updated by D. I. over 1 year ago

James R wrote in #note-49:

D. I. wrote in #note-48:

I'm seeing a lot of talk about a package for pfSense 2.6. However, the package seems to be removed from this page (and the Netgate GitLab is unreachable). Is this just me?

23.01 had reached RC so a release is imminent. Author removed 0.1_6 as they likely do not want to support different versions of the package.

Got it, thanks! Hopefully 23.01 releases soon, I can't wait to use this package!

Actions #51

Updated by Marcos M about 1 year ago

  • Status changed from Pull Request Review to Feedback

The package is now available for dev snapshots (currently 23.05/2.7).

Actions #52

Updated by James G 12 months ago

The upstream was updated to add additional features to include options such as --allowcidr and --blockcidr:
https://github.com/marjohn56/udpbroadcastrelay/commit/928a6ad4f790491b5f0c53a37ac978bff2028a18

However, they are not present in this package. Would it be feasible for this package to be updated to reflect the upstream please?

[23.01-RELEASE][blah@blah]/root/udpbroadcastrelay: pkg info udpbroadcastrelay
udpbroadcastrelay-0.3.b
Name           : udpbroadcastrelay
Version        : 0.3.b
Installed on   : Thu Mar  9 19:52:48 2023 AEDT
Origin         : net/udpbroadcastrelay
Architecture   : FreeBSD:14:amd64
Prefix         : /usr/local
Categories     : net
Licenses       : GPLv2
Maintainer     : m.muenz@gmail.com
WWW            : https://github.com/marjohn56/udpbroadcastrelay
Comment        : UDP multicast/unicast relayer
Annotations    :
    FreeBSD_version: 1400073
    build_timestamp: 2023-02-17T16:20:47+0000
    built_by       : poudriere-git-3.3.99.20220831
    port_checkout_unclean: no
    port_git_hash  : c265aeb485a2
    ports_top_checkout_unclean: yes
    ports_top_git_hash: 2af75af3449a
    repo_type      : binary
    repository     : pfSense
Flat size      : 38.7KiB
Description    :
udpbroadcastrelay 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.

WWW: https://github.com/marjohn56/udpbroadcastrelay
[23.01-RELEASE][blah@blah]/root: /usr/local/sbin/udpbroadcastrelay --id 2 --port 5353 --dev igb1 --dev igb1.50 --multicast 224.0.0.251 -s 1.1.1.1 --allowcidr 192.168.1.0/24 --allowcidr 192.168.50.0/24 --blockcidr 192.168.50.163/32 -d
ID set to 2
Port set to 5353
Outgoing source IP set to 1.1.1.1
Unknown arg: --allowcidr
[23.01-RELEASE][blah@blah]/root: /usr/local/sbin/udpbroadcastrelay --id 2 --port 5353 --dev igb1 --dev igb1.50 --multicast 224.0.0.251 -s 1.1.1.1 --blockcidr 192.168.50.163/32 -d
ID set to 2
Port set to 5353
Outgoing source IP set to 1.1.1.1
Unknown arg: --blockcidr
Actions #53

Updated by Marcos M 12 months ago

Idealy the port would be updated upstream in FreeBSD rather than having to run a pfSense-specific build.

For those allow/block parameters, it seems to me that simple firewall rules will work. The real benefit will come if/when https://github.com/marjohn56/udpbroadcastrelay/issues/13 is implemented.

Actions #54

Updated by I W 12 months ago

I can verify that pkg install pfSense-pkg-udpbroadcastrelay-1.0.pkg doesn't work on pfSense 2.6
It would be nice if pfSense-pkg-udpbroadcastrelay-0.1_6.pkg were still available for those of us waiting on pfsense 2.7 stable.

amd64
12.3-STABLE
FreeBSD 12.3-STABLE RELENG_2_6_0-n226742-1285d6d205f pfSense

Crash report details:

PHP Errors:
[04-May-2023 23:15:54 America/New_York] PHP Fatal error:  Uncaught Error: Call to undefined function config_get_path() in /usr/local/pkg/udpbroadcastrelay/udpbroadcastrelay.inc:458
Stack trace:
#0 /usr/local/pkg/udpbroadcastrelay/udpbroadcastrelay.inc(202): udpbr_get_settings(true)
#1 /etc/inc/pkg-utils.inc(802) : eval()'d code(1): udpbr_resync()
#2 /etc/inc/pkg-utils.inc(802): eval()
#3 /etc/inc/pkg-utils.inc(928): eval_once('udpbr_resync();')
#4 /etc/rc.packages(76): install_package_xml('udpbroadcastrel...')
#5 {main}
  thrown in /usr/local/pkg/udpbroadcastrelay/udpbroadcastrelay.inc on line 458

Actions #55

Updated by Alhusein Zawi 11 months ago

installed the package on 2.7 and the service is working

2.7.0-DEVELOPMENT (amd64)
built on Fri May 26 06:04:59 UTC 2023
FreeBSD 14.0-CURRENT

Actions #56

Updated by Marcos M 11 months ago

  • Status changed from Feedback to Resolved
Actions #57

Updated by Marcos M 11 months ago

  • File deleted (pfSense-pkg-udpbroadcastrelay-1.0.pkg)
Actions

Also available in: Atom PDF