[prev in list] [next in list] [prev in thread] [next in thread]
List: gentoo-user
Subject: Re: [gentoo-user] systemd DNS does not resolve 'local' addresses
From: Alexander Puchmayr <alexander.puchmayr () linznet ! at>
Date: 2022-04-03 8:25:46
Message-ID: 3166770.aeNJFYEL58 () zeus
[Download RAW message or body]
Thanks for the hint with mDNS, I wasn't aware of that. I'm using the '.local'
domain for all my machines for more than 15 years now, longer than mDNS
exists, but finally, after some research I found the problem, and actually it
wasn't systemd per se, it was an update of /etc/nsswitch.conf. The old version
had
Hosts: mymachines files myhostname dns
while the new version contains
Hosts: mymachines resolve [!UNAVAIL=return] files myhostname dns
The extra "resolve [!UNAVAIL=return]" makes the difference. It loads the
glibc's plugin nss-resolve [1], which then calls systemd-resolved [2], which
interprets '.local' as mDNS address. The mDNS is not activated on purpose, it
seems to be some default setting of the router which does not appear in the
configuration pages (or I didn't find it).
Anyway, there are some ways to solve this:
1) create an entry in /etc/hosts on every machine. Contradicts the idea of
DNS, but works
2) keep the old setting in nsswich.conf (without "resolve ...")
3) change my "own" TLD from .local to something else, like .home, as suggested
in [3]
I think as long term strategy option 3 would be the best.
Regards
Alex
[1] https://www.freedesktop.org/software/systemd/man/nss-resolve.html
[2] https://www.freedesktop.org/software/systemd/man/systemd-resolved.html#
[3] https://www.rfc-editor.org/rfc/rfc6762#appendix-G
Am Samstag, 2. April 2022, 23:48:06 CEST schrieb Rich Freeman:
> On Sat, Apr 2, 2022 at 5:22 PM Alexander Puchmayr
>
> <alexander.puchmayr@linznet.at> wrote:
> > ## portage.local maps to 192.168.1.6
> > ## DNS-Server provided via DHCP is 192.168.1.1 (openwrt-router)
> >
> > buildhost-desktop ~ # ping portage.local
> > ping: portage.local: Temporary failure in name resolution
> >
> > Protocols: +LLMNR +mDNS -DNSOverTLS DNSSEC=no/unsupported
>
> So, I haven't really used resolved much, but I see you have mDNS
> enabled. Does the portage.local host broadcast itself using mDNS? If
> it is running Gentoo then the answer is no unless you have it running
> avahi, which is usually not installed by default. Many
> desktop-oriented linux distros provide avahi by default.
>
> A resolver that supports mDNS will not use DNS to resolve the .local
> TLD, in accordance with RFC 6762.
>
> If you intend to use .local for DNS and not mDNS then you probably do
> not want mDNS enabled. You can either disable it for resolved
> globally by setting MulticastDNS=no in the [Resolve] section of
> /etc/systemd/resolved.conf, or by disabling it for a specific network
> in your network manager (the setting has the same name for
> systemd-networkd).
>
> This is one of those reasons why it is best to not use the .local TLD
> for DNS on your home network. You can disable it on systemd-resolved,
> but some IoT device in your home might have it permanently enabled.
> It allows a form of name resolution to work without any DNS server as
> devices discover and broadcast on their own.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic