// cache only // ディレクトリ,ファイルのパーミッションに注意 // namedでユーザを作った場合、 // C:\WINNT\system32\dns\etc、C:\WINNT\system32\dns\var\logに書き込み権限が必要っぽい // 自分所のネット acl localnet { xx.xx.xx.xx/yy; // DNSのresolverを使いたいネットワークを指定。127.0.0.1で動かすなら削除 127.0.0.1; }; options { // listen-on port 53 { 127.0.0.1; }; // 127.0.0.1にだけbindしたければ先頭の//を削除 // listen-on-v6 port 53 { ::1; }; // IPv6を使いたければどうぞ :) listen-on-v6 { none; }; // datasize default; // stacksize default; // coresize default; // files default; directory "C:\WINNT\system32\dns\etc"; // DNSのデータベースディレクトリ allow-transfer { none; }; // 転送先制限(不許可) allow-query { localnet; }; // 問合せ元制限(localnetのみ可) max-ncache-ttl 30; // ネガティブキャッシュの最大TTL デフォルトは10800秒(3時間) //max-cache-ttl 3600; // キャッシュの最大TTL デフォルトは604800秒(1週間) recursive-clients 400; // 再帰問い合わせの同時要求数 デフォルトで1000 cleaning-interval 60; // キャッシュデータ中のTTL切れのデータを整理する間隔 デフォルトでは60分 lame-ttl 600; // lame情報のTTL デフォルトで600秒 max-cache-size 10485760; // キャッシュデータに使用するメモリの最大量 デフォルトはunlimited(無制限) // 10Mを指定 }; // ログ関係の設定 logging { channel default-log { file "C:\WINNT\system32\dns\var\log\named.log" versions 5 size 1m; severity info; print-time yes; print-severity yes; print-category yes; }; category lame-servers { default-log; }; category default { default-log; }; category queries { default-log; }; category config { default-log; }; }; // ルートのゾーン設定 zone "." IN { type hint; file "named.root"; }; // 逆引きのループバックのゾーン設定 zone "0.0.127.in-addr.arpa" IN { type master; file "named.local"; }; // rndc関連 controls { inet 127.0.0.1 allow { localhost; } keys { "rndc-key"; }; }; // keyの作り方 rndc-confgen -a -b 512 // 既に(空でも)ファイルがあるとエラーになるので注意 include "rndc.key";