DNSサーバーバインディング

DNSサーバーバインディング

enter code hereプライマリDNSサーバーを設定しています。リバースルックアップは正しく機能しているようですが、フォワードルックアップが問題のようです。

これは私の設定ファイルです。

/etc/default/bind9:

RESOLVCONF=no
OPTIONS="-u bind -4"

/etc/bind/named.conf.options:

acl "trusted" { 192.168.1.0; localhost; };
options {
    directory "/var/cache/bind";
    recursion yes;
    allow-recursion { trusted; };
    listen-on { 192.168.1.204; 127.0.0.1; };
    allow-transfer { none; };
    forwarders { 
        192.168.1.254;
    };
// listen-on-v6 { any; };
};

/etc/bind/named.conf.local:

zone "example.home.local" {
    type master;
    file "etc/bind/zones/db.example.home.local";
    };

zone "1.168.192.in-addr.arpa" {
    type master;
    file "/etc/bind/zones/db.1.168.192";
    };

/etc/bind/zones/db.example.home.local:

;
; BIND data file for local loopback interface
;
$TTL    604800
@   IN  SOA ubuntuserver.example.home.local. root.example.home.local. (
                 14     ; Serial
             604800     ; Refresh
              86400     ; Retry
            2419200     ; Expire
             604800 )   ; Negative Cache TTL
;
;name servers - NS records
@   IN  NS  ubuntuserver.example.home.local.

;name servers - A records
ubuntuserver    IN  A   192.168.1.204

;subnet - A records
ubuntuweb   IN  A   192.168.1.208

/etc/bind/zones/db.1.168.192:

;
; BIND reverse data file for local loopback interface
;
$TTL    604800
@   IN  SOA example.home.local. root.example.home.local. (
                 11     ; Serial
             604800     ; Refresh
              86400     ; Retry
            2419200     ; Expire
             604800 )   ; Negative Cache TTL
; name servers
@   IN  NS  UbuntuServer.

; PTR records
204 IN  PTR ubuntuserver.example.home.local.
208 IN  PTR ubuntuweb.example.home.local.

前述のように、リバースルックアップはうまく機能します。私が走るとき

sudo named-checkzone 1.168.192.in-addr.arpa /etc/bind/zones/db.1.168.192

結果は良好で、nslookupテストクライアントで実行すると、IPアドレスを名前で正常に解決します。

しかし、私が走るとき

sudo named-checkzone example.home.local /etc/bind/zones/db.example.home.local

それはまた報告する

loading from master file /etc/bind/zones/db.example.home.local failed: unknown class/type

ベストアンサー1

データベースパスの先頭が/etc/bind/named.conf.local欠落しているため、ミスがあります。/

file "etc/bind/zones/db.example.home.local";

おすすめ記事