server/bind/namedconf_ex1

Last-modified: 2009-03-20 (金) 02:07:13
//
// named.conf for Red Hat caching-nameserver
//
options {
	directory "/var/named";
	dump-file "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
	/*
	 * If there is a firewall between you and nameservers you want
	 * to talk to, you might need to uncomment the query-source
	 * directive below.  Previous versions of BIND always asked
	 * questions using port 53, but BIND 8.1 uses an unprivileged
	 * port by default.
	 */
	// 問い合わせのソースアドレスとソースポート
	// query-source address * port 53;
	// first:FORWARDに問い合わせを行う応答がない場合、自分で解決する(デフォルト)
	// only:FORWARDのみ行う
	forward first;
	// FORWARDERの指定
	forwarders { 192.168.0.250; 192.168.0.251; };
       // listen-onを指定しない場合は全てのI/F
	listen-on { 127.0.0.1; };
//	listen-on port 53 { 127.0.0.1; 10.0.0/24; };
	// クエリー可能なホスト
	allow-query { 127.0.0.1; 10.0.0/24};
	// 再帰的なクエリーが可能なホスト
	allow-recursion { 127.0.0.1; };
	// ゾーン転送を許可するホスト(マスタの設定ファイルにスレーブのホストを記述する)
	allow-transfer { none; };
	version "";
	// NXDOMAINレスポンスの時に、常にAAビットを有効にするか
	// NXDOMAIN:存在しないドメインに対する問合せを行なった際に設定されるレスポンスコードのひとつ
	// AAビット:権威があるか
	auth-nxdomain yes;
	// ゾーン強制転送:yesがデフォルト
	notify yes;
	// ゾーン強制転送を行うホスト(マスタの設定ファイルにスレーブのホストを記述する)
	also-notify { 192.168.0.150; 192.168.0.151; };
	// 再帰的名前解決
	recursion yes;
};
//
// a caching only nameserver config
//
controls {
	inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
zone "." IN {
	type hint;
	file "named.ca";
};
zone "localdomain" IN {
	type master;
	file "localdomain.zone";
	allow-update { none; };
};
zone "localhost" IN {
	type master;
	file "localhost.zone";
	allow-update { none; };
};
zone "0.0.127.in-addr.arpa" IN {
	type master;
	file "named.local";
	allow-update { none; };
};
zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
        type master;
	file "named.ip6.local";
	allow-update { none; };
};
zone "255.in-addr.arpa" IN {
	type master;
	file "named.broadcast";
	allow-update { none; };
};
zone "0.in-addr.arpa" IN {
	type master;
	file "named.zero";
	allow-update { none; };
};
zone "example.co.jp" IN {
	type master;
	file "example.zone";
	allow-update { none; };
};
zone "0.168.192.in-addr.arpa" IN {
	type master;
	file "0.168.192.rev";
	allow-update { none; };
};
include "/etc/rndc.key";