I have been having issues with AirPlay for a long time. Initially, I had the TV and connecting devices on two different subnets. Even after I moved the TV into the same subnet to reduce the complexity, AirPlay is still not working.
Does anyone have any tips on how to make Avahi/AirPlay work on Pfsense 24.03 + edition?
In most cases, the device is not even shown on the AirPlay list.
Haven’t touched this on pfSense+, but on the community edition, I use avahi to airplay from my WiFi network to a media vlan where all of my media devices live.
There are a few places this can get hung up. I have firewall rules allowing udp 5353 between the two vlans (not necessary if your devices are on the same subnet). I also had problems with avahi hanging after a couple days, so I have a cron job that restarts it every night. Not sure if that’s still necessary, but it doesn’t hurt anything and I haven’t bothered to test again in recent versions.
Another place to look is at your WiFi access points and switches. AirPlay relies heavily on multicast traffic and some networking infrastructure blocks multicast by default. This will be different from product to product, so consult your documentation.
Thanks, the service rarely if ever goes down. But I still have the watchdog set just in case. The access points are Asus routers on Merlin firmware. I guess I will have to check what is going on there.
So for each vlan create a multicast rule for mDNS (port 5353). I found this works most of the time create rules on each VLAN:
Source: Any
Destination: 224.0.0.251 or IPv6 address ff02::fb
Port: 5353
Advanced Option: Allow IP optionsAllow packets with IP options to pass. Otherwise, they are blocked by default. This is usually only seen with multicast traffic
That last one was key for it working on my networks. If I didn’t tick that box I would only see nodes on my local VLAN.
Believe it or not it was an Wikipedia article that gave me the ah ha moment: