注意 ip address 機器の名前は 実際のものと合わない部分が有ります、初期設定時の 参考例です
# pwd
/etc
# sed -e '/^#/d' named.conf -e '/^\//d'
acl nyanet.ne.jp {
192.168.38.0/24;
127.0.0.1;
};
options {
directory "/var/named";
pid-file "/var/run/named/named.pid";
recursion yes;
allow-query {
127.0.0.1;
192.168.38.0/24;
};
allow-transfer { none; };
forward first;
forwarders {
123.456.789.123; /* 実際の ものをいれる事 */
987.654.321.987; /* 実際の ものをいれる事 */
};
};
controls {
inet 127.0.0.1 port 953
allow { 127.0.0.1; } keys { "rndc-key"; };
};
zone "." {
type hint;
file "root.hints";
};
zone "localhost" {
type master;
file "localhost.zone";
};
zone "0.0.127.in-addr.arpa" {
type master;
file "localhost.rev";
};
zone "nyanet.ne.jp" {
type master;
file "nyanet.hosts";
};
zone "38.168.192.in-addr.arpa" {
type master;
file "nyanet.hosts.rev";
};
include "/etc/rndc.key";
# pwd
/var/named
# cat nyanet.hosts
$TTL 86400
@ IN SOA nl.nyanet.ne.jp. root.nl.nyanet.ne.jp. (
2005071419 ; Serial
3600 ; Refresh
900 ; Retry
604800 ; Expire
86400 ) ; Minimum TTL
;
IN NS nl.nyanet.ne.jp.
IN MX 10 nl.nyanet.ne.jp.
nl IN A 192.168.38.8
adsl IN A 192.168.38.1
lx IN A 192.168.38.5
ws IN A 192.168.38.6
mc IN A 192.168.38.7
www IN CNAME lx
qqq IN CNAME nl
;
;
# cat nyanet.hosts.rev
$TTL 3D
@ IN SOA nl.nyanet.ne.jp. root.nl.nyanet.ne.jp. (
2005071419 ; Serial
3600 ; Refresh
900 ; Retry
604800 ; Expire
3600) ; Minimum TTL
IN NS nl.nyanet.ne.jp.
1 IN PTR adsl.nyanet.ne.jp.
5 IN PTR lx.nyanet.ne.jp.
6 IN PTR ws.nyanet.ne.jp.
7 IN PTR mc.nyanet.ne.jp.
8 IN PTR nl.nyanet.ne.jp.
# cat localhost.zone
$TTL 86400
@ IN SOA localhost. root.localhost. (
2005071419 ; Serial
28800 ; Refresh
14400 ; Retry
604800 ; Expire
86400 ) ; default_ttl 24hr
IN NS localhost.
IN A 127.0.0.1
# cat localhost.rev
$TTL 86400
@ IN SOA localhost. root.localhost.(
2005071419 ; Serial
28800 ; Refresh
14400 ; Retry
604880 ; Expire
86400) ; default_ttl 24hr
NS localhost.
1 PTR localhost.
にゃんたろう 拝!
2005年 7月19日 (火) 22:08:12 JST 作成