Mapping for /etc/hosts entries with .local as TLD isn't working

I use XFCE with the manjaro kernel 5.10.126-1-MANJARO and I have an issue with the mapping of entries with the .local TLD in /etc/hosts.

You can try to reproduce it by adding the following in your /etc/hosts: toto.local

And then this should return but will return nothing:

$ getent ahosts toto.local

Solved: Thanks @xabbu I didn’t know that! I used .local for my AD domain in my test environment but I will avoid it in the future. By default on my manjaro install it was avahi and not systemd-resolved. So i had to edit /etc/nsswitch.conf and replace mdns_minimal4 [NOTFOUND=return] with mdns_minimal4 then I did a systemctl reload avahi-daemon

1 Like

Do not use .local . It is a reserved DNS Domain and should only be used for mDNS.

Use a different domain. If you really musst use .local and don’t care about any RFC’s, disable all mDNS related services and make sure you don’t use systemd-resolved.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.