Schlagwörter-Archiv: mDNS

We have some nice Sonos speaker in our network. Of course we devided our network in private and guest. Guest just have acces to the internet.

Sometimes we want our guests to be able to choose the music. In the past they used a tablet for this but they had no access to their own playlists.

Since some weeks Spotify connect is able to control Sonos speaker to play music on them. So why not allow devices from guest-LAN to acces Sonos speaker to control them via Spotify connect?

Our setup: We have a linux box with iptables as a gateway between these two subnets (seperated by VLANs).

Spotify connect uses mDNS for discovery so I sat up the avahi deamon and enabled two options in the configuration.

1

apt-get install avahi-daemon

/etc/avahi/avahi-daemon.conf

1

2

3

4

5

[server]

allow-point-to-point=yes

[reflector]

enable-reflector=yes

Also you need a tiny hole in your firewall. The first rule is to allow the access to the mDNS daemon. The other rules are one per Sonos device you want to allow acces to. We have „private“ Sonos devices we don’t want to share so we have not allowed all of them.

1

2

3

/sbin/iptables-AINPUT-pudp--dport5353-jACCEPT-mcomment--comment"mDNS for Spotify"