[Solved] Sonos on VLANS

Started by nivek1612, December 28, 2019, 12:31:56 PM

Previous topic - Next topic
December 28, 2019, 12:31:56 PM Last Edit: January 10, 2020, 09:37:24 AM by nivek1612
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 ?

OPNsense 24.7.* on Qotom i5-5250U with AAISP FTTP 900/120
OPNsense 24.7.* on Qotom i7-4500U with Orange FR FTTP 1000/400

Team Rebellion Member
One of Marjohns TESTERS :-)

You mean it only works in debug? Does this make sense?

December 28, 2019, 02:17:47 PM #2 Last Edit: December 29, 2019, 12:52:05 AM by nivek1612
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
OPNsense 24.7.* on Qotom i5-5250U with AAISP FTTP 900/120
OPNsense 24.7.* on Qotom i7-4500U with Orange FR FTTP 1000/400

Team Rebellion Member
One of Marjohns TESTERS :-)

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 ?

OPNsense 24.7.* on Qotom i5-5250U with AAISP FTTP 900/120
OPNsense 24.7.* on Qotom i7-4500U with Orange FR FTTP 1000/400

Team Rebellion Member
One of Marjohns TESTERS :-)

Isnt there a rc Script to handle this correctly?

/usr/local/etc/rc.d/pimd onestart

December 28, 2019, 11:45:17 PM #6 Last Edit: December 29, 2019, 12:12:41 AM by nivek1612
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 
OPNsense 24.7.* on Qotom i5-5250U with AAISP FTTP 900/120
OPNsense 24.7.* on Qotom i7-4500U with Orange FR FTTP 1000/400

Team Rebellion Member
One of Marjohns TESTERS :-)

Can you post your config so I can build a plugin for it?

December 29, 2019, 09:50:31 AM #8 Last Edit: December 31, 2019, 02:31:45 PM by nivek1612
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
OPNsense 24.7.* on Qotom i5-5250U with AAISP FTTP 900/120
OPNsense 24.7.* on Qotom i7-4500U with Orange FR FTTP 1000/400

Team Rebellion Member
One of Marjohns TESTERS :-)


Lol .... well you did catch my mistakes quickly
OPNsense 24.7.* on Qotom i5-5250U with AAISP FTTP 900/120
OPNsense 24.7.* on Qotom i7-4500U with Orange FR FTTP 1000/400

Team Rebellion Member
One of Marjohns TESTERS :-)

HI, @mimugamail do you need anything else from me for the plugin creation ?
OPNsense 24.7.* on Qotom i5-5250U with AAISP FTTP 900/120
OPNsense 24.7.* on Qotom i7-4500U with Orange FR FTTP 1000/400

Team Rebellion Member
One of Marjohns TESTERS :-)

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 :-)
OPNsense 24.7.* on Qotom i5-5250U with AAISP FTTP 900/120
OPNsense 24.7.* on Qotom i7-4500U with Orange FR FTTP 1000/400

Team Rebellion Member
One of Marjohns TESTERS :-)

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"
Duck, Duck, Duck, Duck, Duck, Duck, Duck, Duck, Goose