Repository navigation
Closed
Description
How to setup systemd to resolve .local zone via dns?
systemd version the issue has been seen with
systemd 237, 238
Used distribution
ubuntu 18.04
Hi. I just installed ubuntu 18.04 wich comes with systemd-resolve. I notice, that i can`t resolve any name in .local zone.
I read issue #4881 and #5048 but this looks like another problem or missunderstanding.
I have:
grep hosts /etc/nsswitch.conf
hosts: files dns
cat /etc/resolv.conf
# This file is managed by man:systemd-resolved(8). Do not edit.
...............
nameserver 127.0.0.53
search local
systemd-resolve --status
Global
DNS Domain: local
DNSSEC NTA: 10.in-addr.arpa
16.172.in-addr.arpa
...............
31.172.in-addr.arpa
corp
d.f.ip6.arpa
home
internal
intranet
lan
local
private
test
Link 2 (ens3)
Current Scopes: DNS
LLMNR setting: yes
MulticastDNS setting: no
DNSSEC setting: allow-downgrade
DNSSEC supported: yes
DNS Servers: 10.54.106.45
10.54.106.46
But host somepc.myfirm.local or myfirm.local returns 2(SERVFAIL)
systemd-resolve myfirm.local returns myfirm.local: resolve call failed: No appropriate name servers or networks for name found
In log i have
Apr 28 14:20:38 1804 systemd-resolved[14659]: Got DNS stub UDP query packet for id 43598
Apr 28 14:20:38 1804 systemd-resolved[14659]: Looking up RR for myfirm.local IN A.
Apr 28 14:20:38 1804 systemd-resolved[14659]: Sending response packet with id 43598 on interface 1/AF_INET.
Apr 28 14:20:38 1804 systemd-resolved[14659]: Processing query...
And tcpdump does not capture any dns packet.
Reacted by Oliver Mannion
Activity
upuv commentedon Apr 29, 2018
poettering commentedon Apr 30, 2018
Please contact the mailing list for support and help. We use github isues only as bug and feature request tracker, not as a support forum.
So let me get this straight: you want to resolve the .local TLD as a classic unicast domain? Note that the nowadays the .local domain is intended for use in the MulticastDNS context only, however resolved can also make it work as a unicast domain. And if you want to do that, then yes, configuring the search domain is the right way.
That said, the important thing is that for resolved DNS servers and search domains are considered a unit, i.e. only the search domains configured for a specific DNS server is used for routing and resolving towards it. In you setup above, the DNS search list is configured system-wide, but the DNS servers are configured per-interface, hence this doesn't work as you want it to work.
The fix is to configure the search list per-interface the same way as the DNS server is configured per-interface. If you use NetworkManager this hence means you need to configure the DNS search list inside of Networkmanager on the interface too. if you use another tool, then you need to configure the search list there, but the important thing is that DNS search list and DNS server addresses are configured for the same scope, i.e. either both per-interface and on the same interface or both system-wide.
Or in other words, it should work correctly as soon as "systemd-resolve --status" shows the "DNS Domain:" field in the "Link 2 (ens3)" section instead, instead of the "Global" section.
Please redirect any further questions to the mailing list.