systemd-resolve DNS 서버를 설정하는 방법은 무엇입니까?

systemd-resolve DNS 서버를 설정하는 방법은 무엇입니까?

Ubuntu 18.04는 더 이상 로컬 구성을 존중하지 않습니다.. 더 이상 DHCP 서버가 DNS 서버를 광고하도록 할 수 없기 때문에 클라이언트(LXD 컨테이너)를 수동으로 설정하고 싶습니다. /etc/systemd/resolved.conf줄을 변경 DNS=하고 파일 내용을 확인하기 위해 파일 편집을 시도했습니다 .

# 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

그러나 나는 여전히 원치 않는 DNS 서버입니다.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

결과적으로 DNS 쿼리는 잘못된 결과를 반환하여 서버 환경이 제대로 작동하지 않게 됩니다.

# 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공용 IP 주소를 반환합니다. 예상되는 결과는

# 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

관련 정보