Network/BIND

パッケージのインストール

  • bind-utils-XXX
  • bind-libs-XXX
  • bind-XXX

設定例

ドメインIPアドレス
rac12c1.zone.com192.168.11.41
rac12c2.zone.com192.168.11.42
rac12c1-vip.zone.com192.168.11.31
rac12c2-vip.zone.com192.168.11.32
rac12c-srv.zone.com192.168.11.43
rac12c1-prv.zone.com192.168.100.41
rac12c2-prv.zone.com192.168.100.42

/etc/named.conf

options {
        // 自分自身のIPアドレスに変更
        listen-on port 53 { 192.168.11.45; };
        listen-on-v6 port 53 { none; };
        directory          "/var/named";
        dump-file          "/var/named/data/cache_dump.db";
        statistics-file    "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
        allow-query             { any; };
        allow-query-cache       { any; };
        allow-transfer          { any; };
        // forwarders           { 192.168.1.1; };
        recursion yes;

        dnssec-enable no;
        dnssec-validation no;
        // dnssec-lookaside auto;

        /* Path to ISC DLV key */
        // bindkeys-file "/etc/named.iscdlv.key";
        // managed-keys-directory "/var/named/dynamic";
};

logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};
view "internal" {
    match-clients { localhost; localnets; };
    recursion yes;

    zone "." IN {
        type hint;
        file "named.ca";
    };

    include "/etc/named.rfc1912.zones";
    include "/etc/named.root.key";

    // ドメインの正引き
    zone "zone.com" {
          type master;
          file "zone.com.zone";
    };
    // 192.168.11.0/24 の 逆引き
    zone "11.168.192.in-addr.arpa" {
          type master;
          file "11.168.192.rev";
    };
    // 192.168.100.0/24 の 逆引き
    zone "100.168.192.in-addr.arpa" {
          type master;
          file "100.168.192.rev";
    };
    // 192.168.0.0/16 の 逆引き
    // zone "168.192.in-addr.arpa" {
    //       type master;
    //       file "100.168.192.rev";
    // };
};

/var/named/zone.com.zone

$TTL    3600
@        IN    SOA    zone.com. root.zone.com.  (
             2015091201      ; Serial
             3600            ; Refresh
             900             ; Retry
             3600000         ; Expire
             3600 )          ; Minimum
             IN    NS   zone.com.
@            IN    A    192.168.11.41
rac12c1      IN    A    192.168.11.41
rac12c2      IN    A    192.168.11.42
rac12c1-vip  IN    A    192.168.11.31
rac12c2-vip  IN    A    192.168.11.32
rac12c-srv   IN    A    192.168.11.43
rac12c1-prv  IN    A    192.168.100.41
rac12c2-prv  IN    A    192.168.100.42

/var/named/11.168.192.rev

$TTL    3600
@       IN      SOA     zone.com. root.zone.com. (
                2015091201    ; Serial
                3600          ; Refresh
                900           ; Retry
                3600000       ; Expire
                3600 )        ; Minimum
        IN      NS      zone.com.
        IN      PTR     zone.com.
        IN      A       255.255.255.0
41      IN      PTR     rac12c1.zone.com.
42      IN      PTR     rac12c2.zone.com.
31      IN      PTR     rac12c1-vip.zone.com.
32      IN      PTR     rac12c2-vip.zone.com.
43      IN      PTR     rac12c-srv.zone.com.

/var/named/100.168.192.rev

$TTL    3600
@       IN      SOA     zone.com. root.zone.com. (
                2015091201    ; Serial
                3600          ; Refresh
                900           ; Retry
                3600000       ; Expire
                3600 )        ; Minimum
        IN      NS      zone.com.
        IN      PTR     zone.com.
        IN      A       255.255.255.0
41      IN      PTR     rac12c1-prv.zone.com.
42      IN      PTR     rac12c2-prv.zone.com.

/var/named/168.192.rev

$TTL    3600
@       IN      SOA     zone.com. root.zone.com. (
                2015091201    ; Serial
                3600          ; Refresh
                900           ; Retry
                3600000       ; Expire
                3600 )        ; Minimum
        IN      NS      zone.com.
        IN      PTR     zone.com.
        IN      A       255.255.0.0
41.100  IN      PTR     rac12c1-prv.zone.com.
42.100  IN      PTR     rac12c2-prv.zone.com.


rndc

rndc [オプション]
オプション説明
reload [ゾーン]コンフィグとシリアルが増えてるゾーンの再読込。ゾーンを指定することでシリアルが増えてる特定ゾーンのみ再読込
reconfig設定を新しく追加したゾーンのみ再読込
status現在のサービス状態を表示
stats統計情報を表示
flushDNSキャッシュクリア
dumpdbDNSのキャッシュを出力する(出力場所はnamed.confのdump-fileで指定)

トップ   編集 凍結解除 差分 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2015-09-12 (土) 23:50:26 (593d)