unboundを用いてDNSキャッシュサーバを構築したが、
名前解決の逆引きができません。
通常使用する既存DNSサーバを指定することで名前解決(正引き、逆引き)が出来ることは
確認できています。
ただ、名前解決を行うDNSサーバをDNSキャッシュサーバに変更すると名前解決の逆引きのみ
出来ませんでした。※DNSキャッシュサーバ上で確認
他のクライアントPCからも試したが、結果は同じでした。
前提
DNSキャッシュサーバで内部NW向けのゾーンを作成し、
local-zone、forward-zone、domain-insecureをそれぞれ以下のように指定しました
・local-zoneは、逆引きのゾーン名 100.168.192.in-addr.arpa.
・domain-insecure にローカル使用のドメインを指定
・forward-zoneは 「name: "."」として全ての問合せ先を 既存DNSサーバに指定
クライアントPCなどの DNSサーバ指定を DNSキャッシュサーバに指定し
名前解決の問合せを 既存のDNSサーバに指定することで、内外の名前解決が
可能になることを目標としています。
どうして、逆引きだけできないのでしょうか。ご教授お願いできますでしょうか。
digコマンドによる名前解決の結果
※DNSキャッシュサーバ上で実施
正引き: # dig dns001.example.local ; <<>> DiG 9.16.37-Debian <<>> dns001.example.local ;; global options: +cmd ;; Got answer: ;; WARNING: .local is reserved for Multicast DNS ;; You are currently testing what happens when an mDNS query is leaked to DNS ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 55825 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 1232 ;; QUESTION SECTION: ;dns001.example.local. IN A ;; ANSWER SECTION: dns001.example.local. 86400 IN A 192.168.100.19 ;; Query time: 3 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Sat Jun 24 08:52:36 JST 2023 ;; MSG SIZE rcvd: 69 逆引き: # dig -x 192.168.100.19 ; <<>> DiG 9.16.37-Debian <<>> -x 192.168.100.19 ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 42195 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 1232 ;; QUESTION SECTION: ;19.100.168.192.in-addr.arpa. IN PTR ;; Query time: 59 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Sat Jun 24 08:45:48 JST 2023 ;; MSG SIZE rcvd: 56
◆環境
サーバ側
OS:Raspberry Pi OS
DNS:BIND 9.16.37-Raspbian (Extended Support Version)
DNSキャッシュ:unbound 1.13.1
DNSサーバ:192.168.100.19/24 (dns001.example.jp)
DNSキャッシュサーバ:192.168.100.17/24 (proxy001.example.jp)
◆unboundの設定
■/etc/unbound/unbound.conf.d/unbound.conf server: interface: 0.0.0.0 do-ip4: yes do-ip6: no do-udp: yes do-tcp: yes access-control: 0.0.0.0/0 refuse access-control: 127.0.0.1/8 allow access-control: 192.168.0.0/16 allow hide-version: yes hide-identity: yes root-hints: "/etc/unbound/root.hints" logfile: "/var/log/unbound/unbound.log" use-syslog: no log-time-ascii: yes remote-control: control-enable: yes control-interface: 127.0.0.1 server-key-file: "/etc/unbound/unbound_server.key" server-cert-file: "/etc/unbound/unbound_server.pem" control-key-file: "/etc/unbound/unbound_control.key" control-cert-file: "/etc/unbound/unbound_control.pem"
■/etc/unbound/conf.d/example.local.conf
server: local-zone: "100.168.192.in-addr.arpa." transparent domain-insecure: "example.local." forward-zone: name: "." forward-addr: 192.168.100.19
参考 /var/log/unbound/unbound.logの内容
Jun 24 00:18:37 unbound[68365:0] notice: init module 0: subnet
Jun 24 00:18:37 unbound[68365:0] notice: init module 1: validator
Jun 24 00:18:37 unbound[68365:0] notice: init module 2: iterator
Jun 24 00:18:37 unbound[68365:0] error: duplicate forward zone . ignored.
Jun 24 00:18:37 unbound[68365:0] info: start of service (unbound 1.13.1).
Jun 24 00:18:37 unbound[68365:3] error: duplicate forward zone . ignored.
Jun 24 00:18:37 unbound[68365:2] error: duplicate forward zone . ignored.
Jun 24 00:18:37 unbound[68365:1] error: duplicate forward zone . ignored.
Jun 24 00:18:50 unbound[68365:2] info: generate keytag query _ta-4f66. NULL IN
Jun 24 02:39:55 unbound[68365:0] info: generate keytag query _ta-4f66. NULL IN
Jun 24 03:49:15 unbound[68365:0] info: generate keytag query _ta-4f66. NULL IN
Jun 24 04:44:16 unbound[68365:0] info: generate keytag query _ta-4f66. NULL IN
Jun 24 05:42:10 unbound[68365:0] info: generate keytag query _ta-4f66. NULL IN
Jun 24 08:44:28 unbound[68365:0] info: generate keytag query _ta-4f66. NULL IN

バッドをするには、ログインかつ
こちらの条件を満たす必要があります。