mDNS .local domains requires Split DNS router

I’m using a setup where my Raspberry 3B+ is connecting to the local network over Wifi. As we are still under bullseye, I used Configurer le WiFi sur un Pi manuellement à l'aide de wpa_supplicant.conf
The mDNS resolution on the local network is not working. Could it be that the /etc/yunohost/mdns.yml config is hard-coded on the eth0 ?

Note: for bullseye, the method for setting headless wireless has changed : https://www.raspberrypi.com/documentation/computers/configuration.html#connect-to-a-wireless-network
See Update install.fr.md correct Raspberry headless Wifi instructions link by Gredin67 · Pull Request #2394 · YunoHost/doc · GitHub

It may be the issue, though I think the yunomdns script is supposed to broadcast on all available interfaces.

Can you check the yunomdns service logs? It should list the involved interfaces.
What’s your Wi-Fi interface name?

I think you’re right, it adds to the correct wlan0 interface

-- Boot 5c2efa41b726499388f1d44474a627ae --
Feb 08 09:17:23 systemd[1]: Started YunoHost mDNS service.
Feb 08 09:17:28 yunomdns[1082]: Adding yunohost.local with addresses ['192.168.5.166'] on interface wlan0
Feb 08 09:17:28 yunomdns[1082]: Adding fan.local with addresses ['192.168.5.166'] on interface wlan0
Feb 08 09:17:28 yunomdns[1082]: Adding influxdb.local with addresses ['192.168.5.166'] on interface wlan0
Feb 08 09:17:28 yunomdns[1082]: Adding nodered.local with addresses ['192.168.5.166'] on interface wlan0
Feb 08 09:17:28 yunomdns[1082]: Adding phpmyadmin.local with addresses ['192.168.5.166'] on interface wlan0
Feb 08 09:17:28 yunomdns[1082]: Registering...
Feb 08 09:17:30 yunomdns[1082]: Registered. Press Ctrl+C or stop service to stop.

Maybe some DNS protection on the Router…

Conclusion, I just had to enable Split DNS and give a fixes IP lease in the in the settings of my router.

Another issue, yunomdns is not starting randomly sometimes. This could be related to the fact that I am connected to the same router over wlan0 and eth0, with 2 fixed DHCP leases.

A related question/issue :

I installed my raspberry 3b+ in headless wireless setup, Configurer le WiFi sur un Pi manuellement à l'aide de wpa_supplicant.conf

Now I want to switch back to ethernet connexion and use hotspot_ynh.
The config panel of hotspot is not loading. Could it be related to the initial headless setup ?

Define “not starting”: is there an error in the service logs?

Wild guess, in absence of details: it’s starting fine,but before the interfaces. It might be needed to tweak the systemd configuration file to declare the interfaces dependency.

cf. this and the two proposed lines:

BindsTo=sys-devices-virtual-net-<interface>.device
After=sys-devices-virtual-net-<interface>.device

Though BindsTo might be a bit too strong, it would make the yunomdns service stop whenever one of the interfaces goes down.

If that is actually the issue, and the proposed solution works, it would be interesting to add it to YunoHost.

Not quite, it would be better to open a dedicated thread. :wink:

I’ll check this if/when the problem occur.

I opened an issue here Config panel not working · Issue #120 · YunoHost-Apps/hotspot_ynh · GitHub

The issue was related to the router configuration. I had to:

  • enable Split DNS
  • (give a fixed IP)

1 Like