저는 Arch Linux(4.7.2-1-ARCH)가 설치된 PC를 가지고 있습니다. PC는 IP를 얻기 위해 DHCP를 사용하지만 systemd-resolved를 통해 구성한 다른 DNS 서버를 사용합니다. CNAME 레코드가 있는 도메인에서 dig 명령을 사용하면 연결된 A 레코드가 손실됩니다. dig를 사용하고 서버를 수동으로 구성하면 A 레코드가 있습니다. systemd-resolved가 DNS 기록을 변경하는 이유를 아시나요?
추가 정보가 필요하면 알려주시기 바랍니다.
이것은 내 네트워크(systemd-networkd) 구성입니다.
[Match]
Name=ens18
[Network]
DNS=10.0.0.18
DHCP=ipv4
[DHCPv4]
UseHostname=false
UseDNS=false
해결.conf:
# This is a static resolv.conf file for connecting local clients to
# systemd-resolved via its DNS stub listener on 127.0.0.53.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.
nameserver 127.0.0.53
api.pushbullet.com을 알아보세요:
; <<>> DiG 9.10.4-P2 <<>> api.pushbullet.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 59038
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;api.pushbullet.com. IN A
;; ANSWER SECTION:
api.pushbullet.com. 186 IN CNAME ghs-svc-https-c573.ghs-ssl.googlehosted.com.
;; Query time: 0 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Son Sep 11 01:17:57 CEST 2016
;; MSG SIZE rcvd: 101
파기[이메일 보호됨]:
; <<>> DiG 9.10.4-P2 <<>> api.pushbullet.com @10.0.0.18
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 33081
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 13, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;api.pushbullet.com. IN A
;; ANSWER SECTION:
api.pushbullet.com. 184 IN CNAME ghs-svc-https-c573.ghs-ssl.googlehosted.com.
ghs-svc-https-c573.ghs-ssl.googlehosted.com. 282 IN A 72.14.247.65
;; AUTHORITY SECTION:
. 509182 IN NS j.root-servers.net.
. 509182 IN NS d.root-servers.net.
. 509182 IN NS a.root-servers.net.
. 509182 IN NS l.root-servers.net.
. 509182 IN NS g.root-servers.net.
. 509182 IN NS b.root-servers.net.
. 509182 IN NS m.root-servers.net.
. 509182 IN NS i.root-servers.net.
. 509182 IN NS f.root-servers.net.
. 509182 IN NS h.root-servers.net.
. 509182 IN NS e.root-servers.net.
. 509182 IN NS k.root-servers.net.
. 509182 IN NS c.root-servers.net.
;; Query time: 0 msec
;; SERVER: 10.0.0.18#53(10.0.0.18)
;; WHEN: Son Sep 11 01:17:59 CEST 2016
;; MSG SIZE rcvd: 328
답변1
dig 명령의 출력은 다른 명령이기 때문에 다릅니다.
$ dig api.pushbullet.com @127.0.0.1
;; QUESTION SECTION:
;api.pushbullet.com. IN A
;; ANSWER SECTION:
api.pushbullet.com. 12 IN CNAME ghs-svc-https-c573.ghs-ssl.googlehosted.com.
ghs-svc-https-c573.ghs-ssl.googlehosted.com. 300 IN A 72.14.247.65
;; AUTHORITY SECTION:
. 495764 IN NS g.root-servers.net.
. 495764 IN NS e.root-servers.net.
. 495764 IN NS l.root-servers.net.
. 495764 IN NS j.root-servers.net.
. 495764 IN NS i.root-servers.net.
. 495764 IN NS d.root-servers.net.
. 495764 IN NS a.root-servers.net.
. 495764 IN NS m.root-servers.net.
. 495764 IN NS k.root-servers.net.
. 495764 IN NS f.root-servers.net.
. 495764 IN NS b.root-servers.net.
. 495764 IN NS h.root-servers.net.
. 495764 IN NS c.root-servers.net.
;; Query time: 72 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Son Sep 11 12:23:11 CEST 2016
;; MSG SIZE rcvd: 328