• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

How can I get this UDP relay package for casting across VLANs?

pfSense Packages
21
123
49.7k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S
    stephenw10 Netgate Administrator
    last edited by Aug 3, 2020, 4:17 PM

    You probably need to NOHUP it too, something like:
    /usr/bin/nohup /full/path/to/your_command > /dev/null &

    B 1 Reply Last reply Aug 3, 2020, 7:59 PM Reply Quote 0
    • B
      burntoc @stephenw10
      last edited by Aug 3, 2020, 7:59 PM

      @stephenw10 So here's the command I tried based on your comment:

      /usr/bin/nohup /root/udpbroadcastrelay/./udpbroadcastrelay --id 1 --port 5353 --dev igb2.60 --dev igb1.70 --multicast 224.0.0.251 -s 1.1.1.1 /dev/null &

      That produced the same result. Avahi, arpwatch, nuts, suricata, and pfblockerNG all fail to start on boot. I can start them afterwards, though.

      1 Reply Last reply Reply Quote 0
      • S
        stephenw10 Netgate Administrator
        last edited by Aug 3, 2020, 8:05 PM

        Hmm, I would use the -f option since it provides it instead of &. The /dev/null is just to redirect any output that might otherwise spam stuff but you need > /dev/null to do that. You probably don't need that anyway.
        If you kill the udpbroadcastrelay process when it's booted do the other services then start?

        Steve

        1 Reply Last reply Reply Quote 0
        • B
          burntoc
          last edited by burntoc Aug 3, 2020, 8:11 PM Aug 3, 2020, 8:10 PM

          So would the syntax look like this?

          /usr/bin/nohup /root/udpbroadcastrelay/./udpbroadcastrelay --id 1 --port 5353 --dev igb2.60 --dev igb1.70 --multicast 224.0.0.251 -s 1.1.1.1 -f /dev/null

          In my tests they've acted similarly, but I've not used nohup until you mentioned it.

          1 Reply Last reply Reply Quote 0
          • S
            stephenw10 Netgate Administrator
            last edited by Aug 3, 2020, 9:29 PM

            I expect either:
            /usr/bin/nohup /root/udpbroadcastrelay/./udpbroadcastrelay --id 1 --port 5353 --dev igb2.60 --dev igb1.70 --multicast 224.0.0.251 -s 1.1.1.1 -f > /dev/null

            Or don't bother with sending output anywhere and just use:
            /usr/bin/nohup /root/udpbroadcastrelay/./udpbroadcastrelay --id 1 --port 5353 --dev igb2.60 --dev igb1.70 --multicast 224.0.0.251 -s 1.1.1.1 -f

            But try killing the process after it boots. The other services will then start if that is what you're hitting.

            Steve

            1 Reply Last reply Reply Quote 0
            • B
              burntoc
              last edited by Aug 4, 2020, 12:04 AM

              I actually tried the second command you provided first, as I don't really need the output and it hung the services. As you suggested, killing it then allowed the services to start.

              I tried one last time with the first command - and it looks like it may have worked! I'm not going to get another chance to reboot for a bit to test again, but I am optimistic enough to say thank you for your help with this. I'm not sure why it was hanging it, but it seems this approach may have addressed it.

              1 Reply Last reply Reply Quote 0
              • B
                burntoc
                last edited by Aug 4, 2020, 1:01 AM

                I snuck in a reboot while I had a moment and I can confirm it is working with the first command you provided. Thanks again, Steve.

                1 Reply Last reply Reply Quote 0
                • S
                  stephenw10 Netgate Administrator
                  last edited by Aug 4, 2020, 10:49 AM

                  Nice!

                  Let us know how that goes. You might open a feature request in redmine to create a package for it if it performs well.

                  Steve

                  B 1 Reply Last reply Aug 6, 2020, 3:14 PM Reply Quote 0
                  • B
                    burntoc @stephenw10
                    last edited by Aug 6, 2020, 3:14 PM

                    @stephenw10 It's still going great, and I submitted the request:

                    https://redmine.pfsense.org/issues/10818

                    L 1 Reply Last reply Jan 25, 2021, 12:01 PM Reply Quote 4
                    • T
                      tman222
                      last edited by Aug 24, 2020, 1:19 PM

                      Hi all,

                      This is an interesting thread - I had a couple questions:

                      1. Any particular reason 1.1.1.1 is used as the source IP instead of an IP address on the subnet that contains the chromecasts?

                      2. Can the UDP broadcast relay code also be compiled on pfSense or is a separate install of FreeBSD 11.3 required?

                      Thanks in advance.

                      1 Reply Last reply Reply Quote 0
                      • S
                        stephenw10 Netgate Administrator
                        last edited by Aug 24, 2020, 1:52 PM

                        Unclear why 1.1.1.1 is used there. It could just be an example IP.

                        Yes you need a separate FreeBSD install to compile it. There are no build tools in pfSense.
                        https://docs.netgate.com/pfsense/en/latest/development/compiling-software-on-the-firewall.html

                        Steve

                        T 1 Reply Last reply Aug 24, 2020, 2:04 PM Reply Quote 0
                        • T
                          tman222 @stephenw10
                          last edited by Aug 24, 2020, 2:04 PM

                          @stephenw10 said in How can I get this UDP relay package for casting across VLANs?:

                          Unclear why 1.1.1.1 is used there. It could just be an example IP.

                          Yes you need a separate FreeBSD install to compile it. There are no build tools in pfSense.
                          https://docs.netgate.com/pfsense/en/latest/development/compiling-software-on-the-firewall.html

                          Steve

                          Thanks @stephenw10 ! Regarding 1.1.1.1, looks like it's all explained here (should have read a bit closer):

                          https://github.com/marjohn56/udpbroadcastrelay#udp-broadcast-relay-for-linux--freebsd--pfsense--opnsense

                          I just wish they had used a different address than 1.1.1.1 since that's also the IP of Cloudflare's DNS -- makes it a bit confusing.

                          Once the code has been compiled, is there a recommended location (directory) to put the binary on pfSense?

                          Thanks again!

                          1 Reply Last reply Reply Quote 0
                          • S
                            stephenw10 Netgate Administrator
                            last edited by Aug 24, 2020, 2:15 PM

                            Ah, yes. Special IP. I agree, that's not a great choice. You can change that in the code, probably easier to live with it though.

                            You can put the binary anywhere in the path. I would probably put it in /root at least initially so it doesn't get overwritten.

                            Steve

                            1 Reply Last reply Reply Quote 0
                            • T
                              tman222
                              last edited by tman222 Aug 24, 2020, 4:19 PM Aug 24, 2020, 4:16 PM

                              @burntoc @stephenw10

                              Just wanted to follow up quick and validate that this works great! Compiled the code to binary on FreeBSD 11.3, moved it over to pfSense, and then used the command from Steve above to autostart it using ShellCmd (replacing dev devices as needed with my own):

                              /usr/bin/nohup /root/udpbroadcastrelay/./udpbroadcastrelay --id 1 --port 5353 --dev igb2.60 --dev igb1.70 --multicast 224.0.0.251 -s 1.1.1.1 -f > /dev/null
                              

                              Everything starts up fine after a firewall reboot and Google Home (Casting) and Apple TV (Airplay) work without issues. Avahi is no longer needed, plus there's the added bonus that Google Home speaker groups now work properly if the mobile device is in a different network subnet as the speakers / chromecasts.

                              Thanks again guys! Hopefully this can be made into an official pfSense package soon.

                              1 Reply Last reply Reply Quote 2
                              • S
                                stephenw10 Netgate Administrator
                                last edited by Aug 24, 2020, 4:23 PM

                                Nice!

                                1 Reply Last reply Reply Quote 0
                                • B
                                  burntoc
                                  last edited by Aug 24, 2020, 4:50 PM

                                  @tman222 @stephenw10 Yeah, it's awesome. Glad you figured it out. I was planning to respond to you but I just saw your messages as I was going into some work meetings.

                                  B 1 Reply Last reply Aug 28, 2020, 4:40 PM Reply Quote 0
                                  • B
                                    burntoc @burntoc
                                    last edited by Aug 28, 2020, 4:40 PM

                                    @burntoc said in How can I get this UDP relay package for casting across VLANs?:

                                    @tman222 @stephenw10 Yeah, it's awesome. Glad you figured it out. I was planning to respond to you but I just saw your messages as I was going into some work meetings.

                                    Aaannnd......now it isn't working. It's odd, because I didn't change anything that I can see would affect this. I was tweaking a couple of DNS settings (not mDNS) and I noticed it shortly after, but even putting them back and checking that the relay is running it is no longer showing my groups in the other VLAN. I had stopped avahi because as you noted it was working fine without it, but even turning that back on hasn't fixed the issue. I'm not sure why it stopped, though there was an update to the Google Home app recently....

                                    1 Reply Last reply Reply Quote 0
                                    • B
                                      burntoc
                                      last edited by burntoc Aug 28, 2020, 4:53 PM Aug 28, 2020, 4:42 PM

                                      Actually that must be part of the issue. I just looked and the groups are still showing on my iPad, just not on my Android phone at the moment. Grrrr.....

                                      UPDATE - Nah, they show up but can't cast to those groups any longer unless I connect to that VLAN.

                                      1 Reply Last reply Reply Quote 0
                                      • T
                                        tman222
                                        last edited by Aug 28, 2020, 5:18 PM

                                        Hi @burntoc - everything is still working fine here. I just checked on an iPhone and it does have the latest version of the Google Home app installed. What changes did you make to DNS? Also have you tried resetting your firewall states to see if that helps (i.e. forcing all the connections to be reestablished)? Come to think of it, I did have a bit of trouble the other night after I created a new group and then couldn't cast to it. However, after a few more attempts it did eventually start working and has worked fine since.

                                        T 1 Reply Last reply Aug 31, 2020, 5:29 PM Reply Quote 0
                                        • T
                                          tman222 @tman222
                                          last edited by Aug 31, 2020, 5:29 PM

                                          @tman222 said in How can I get this UDP relay package for casting across VLANs?:

                                          Hi @burntoc - everything is still working fine here. I just checked on an iPhone and it does have the latest version of the Google Home app installed. What changes did you make to DNS? Also have you tried resetting your firewall states to see if that helps (i.e. forcing all the connections to be reestablished)? Come to think of it, I did have a bit of trouble the other night after I created a new group and then couldn't cast to it. However, after a few more attempts it did eventually start working and has worked fine since.

                                          Just wanted to follow up on my last post real quick to confirm that everything is working is still working fine on Android based device as well for me (using latest version of Google Home app).

                                          @burntoc - were you ever able to resolve the issues you were seeing?

                                          B 1 Reply Last reply Aug 31, 2020, 6:53 PM Reply Quote 0
                                          • First post
                                            Last post
                                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.