On a local network im using a PC with Ubuntu 18.04 and i have two raspberry pi one of which is running pi-hole as DNS server (im not using its DHCP) and the other one has just a web server on it.

All the devices uses avahi-daemon.

The problem is pione.local or pitwo.local are not always resolved either via http or ssh. Sometimes works then stops working and then works again ...

I tried several thing including :

  • Playing with /etc/nsswitch.conf (tried a lot of combinations)
  • Deactivating completely pi-hole to use the box DNS
  • Editing hosts file to remove pione (for example)
  • Editing /etc/avahi/avahi-daemon.conf to change some parameters like publish-workstation, publish-domain, publish-addresses, ... none of it changed anything. (and avahi out of the box should just work i think)
  • Tried to change the orginal ubuntu symlink of /etc/resolve.conf
/etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf
/etc/resolv.conf -> /run/systemd/resolve/resolv.conf

None of these seems to work ... resolution with hostname.local sometimes works and sometimes i have to enter the local ip of the device to access it. Im getting out of ideas with this problem and i tend to think it's because of Ubuntu 18.04 settings which i haven't changed a lot from original settings.

Ideas are welcome !


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.