dnsmasq は、完全修飾されていない名前のデフォルト DNS を期待どおりに処理しません。

dnsmasq は、完全修飾されていない名前のデフォルト DNS を期待どおりに処理しません。

DHCPが提供するDNSで解決する必要があるいくつかのローカルドメインを除くすべてのホスト名に対してDoHを設定しようとしています。

期待どおりに完全修飾名を使用してください。つまり、ローカル名はDHCP割り当てサーバーに送信され、他のすべては私のDoHクライアントに送信されますstubby。ただし、資格のない名前の処理に問題があります。

これは私の設定です/etc/NetworkManager/dnsmasq.d/example.conf

cache-size=1000
log-queries
server=//#
server=/example.com/#
server=/#/127.0.0.1#8053

stubbyポート8053で実行されていることに注意してください。簡単に説明すると、次のようになります/etc/NetworkManager/NetworkManager.conf

[main]
plugins=ifupdown,keyfile
dns=dnsmasq

[ifupdown]
managed=false

journalctlこれは再起動後の出力の一部ですNetworkManager

dnsmasq[10692]: using nameserver 127.0.0.1#8053 for default
dnsmasq[10692]: using standard nameservers for domain example.com
dnsmasq[10692]: using standard nameservers for unqualified names    <<< NOTICE THIS
dnsmasq[10692]: cleared cache
dnsmasq[10692]: setting upstream servers from DBus
dnsmasq[10692]: using nameserver 127.0.0.1#8053 for default
dnsmasq[10692]: using standard nameservers for domain example.com
dnsmasq[10692]: using standard nameservers for unqualified names
dnsmasq[10692]: using nameserver 10.X.X.X#53(via enp0s31f6)
dnsmasq[10692]: using nameserver 10.X.X.X#53 for domain example.com
dnsmasq[10692]: using nameserver 10.X.X.X#53 for domain X.X.X.10.in-addr.arpa
dnsmasq[10692]: using nameserver 10.X.X.X#53 for domain X.X.X.10.in-addr.arpa

その後、dig asdfg.com私はこれを得ます:

dnsmasq[10692]: query[A] asdfg.com from 127.0.0.1
dnsmasq[10692]: forwarded asdfg.com to 127.0.0.1

したがって、DoHは期待どおりに動作しています。

その後、dig asdfg.example.com私はこれを得ます:

dnsmasq[10692]: query[A] asdfg.example.com from 127.0.0.1
dnsmasq[10692]: forwarded asdfg.example.com to 10.X.X.X

したがって、ローカルDNSへの転送も可能です。

その後、dig asdfg私はこれを得ます:

dnsmasq[10692]: query[A] asdfg from 127.0.0.1
dnsmasq[10692]: forwarded asdfg to 127.0.0.1

で送信してい127.0.0.1ないため、10.X.X.XDoHで送信されていることが明らかです。

この問題をどのように解決できますか?

添付ファイル:Debian 11、Dnsmasqバージョン2.85

ベストアンサー1

バグのようです[12]バージョン2.86で修正されました。

おすすめ記事