Tara: Resolving of .local domains not working

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
PH896

Tara: Resolving of .local domains not working

Post by PH896 »

Hi,

i've installed Linux Mint Tara and I have currently a problem resolving .local domains, I get "Temporary failure in name resolution". I now there is normally a problem resolving these domains because there are reserved for multicast, therefore i changed the order in nsswitch.conf to "files dns" which worked in the past using e.g. Debian.

In my resolv.conf the localhost address is the only content as name server. When i directly enter my dns server there everything is working fine.

I've also checked the DNS requests with Wireshark: When i try to resolv a .local domain no DNS request to the DNS server will be made.

Can anyone help me out here?

Thanks in advance!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
rene
Level 20
Level 20
Posts: 12240
Joined: Sun Mar 27, 2016 6:58 pm

Re: Tara: Resolving of .local domains not working

Post by rene »

The by far best solution is to simply not use .local but different behaviour from earlier installs wrt. this issue seems due to Mint 19 introducing systemd-resolved as your local resolver (on 127.0.0.53 normally).

I do not in fact run Mint 19 and can as such not test this but judging from https://www.freedesktop.org/software/sy ... .conf.html you may be able to disable its mDNS support by adding "MulticastDNS=false" to the [Resolve] section of /etc/systemd/resolved.conf and, supposedly, restarting systemd-resolved: sudo systemctl restart systemd-resolved.

Choices for that option are true/false/resolve. If you find that "false" or "resolve" works, please report back: we've seen a few variants of this issue over the last couple of days.
PeterBell

Re: Tara: Resolving of .local domains not working

Post by PeterBell »

I've set to 'false' and local name resolution seems to be working correctly now.
PH896

Re: Tara: Resolving of .local domains not working

Post by PH896 »

rene wrote: Wed Aug 08, 2018 6:52 pm The by far best solution is to simply not use .local but different behaviour from earlier installs wrt. this issue seems due to Mint 19 introducing systemd-resolved as your local resolver (on 127.0.0.53 normally).

I do not in fact run Mint 19 and can as such not test this but judging from https://www.freedesktop.org/software/sy ... .conf.html you may be able to disable its mDNS support by adding "MulticastDNS=false" to the [Resolve] section of /etc/systemd/resolved.conf and, supposedly, restarting systemd-resolved: sudo systemctl restart systemd-resolved.

Choices for that option are true/false/resolve. If you find that "false" or "resolve" works, please report back: we've seen a few variants of this issue over the last couple of days.
Thanks for your answer. I've looked at my resolved.conf and it seems that i only can choose yes/no because of the commented examples. However, i tried false and no but it is still not working. And i restarted the service every time.
rene
Level 20
Level 20
Posts: 12240
Joined: Sun Mar 27, 2016 6:58 pm

Re: Tara: Resolving of .local domains not working

Post by rene »

Unfortunate; seemed to have high chances, especially after PeterBell's result. Can as said not test but could sort of imagine the DNS cache interfering. Easiest way to test that would be to reboot.

If no, am afraid I'll leave it up to someone running 19 to try further...
PH896

Re: Tara: Resolving of .local domains not working

Post by PH896 »

rene wrote: Thu Aug 09, 2018 1:04 pm Unfortunate; seemed to have high chances, especially after PeterBell's result. Can as said not test but could sort of imagine the DNS cache interfering. Easiest way to test that would be to reboot.

If no, am afraid I'll leave it up to someone running 19 to try further...
I rebooted, still not working :(
rene
Level 20
Level 20
Posts: 12240
Joined: Sun Mar 27, 2016 6:58 pm

Re: Tara: Resolving of .local domains not working

Post by rene »

You say that "when [you] directly enter [your] dns server [into /etc/resolv.conf] everything is working fine". Assuming that systemd-resolved is not just ignoring it being told to not handle mDNS (i.e., .local hosts) the only sensible reason seems to be systemd-resolved not having your dns server as its upstream server. I believe you should be able to tell with resolvectl status or systemd-resolve --status.
PH896

Re: Tara: Resolving of .local domains not working

Post by PH896 »

rene wrote: Thu Aug 09, 2018 3:22 pm You say that "when [you] directly enter [your] dns server [into /etc/resolv.conf] everything is working fine". Assuming that systemd-resolved is not just ignoring it being told to not handle mDNS (i.e., .local hosts) the only sensible reason seems to be systemd-resolved not having your dns server as its upstream server. I believe you should be able to tell with resolvectl status or systemd-resolve --status.
Yes, i also first thought that. But i also looked at my network traffic while resolving a .local domain against resolved. But there was no outgoing DNS request to any server.
However, here is the output of systemd-resolve --status (resolvectl status was not found):

Code: Select all

root@pnb:~# systemd-resolve --status
Global
          DNSSEC NTA: 10.in-addr.arpa
                      16.172.in-addr.arpa
                      168.192.in-addr.arpa
                      17.172.in-addr.arpa
                      18.172.in-addr.arpa
                      19.172.in-addr.arpa
                      20.172.in-addr.arpa
                      21.172.in-addr.arpa
                      22.172.in-addr.arpa
                      23.172.in-addr.arpa
                      24.172.in-addr.arpa
                      25.172.in-addr.arpa
                      26.172.in-addr.arpa
                      27.172.in-addr.arpa
                      28.172.in-addr.arpa
                      29.172.in-addr.arpa
                      30.172.in-addr.arpa
                      31.172.in-addr.arpa
                      corp
                      d.f.ip6.arpa
                      home
                      internal
                      intranet
                      lan
                      local
                      private
                      test

Link 5 (vmnet8)
      Current Scopes: none
       LLMNR setting: yes
MulticastDNS setting: no
      DNSSEC setting: no
    DNSSEC supported: no

Link 4 (vmnet1)
      Current Scopes: none
       LLMNR setting: yes
MulticastDNS setting: no
      DNSSEC setting: no
    DNSSEC supported: no

Link 3 (wlp3s0)
      Current Scopes: none
       LLMNR setting: yes
MulticastDNS setting: no
      DNSSEC setting: no
    DNSSEC supported: no

Link 2 (enp0s31f6)
      Current Scopes: DNS
       LLMNR setting: yes
MulticastDNS setting: no
      DNSSEC setting: no
    DNSSEC supported: no
         DNS Servers: 192.168.0.254
And 192.168.0.254 is the correct server which works when i enter them in resolv.conf.

Thank you.
rene
Level 20
Level 20
Posts: 12240
Joined: Sun Mar 27, 2016 6:58 pm

Re: Tara: Resolving of .local domains not working

Post by rene »

Just got it to work by using "MulticastDNS=resolve" in /etc/systemd/resolved.conf in a Mint 19 VirtualBox guest configured for NAT (i.e., not "Bridged Adapter") on a Mint 18.3 host, together with deleting the [NOTFOUND=return] part of the /etc/nsswitch.conf "hosts:" line -- which is slightly better than moving "dns" to before mdns4, but feel free.

I tested by inserting "foo.local" in the 18.3 host dnsmasq (i.e., drop a file /etc/NetworkManager/dnsmasq.d/foo-local.conf containing e.g address=/foo.local/192.168.1.123 and sudo systemctl restart NetworkManager) and deleted the [NOTFOUND=return] from its /etc/nsswitch.conf as well. This made foo.local resolvable to 192.168.1.123 on both host and guest.

I expect, then, you only need to say "MulticastDNS=resolve" in /etc/systemd/resolved.conf to have things working. Do of course make sure to also delete the # from the beginning of the line when editing that file.
PH896

Re: Tara: Resolving of .local domains not working

Post by PH896 »

That also does not work for me. I now removed the resolv.conf symlink to reoslved, created an empty file, set hosts in nsswitch.conf to "files dns" and put dns=default in the [Main] section of Networkmanager.conf. Works so far for me.
rene
Level 20
Level 20
Posts: 12240
Joined: Sun Mar 27, 2016 6:58 pm

Re: Tara: Resolving of .local domains not working

Post by rene »

PH896 wrote: Sat Aug 18, 2018 5:21 am That also does not work for me.
Seems to make little sense: I specifically installed a 19 VM to test and saw things simply work as expected with "MulticastDNS=resolve". I believe I saw you were in a VMWare VM; it might be involved I guess.
PeterBell

Re: Tara: Resolving of .local domains not working

Post by PeterBell »

rene wrote: Sat Aug 11, 2018 8:48 am Just got it to work by using "MulticastDNS=resolve" in /etc/systemd/resolved.conf in a Mint 19 VirtualBox guest configured for NAT (i.e., not "Bridged Adapter") on a Mint 18.3 host, together with deleting the [NOTFOUND=return] part of the /etc/nsswitch.conf "hosts:" line
I confirm that this has worked for me on a fresh install of ArchLinux.

Still not quite sure why a simpler change worked on my Mint machine!
dimonic

Re: Tara: Resolving of .local domains not working

Post by dimonic »

We have discovered that a fresh install of Linux Mint 19 has the string [NOTFOUNT= in the nsswitch.conf, rather than the intended [NOTFOUND=.

Correcting this resolved our dns issues instantly.
rene
Level 20
Level 20
Posts: 12240
Joined: Sun Mar 27, 2016 6:58 pm

Re: Tara: Resolving of .local domains not working

Post by rene »

dimonic wrote: Fri Nov 30, 2018 10:45 am We have discovered that a fresh install of Linux Mint 19 has the string [NOTFOUNT= in the nsswitch.conf, rather than the intended [NOTFOUND=.
And you are quite certain this was not after discovering large numbers of alcoholic beverages? Because certainly that has not been the case for any of my Mint 19 installs...
PeterBell

Re: Tara: Resolving of .local domains not working

Post by PeterBell »

Sorry for the very late response to this thread, but .....

I believe that a fresh 19.2 install gets this correct, whereas 19.1 (and earlier?) and thus any upgrades therefrom, get it wrong.

It seems that the correct resolution to this issue is that /etc/resolv.conf should be a softlink to /run/systemd/resolve/resolv.conf. The earlier behaviour appears to have soft-linked to /run/systemd/resolve/stub-resolv.conf

I discovered this by comparing a fresh 19.2 install against a fresh 19.1 install which was immediately upgraded to 19.2. One machine would resolve my local names, and the other wouldn't!
Locked

Return to “Networking”