Knot resolverでDNS over TLSなフォワーダーを設定する

AIX、UNIX、Linux

はじめに

先日はCoreDNSでDNS over TLSに対応したサーバをフォワード先として指定する方法を書きましたが、Knot resolverでの設定方法についても書いておくことにしました。

ちなみにCoreDNSと同様フォワーダーとしてDNS over HTTPSはサポートしていないようです。

確認環境

Knot Resolver, version 5.3.2

設定方法

policy.TLS_FORWARD({
    {'2001:DB8::d0c', hostname='res.example.com'}
})

複数指定する場合は配列にそのまま足していく感じになりますね。

policy.TLS_FORWARD({
    {'8.8.8.8', hostname='dns.google'},
    {'8.8.4.4', hostname='dns.google'},
    {'1.1.1.1', hostname='cloudflare-dns.com'},
    {'1.0.0.1', hostname='cloudflare-dns.com'}
})

さらにアップストリームにクエリ名に対してスライシングする?という機能があるのですが、公式ドキュメントを読んでも理解できず・・・

With the use of policy.slice() function, it is possible to split the entire DNS namespace into distinct slices. When used in conjuction with policy.TLS_FORWARD(), it’s possible to forward different queries to different targets.

https://knot-resolver.readthedocs.io/en/stable/modules-policy.html?highlight=dns%20over%20tls#forwarding-to-multiple-targets

使い分けをどうやるのか知りたい・・・

参考先

Query policies — Knot Resolver 5.7.5 documentation

タイトルとURLをコピーしました