ちょいと手元のUbuntu bionicをインストールしていたPCのsyslogを確認していたところ、以下のようなメッセージが出力されていました。
Mar 17 18:04:47 xxxxx systemd-resolved[26858]: Server returned error NXDOMAIN, mitigating potential DNS violation DVE-2018-0001, retrying transaction with reduced feature level UDP.
なんじゃらほいと思ったので確認してみました。
どうやら以下のものがそれみたいです。
dns-violations/2018/DVE-2018-0001.md at master · dns-violations/dns-violations
List of DNS violations by implementations, software and/or systems - dns-violations/dns-violations
Cached cname NODATA returned for A lookup · Issue #9833 · systemd/systemd
systemd version the issue has been seen with 237-3ubuntu10.3 Used distribution Ubuntu 18.04 Expected behaviour you didn'...
Bug #1796501 “systemd-resolved tries to mitigate DVE-2018-0001 e...” : Bugs : systemd package : Ubuntu
an NXDOMAIN response from a dns server when systemd-resolved is configured as DNSSEC=yes breaks dns resolution as it dow...
From packet capture it appears that DNS query with EDNS0 DO (DNSSEC OK) bit set to zero, is responded to with NXDOMAIN.
ということで、systemd-resolvedが正しく名前解決できないバグなんですね・・・
どうやらsystemd側では修正が終わっているようですが、ubuntuのlaunchpadでは現在進行形で修正中のようで、ちょこちょこWebでも質問している人が見つかる模様。
今のところは、一旦、systemd-resolvdを止めて、以前のようにresolv.confにべた書きするか、以下のようにresolvconfなどを使用のがいいみたいですね。
$ sudo rm /etc/resolv.conf
$ sudo ln -s /run/resolvconf/resolv.conf /etc/resolv.conf
$ systemctl restart resolvconf
まあ普通にべた書きでも良いと思います。