[ トラックバック(0) ]
Counter: 12750,
today: 1,
yesterday: 11
BINDの一般的な設定
BINDは、Berkeley Internet Name Domainの頭文字をとったもので、いわゆるDNSサーバとリゾルバライブラリ、各種ツールの集合体です。DNS(Domain Name System)の目的は、ホスト名とIPアドレスを関連づけ、名前空間の階層化と権限委譲による分散型データベースです。
インターネットでは、すべてのホストはIPアドレスで区別されます。しかし、IPアドレスは、人間にとっては解りずらいため、名前でアクセスできるようにDNSサーバが発展してきました。また、名前空間を階層化するとともに分散型データベースとすることで、日々増えては消えるドメインやホストの情報を管理しています。
以下に一般的な設定例を示します。
■/etc/resolv.conf
domain linuxexpert.ne.jp nameserver 127.0.0.1
■/etc/named.conf
// generated by named-bootconf.pl options { directory "/var/named"; /* * 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; }; // // a caching only nameserver config // controls { inet 127.0.0.1 allow { localhost; } keys { rndckey; }; }; zone "." IN { type hint; file "named.ca"; }; 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 "linuxexpert.ne.jp" IN { type master; file "named.hosts"; allow-update { none; }; }; zone "128.250.175.210.in-addr.arpa" IN { type master; file "named.rev"; allow-update { none; }; }; include "/etc/rndc.key";
■/var/named/named.local
$TTL 86400 @ IN SOA @ root ( 2004031301 ; Serial 3H ; Refresh 15M ; Retry 1W ; Expire 1D ) ; Minimum IN NS localhost. 1 IN PTR localhost.
■/var/named/localhost.zone
TTL 86400 $ORIGIN localhost. @ IN SOA @ root ( 2004031301 ; Serial 3H ; Refresh 15M ; Retry 1W ; Expire 1D ) ; Minimum IN NS @ IN A 127.0.0.1
■/var/named/named.hosts
TTL 86400 $ORIGIN localhost. @ IN SOA @ root ( 2004031301 ; Serial 3H ; Refresh 15M ; Retry 1W ; Expire 1D ) ; Minimum IN NS @ IN A 127.0.0.1
■/var/named/named.rev
$TTL 86400 @ IN SOA @ root ( 2004031301 ; Serial 3H ; Refresh 15M ; Retry 1W ; Expire 1D ) ; Minimum IN NS dns IN NS dns.secondary.co.jp. 130 IN PTR dns