OPNsense Forum
Archive => 19.7 Legacy Series => Topic started by: nivek1612 on December 28, 2019, 12:31:56 pm
-
So I'm almost there in getting Sonos on a separate VLAN to be controllable via the iPhone app on another VLAN
I found this article https://forum.netgate.com/topic/139218/sonos-speakers-and-applications-on-different-subnets-vlan-s
yes I know its from the darkside
But my only issue is I can only get it to work when I run it in debug mode ie I start pmid with the -d parameter which means it runs in the foreground on the console and fills it with diagnostics messages
Anyone managed to get it working ?
-
You mean it only works in debug? Does this make sense?
-
Yes if I start pmid from the cmd line with
pmid -d - c /usr/local/etc/pmid.conf
Then it works as expected and I’m able to access my Sonos on one vlan from another vlan
-d is debug parameter - c is conf file location
But
pmid -c /usr/local/etc/pmid.conf shows it’s started in the logs but no other messages and I’m unable to access Sonos
-
Can you try -f instead of -d and look for errors?
-
Now that interesting because using -f instead of -d also works
So now I'm suspecting pimd just doesn't like being run in the background
Would making PIMD a plugin get around that ?
-
Isnt there a rc Script to handle this correctly?
/usr/local/etc/rc.d/pimd onestart
-
Yes there is and I missed that completely
Added a file pmid to /etc/rc.conf.d with the line
pmid_enabled="YES"
Now it is running after a reboot and all is working perfectly
Thanks for the quick guidance, as always the support on this forum is just first class.
I guess the only downside of this approach is having to reconfigure post upgrades as I assume the conf files will be overwritten
-
Can you post your config so I can build a plugin for it?
-
Sure not sure what level of detail you want so here goes
I run the following VLANs
1 - Trusted devices
10 - TV (set top boxes and TVs)
20 - IP cameras
30 - IOT (Sonos, Alexa, home automation)
1003 - Guest Wi-Fi
I want to be able to control Sonos on VLAN 30 from VLAN 1
Installed the pimd package
#pkg add http://pkg.freebsd.org/FreeBSD:11:amd64/quarterly/All/pimd-2.3.2.txz
By default pimd runs on all interfaces so I edited /usr/local/etc/pimd.conf to disable those I’m not interested in
phyint pppoe0 disable
phyint igb1_vlan1003 disable
phyint igb1_vlan10 disable
phyint igb1_vlan20 disable
phyint ovpns1 disable
Now to ensure pimd starts after a reboot
create /etc/rc.conf.d/pimd
which contains one line
pimd_enable="YES"
I have my firewall rules open at the minute between VLANs until I got this working but I'm now about to start restricting them just to the Sonos ports
-
This seems to be easy ...
-
Lol .... well you did catch my mistakes quickly
-
HI, @mimugamail do you need anything else from me for the plugin creation ?
-
No .. but this will be after 20.1 (if it will) .. :)
-
cool I have it manually installed on 20.1.b_32 and I'm happy to keep a manual install until/if the plugin appears
Would be nice to have something that is running on my firewall as an official plugin though :-)
-
I've messed around with exactly the same things in the last days.
And I was so happy when I found this thread. :-)
I would be happy too when the PIMD would become an official plugin for OPNsense.
BTW: There's a typo. The file /etc/rc.conf.d/pimd must contain "enable" and not "enabled"
-
Good catch - just amended the post incase others read it later
-
I also configured my opnsense box for multicast streaming over VLANs some days ago. The goal was to make a DLNA server (minidlna) in one VLAN discoverable and available to clients in a different VLAN.
At first I tried using igmp-proxy. The problem is that it ignores site-local multicasting and therefore does not forward those packets upstream (see https://github.com/pali/igmpproxy/blob/d755b5b6327982434b87d631e089099dfd9a2ab4/src/igmp.c#L124).
After installing pimd it worked without having to configure anything. I tried to build the package myself but due to limited time ended up installing it from https://pkg.hardenedbsd.org/HardenedBSD/pkg/FreeBSD:11:amd64/All/pimd-2.3.2.txz.
Things to note:
- pimd can be started with all interfaces disabled by default ("pimd -N")
- interfaces can be enabled selectively by modifying /usr/local/etc/pimd.conf (I only enabled the VLAN interfaces I want to be able to participate in multicasting)
It would be great if pimd would be made available as an official plugin since igmp-proxy seems not to be working for inter-VLAN service discovery (SSDP / DLNA etc.).
-
Can you post your config so I can build a plugin for it?
Bin the plugin for this one Michael - we've found something better. Works with Sonos and Sky Q.
https://github.com/sonicsnes/udp-broadcast-relay-redux (https://github.com/sonicsnes/udp-broadcast-relay-redux)
I'm going to attempt to create a plugin, might take me a while and I'll probably be asking for help. :)
-
Yes confirmed this one allows both Sonos and SkyQ to work together which PIMD didn't seem to handle
-
Wow, I am playing with this for the last few weeks as well. All inputs and possible plugins are very much appreciated! :)
-
It's very easy to set up. If you pull down that repo, compile it. There are instructions on how to install it and where to put the .conf and .sh files. We didn't take that path, just compiled it and dropped it into /usr/sbin, then we used Monit to fire it up and keep it going. Works very well.
If you get stuck, shout, and I'll post the way we did it.
-
Hmm. You Guys lost me now.
I am running IGMP proxy at the moment for Deutsche Telekom Magenta TV which works well. I assumed I cannot run PIMD in parallel. Not sure if udp-broadcast-relay-redux can. Would it be cable to handle all multicast relaying that the IGMP proxy currently does?
thanks!
-
Only one way to find out....try it.
We used it because of the TTL=1 issue. When installed Nivek1612 found he no longer needed PIMD for his Sonos.
Here's a little excerpt from the doc that's in the archive.
However, the udp-broadcast-relay-redux tool allows arbitrary relaying of UDP packets between interfaces, and this helps to solve the problem.
-
could someone please share a binary of it? I don't have a compiler on my firewall. TIA!
-
Here you go. There's an .md file in there that explains how to install it on pfSense. As I said we installed it using Monit, either way is good.
Attachment removed as a plugin is now available for testing. PM me if you want to try it.
-
@skywalker007
I can't say if this will work at the same time as IGMPproxy because I haven't tried it
But when I tried to run PIMD and IGMPProxy at the same time PIMD complained
When I tried udp-broadcast-relay-redux with PIMD it worked so my suspicion is udp-broadcast-relay-redux will work with IGMPproxy
But only one way to really know :-)
-
Thanks. I have to test that at the weekend. Will reply back with results.
-
I've re-compiled it with a more sensible name and fixed the rc.d file which was badly formatted and Opnsense hated.
I'll re-post the archive tomorrow with full instructions on how and where to install the required bits and how to keep it ticking over using Monit.
-
I've re-compiled it with a more sensible name and fixed the rc.d file which was badly formatted and Opnsense hated.
I'll re-post the archive tomorrow with full instructions on how and where to install the required bits and how to keep it ticking over using Monit.
Cool. Looking forward to it! Thanks!
Gesendet von iPad mit Tapatalk
-
OK, here we go...
The archive contains all you need and a docx file ( sorry using windoze ).
Good luck.
Archive removed. Plugin in beta. PM me if you want to test
-
The archive contains all you need and a docx file ( sorry using windoze ).
No worries, even my mac can display that docx format :-)
-
Nivek1612 just tested and apart from the fact he cannot spell there appears to be file permission errors.
I have re-zipped it on from the host router so it should all be correct now.
I've also replaced the original attachment in the earlier message.
Attachment removed as a plugin is available for testing. PM me if you want to try it.
-
@marjohn I'm waiting for you to read my last email re /etc/rc.conf.d/ :) :) :)
-
done.. :D
-
Ok, I can confirm this works.
I have not tried replacing my IGMPproxy for IPTV. I am just running a single instance of the relayproxy for port 1900 for Sonos and that works.
Many thanks for all who contributed to the solution, especially @marjohn56.
-
Good stuff.
I now have a modified version that will write the pid value etc to /var/run and allows you to specify the name of the pid file if you want. It will auto create a pid file called udpbcastrelay_[ID] using the ID value if you don't set your own pid filename.
It will be useful if you want to run multiple instances without having to rename the exe itself. For example, in Monit you would monitor the process by its ID, obtained from its PID file rather than just the process name itself, it would not work if you tried to monitor two instances with the same process name : :)
-
I just found that thread today because im looking for a similar multi VLAN solution for:
- IPTV (Multicast)
- Sonos
- Shelly (CoAP / CoIoT Procotol)
- AirPlay
Is there any package for that already? Can't find it.
Is there any doc's how to configure it? What I have to know/configure to get it working.
TIA. Regards
scream
-
We're working on a package. In the meantime if you go back a couple of messages in this thread you'll see I posted an archive with all the details on how to install and configure it.
In its present form you'll need to manually configure as Monit is using the process itself to monitor. I have an updated version of the exe that will allow multiple instances from monit but I'm not quite ready to let that out into the world yet. Do do it without monit just use the rc.d stuff but create multiple copies, the instructions are in the docs.
Hopefully, and this is only hopefully if time allows, we'll have a full package available somewhere around 20.1.2
-
I have a plugin ready for testing, single instance only, but if you only need to relay one port then it's good. It will install properly and it installs the daemon as well so there's no hard work involved at all.
Let me know if anyone wants to try it.
-
Happy to volunteer for testing.
just let me know what to do with the manually installed pieces (rename/leave there but stop/whatever).
cheers!
-
Also - keep in mind, I am on the release, not dev. So I am running 19.7.9.
-
PM me, I'll send you the file and instructions, as for the way you've done it, you can remove it all.
-
tested the plugin in test and now production and works perfect nice smooth install process
-
Just a note, the plugin handles multiple instances, so you can relay/broadcast more than one port or multicast range, also now handles source address for use with the likes of chromecast.
-
Cheers for the great work @marjohn56! I would be very much interested trying it out.
What is the difference between pimd and udp-broadcast-relay? I was thinking pimd forwards the whole 224.0.0.0/4 subnet, but that could have been false.
-
It works better than PIMD :)
Sent you the plugin link via pm.
-
Hey marjohn56, may I have the plugin too?
Thanks!
-
PM on the way...
-
Thanks a lot Marjohn, It works flawless with mDNS (used for AirPlay) but it has some issues with SSDP, here is my scenario:
Network 1: DLNA control point (iPhone Naim app)
Network 2: DLNA media server (QNAP NAS) + DLNA media renderer (Naim streamer
Configured relay to IP 239.255.255.250 for the 1900 UDP port.
Whenever I open the control point application from network 1 I can't see the media server.
If I restart the media server while I'm in the discovery screen of the control point I can see and select the Media Server.
If I close the app and reopen it the media server is gone.
So basically it seems that if the control point is running and the media server send the broadcast message at startup the frames got relayed, otherwise no. Please note that if I keep the control point app on the same network this does not happen and it always shows the Media Server.
Till now I tried to change the TTL flag and also enabled/disabled IGMP snooping, but nothing changes.
Do you have any advice on how can I debug this issue?
Many thanks for your work.
-
Sounds like the media server stops sending once it's got an ack from the control point. @bertofurth may have an idea, he's done some deep discovery work with the daemon.
-
Hello everyone!
Thanks for your work this sounds amazing.
I am struggling for days to get different services IPTV, Sonos, Phillips etc running.
I would really like to test and give feedback as well. Could you send it to me to?
Best regards
-
See https://forum.opnsense.org/index.php?topic=15910.msg72858#msg72858 (https://forum.opnsense.org/index.php?topic=15910.msg72858#msg72858)
-
Sounds like the media server stops sending once it's got an ack from the control point.
I will try to debug once I get back home (this weekend) but it seems strange that he stops sending when he receive the ACK as this don't happens when both are connected under the same network.
Maybe @bertofurth has some suggestions on how to debug it.
Please let me know if you want to continue this discussion on the new thread.
Thanks a lot.
-
Network 1: DLNA control point (iPhone Naim app)
Network 2: DLNA media server (QNAP NAS) + DLNA media renderer (Naim streamer
Configured relay to IP 239.255.255.250 for the 1900 UDP port.
Re-reading this those settings are exactly the same as I use for my Sky receiver and app. It works perfectly and I have no issues, it was the reason I went with udpbroadcastrelay to start with as it worked so well. All I can suggest at this point is to do some packet sniffing on both VLANs, firstly when the media server is re-started, then again when it isn't and see what the difference is.