Ubuntu – DNS & .local domain 18.04

avahidhcpdnsnetwork-managernetworking

I am trying to join Ubuntu laptops to our domain company.local (Yes I know .local is bad practice)

I am having some issues with only what I can assume is DNS. I can't ping the domain controller (dc.company.local) but I can ping other devices in a Foward Lookup Zone (mobiledevice.company.net) so this has to lead me to think Avahi is the issue.

In my research Avahi reserves .local for the local machine? So I have edited domain-name=local to domain-name=alocal under /etc/avahi/avahi-daemon.conf

I have also edited my /etc/nsswitch.conf from:

files mdns4_minimal [NOTFOUND=return] dns mdns4

to:

files dns mdns4_minimal mdns4

My understanding is this should say to Ubuntu, use the host file and then the DNS server (Which is being given out by DHCP).

But I cannot resolve any names on my network ending in .local

Apologies if the formatting is weird this is my fist "proper" post!

Best Answer

I've had similar issues with systemd-resolved (which is what Ubuntu 18.04 usually uses for name lookup). For me, the following entry in /etc/nsswitch.conf fixed those issues:

hosts:          files mdns4_minimal [NOTFOUND=return] resolve [!UNAVAIL=return] dns