リバースDNSテストでは、ホストコマンドが機能しますが、他の場合は機能しないのはなぜですか?

リバースDNSテストでは、ホストコマンドが機能しますが、他の場合は機能しないのはなぜですか?

を使用してゾーンファイルをテストできnamed-checkzoneます。

45.20.10.in-addr.arpa.zoneゾーンファイル(リバースDNS):

$TTL 30
@ IN SOA localhost. admin.example.com (
2017080101  ;serial
3H      ;refresh
1H      ;retry
2H      ;expire
1M)     ;neg ttl
@ IN NS localhost.;
;generate 1-254
$GENERATE 1-254 $ IN PTR host$.example.com

example.com.zoneゾーンファイル:

$TTL 30
@ IN SOA localhost. admin.example.com. (
2017072702  ; serial
3       ; refresh
1       ; retry
2       ; expire
1M)     ; negative TTL
            IN NS localhost.;
www.example.com.    IN A 192.168.111.45
www.example.com.    IN AAAA fe80::22c9:d0ff:1ecd:c0ef
foo.example.com.    IN A 192.168.121.11
bar.example.com.    IN CNAME www.example.com.
;generate 100 hosts
$GENERATE 1-100 host$.example.com. IN A 10.20.45.$

以下のようにdigコマンドを使用してゾーンファイルをテストできますdig @localhost -t A www.example.com

このようにしてリバースゾーンファイルをテストすることもできますhost 10.20.45.55 localhost

ホストコマンドのマニュアルページでは、次のようにテストすることもできますが、これはhost host55.example.com localhostエラーメッセージを生成します。

Using domain server:
Name: localhost
Address: 127.0.0.1#53
Aliases: 

Host host55.example.com not found: 2(SERVFAIL)

なぜこれがうまくいかないのかわかりません。どんな助けと説明でもいいでしょう。

ベストアンサー1

これ関連文書$GENERATE次の構文が提供されます。

$GENERATE start-stop[/step] lhs[{offset[,width[,type]]}] rr-type rhs[{offset[,width[,type]]}]

その中には、rr-typeCNAME、DNAME、A、AAAA、NS、PTRなどがあります。

したがって、あなたの行は次のようになります。

$GENERATE 1-100 host$.example.com. IN A 10.20.45.$

する必要があります:

$GENERATE 1-100 host$.example.com. A 10.20.45.$

奇妙なことに、bindこれに関するエラー/警告メッセージは表示されません。

おすすめ記事