0

Ubuntu 18.04 is not respecting local configuration anymore. Since I cannot have my DHCP server advertising anymore the DNS servers, I want to set up the clients manually (LXD containers). I tried to edit the file /etc/systemd/resolved.conf to change the DNS= line, see file content:

# cat /etc/systemd/resolved.conf
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See resolved.conf(5) for details
[Resolve]
DNS=192.168.1.11 192.168.1.29
#FallbackDNS=
#Domains=
#LLMNR=no
#MulticastDNS=no
#DNSSEC=no
#Cache=yes
#DNSStubListener=yes

However, I still an unwanted DNS server fe80::5ee2:8cff:fe99:f106

# systemd-resolve --status
Global
         DNS Servers: 192.168.1.11
                      192.168.1.29
          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 129 (eth0)
      Current Scopes: DNS
       LLMNR setting: yes
MulticastDNS setting: no
      DNSSEC setting: no
    DNSSEC supported: no
         DNS Servers: 192.168.1.11
                      192.168.1.29
                      fe80::5ee2:8cff:fe99:f106
          DNS Domain: forumanalogue.fr

So DNS queries returns wrong results, resulting a nonworking server environment.

# dig toot.forumanalogue.fr

; <<>> DiG 9.11.3-1ubuntu1.11-Ubuntu <<>> toot.forumanalogue.fr
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 62248
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;toot.forumanalogue.fr.         IN      A

;; ANSWER SECTION:
toot.forumanalogue.fr.  300     IN      A       151.127.52.79

;; Query time: 20 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Thu Jan 02 14:09:41 UTC 2020
;; MSG SIZE  rcvd: 66

dig returns the public IP address. The expect result is

# dig toot.forumanalogue.fr @192.168.1.11

; <<>> DiG 9.11.3-1ubuntu1.11-Ubuntu <<>> toot.forumanalogue.fr @192.168.1.11
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 12877
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 3

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: a875a4c08c601052bf3b129e5e0dfb08254c48cf47944e9f (good)
;; QUESTION SECTION:
;toot.forumanalogue.fr.         IN      A

;; ANSWER SECTION:
toot.forumanalogue.fr.  604800  IN      A       192.168.1.39

;; AUTHORITY SECTION:
forumanalogue.fr.       604800  IN      NS      ns2.forumanalogue.fr.
forumanalogue.fr.       604800  IN      NS      ns.forumanalogue.fr.

;; ADDITIONAL SECTION:
ns.forumanalogue.fr.    604800  IN      A       192.168.1.11
ns2.forumanalogue.fr.   604800  IN      A       192.168.1.29

;; Query time: 0 msec
;; SERVER: 192.168.1.11#53(192.168.1.11)
;; WHEN: Thu Jan 02 14:15:36 UTC 2020
;; MSG SIZE  rcvd: 161
  • How do you configure the IPv6 address on your server? systemd-resolved gets the third DNS server from there. You can try adding Domains=~forumanalogue.fr to your resolved config: the resolver should use the specified DNS servers for this domain, while using all three for the other domains. – Piotr P. Karwasz Jan 2 at 18:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.