I have a Sonos system and I tried getting Noson (installed via flatpack, it’s not in nixpkgs yet) to work with it, and I tried several things but in the end this is what made it work:
# support SSDP https://serverfault.com/a/911286/9166
networking.firewall.extraPackages = [ pkgs.ipset ];
networking.firewall.extraCommands = ''
ipset create upnp hash:ip,port timeout 3
iptables -A OUTPUT -d 239.255.255.250/32 -p udp -m udp --dport 1900 -j SET --add-set upnp src,src --exist
iptables -A INPUT -p udp -m set --match-set upnp dst,dst -j ACCEPT
'';
I also have the avahi service enabled to make Chromecast work, maybe that’s necessary too.
I’m wondering if there is a better way to configure this in NixOS, and also if perhaps there should be an allowSsdp setting in the firewall module.
What about firewall stops and updates, should there be anything done?