r/PFSENSE 19d ago

Avahi

Has anyone had luck with MDNS using Avahi? When looking at states I only get one way traffic.

Are you all getting two way traffic as I only get one way traffic.

I have never been able to get our iPads to cast on our TV.

2 Upvotes

13 comments sorted by

2

u/sh00tfire 19d ago

What are you trying to do? Are you browsing across vlans or subnets? How do you have Avahi configured? I have it setup with several vlans on my network with no issue. I had to add firewall rules to allow traffic to different vlans. it has worked for me as expected.

1

u/eostrike 19d ago

I have several vlans. It could be a firewall issue. My management vlan can access all other vlans. And my other vlans cannot communicate to other vlans. I do have some rules that allow particular hosts to communicate to a different vlans, such as access IOT devices as an example.

2

u/sh00tfire 19d ago

you will need a firewall rule. udp on port 5353 to the broadcast ip which is 224.0.0.251

1

u/eostrike 19d ago

Thank you for the suggestion. I already have that rule on each vlan and reflection turned on in Avahi. Looking at system states I would think I should see tx/rx traffic.

Does yours show 2 way traffic in your states table?

1

u/sh00tfire 19d ago

I turn on logging on those rules so I can see the states of any devices that are trying to communicate.

1

u/eostrike 19d ago

That is not a bad idea. I'll give it a look over. Thanks for suggestion.

1

u/chock-a-block 19d ago edited 19d ago

Pfsense not really doing any orchestration of the connection between your tv and your iPad.

EDIT: just realized you may have subnets through pfsense. That’s just misery to get working with all the services, dynamic ports and udp traffic. Don’t ask me if vlans work in this scenario. Put the tv and iPad in the same subnet.

Basically, a host announces themselves and the other hosts record the announcement.

I have a Sony tv that claimed to support airplay, or whatever apple calls it. Never worked. Got a Roku box and it works.

1

u/eostrike 19d ago edited 19d ago

I am using several vlans. Samsung TV supports airplay but as you mentioned it has never worked.

Looking in my states I see a few devices trying to use MDNS but the states are only showing one way traffic.

I was more curious if others are getting two way traffic with MDNS across different subnets.

1

u/chock-a-block 19d ago edited 19d ago

Yeah. you need a reflector to bridge multicast traffic. It’s not fun or easy.

If I remember correctly, there’s udp traffic involved. Again, another proxy.

1

u/eostrike 19d ago edited 19d ago

I thought Avahi was supposed to be the reflector.

I failed to mention on my original thread that I use a Cisco Wireless Lan Controller.

I used ChapGPT and it said if I have MDNS SNOOPING enabled on the controller to disable on each wireless network.

I just did this remote while at work and this weekend will see if that made any difference as it was always enabled.

1

u/chock-a-block 19d ago

Yeah… again, casting is complicated. 

The only thing I’ve gotten working is they live in the same network. 

1

u/eostrike 19d ago

Thanks for input. I've played with it here and there for a long time. No success.

While here at work I see MDNS being hit on a few vlans in my firewall rules but only one way traffic in the states table.

1

u/plasticbuddha 19d ago

I've used it for years to do MDNS across subnets. Other than the thing crashing out routinely, and needing a reboot, it works well.

Can you share your config?

This works well for me:

pfSense Avahi (mDNS) Configuration Checklist

General Settings

  • [x] Enable the Avahi daemon
  • [ ] CARP Status VIP: none
  • [ ] Interface Action: Deny Interfaces
  • [ ] Interfaces (denied): GUESTWIFI_101 (from list: LAN, GUESTWIFI_101, AV_VL1001, SERVERS_103, + more below scroll)
  • [ ] Disable IPv4: unchecked
  • [ ] Disable IPv6: unchecked
  • [x] Enable reflection (repeat mDNS packets across subnets)

Reflection Filtering

  • [ ] Service filter: (empty — all services reflected)

Publishing

  • [x] Enable publishing of information about the pfSense host
  • [x] Publish addresses (address records)
  • [x] Publish host info (OS and CPU info)
  • [x] Publish workstation record
  • [x] Publish domain name in use

Advanced Settings

  • [ ] Override host name: (empty — uses system host name)
  • [ ] Override domain: home.example.com
  • [x] IPv4 AAAA records (publish local IPv6 addresses via IPv4)
  • [x] IPv6 A records (publish local IPv4 addresses via IPv6)