| >> HOME >> FC5 MENU >> スレーブ DNS サーバーを構築する方法 (bind) |
 |
|
|
|
|
|
|
|
|
|
|
| |
|
|
| |
[root@linux ~]# dnssec-keygen -a HMAC-MD5 -b 512 -n HOST bind
Kbind.+157+56923
[root@linux ~]# ls -l Kbind.+157+56923.*
-rw------- 1 root root 111 7月 16日 21:57 Kbind.+157+56923.key
-rw------- 1 root root 145 7月 16日 21:57 Kbind.+157+56923.private
[root@linux ~]# more Kbind.+157+56923.key
bind. IN KEY 512 3 157
[root@linux ~]# more Kbind.+157+56923.private
Private-key-format: v1.2
Algorithm: 157 (HMAC_MD5)
Key:
|
|
|
|
|
|
| |
|
|
| |
|
|
| |
[root@linux ~]# rndc-confgen > /etc/rndc.conf
|
|
|
| |
|
|
| |
[root@linux ~]# vi /etc/rndc.conf
# Start of rndc.conf
key "rndckey" {
algorithm hmac-md5;
secret "IXxug0fbwvxGXDkoVeZzr7wh2TOIA5c5TIISZilgpZwiV2dPVxbd・・・ (省略)";
};
options {
default-key "rndckey";
default-server 127.0.0.1;
default-port 953;
};
# End of rndc.conf
|
|
|
|
|
|
| |
|
|
| |
[root@linux ~]# vi /etc/named.conf
:
:
//
// a caching only nameserver config
//
key "rndckey" {
algorithm hmac-md5;
secret "IXxug0fbwvxGXDkoVeZzr7wh2TOIA5c5TI・・・ (省略)";
};
controls {
inet 127.0.0.1 port 953
allow { 127.0.0.1; } keys { "rndckey"; };
};
// controls {
// inet 127.0.0.1 allow { localhost; } keys { rndckey; };
// };
:
:
//include "/etc/rndc.key";
// 正引きゾーン設定
zone "mountainbigroad.jp" IN {
type master;
file "mountainbigroad.jp.db";
notify yes;
also-notify { 192.168.1.12; };
allow-transfer { key rndckey; };
};
// 逆引きゾーン設定
zone "1.168.192.in-addr.arpa" IN {
type master;
file "1.168.192.in-addr.arpa.db";
notify yes;
also-notify { 192.168.1.12; };
allow-transfer { key rndckey; };
};
|
|
|
| |
|
|
| |
|
|
| |
[root@linux ~]# ls -l /var/
合計 168
:
drwxr-x--- 5 root named 4096 7月 16 17:01 named
:
[root@linux ~]# chown named /var/named
[root@linux ~]# ls -l /var/
合計 168
:
drwxr-x--- 5 named named 4096 7月 16 17:01 named
:
|
|
|
|
|
|
| |
|
|
|
|
|
| |
|
|
| |
[root@linux ~]# /etc/named.conf
options {
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
version "unknown";
// query-source address * port 53;
allow-query{
127.0.0.1;
192.168.1.1/24;
};
allow-recursion{
127.0.0.1;
192.168.1.1/24;
};
allow-transfer{
127.0.0.1;
192.168.1.1/24;
};
forwarders{
192.168.1.1;
};
};
// a caching only nameserver config
//
// controls {
// inet 127.0.0.1 allow { localhost; } keys { rndckey; };
// };
// Log 出力制限
logging {
category lame-servers { null; };
};
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 "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; };
};
// include "/etc/rndc.key";
key "rndckey" {
algorithm hmac-md5;
secret "IXxug0fbwvxGXDkoVeZzr7wh2TOIA5c5TI・・・ (省略)";
};
server 192.168.1.11 {
keys "rndckey";
};
// 正引きゾーン設定
zone "mountainbigroad.jp" IN {
type slave;
masters { 192.168.1.11; };
file "mountainbigroad.jp.db";
};
// 逆引きゾーン設定
zone "1.168.192.in-addr.arpa" IN {
type slave;
masters { 192.168.1.11; };
file "1.168.192.in-addr.arpa.db";
};
|
|
|
| |
|
|
| |
|
|
| |
[root@linux ~]# ls -l /var/
合計 168
:
drwxr-x--- 5 root named 4096 7月 16 17:01 named
:
[root@linux ~]# chown named /var/named
[root@linux ~]# ls -l /var/
合計 168
:
drwxr-x--- 5 named named 4096 7月 16 17:01 named
:
|
|
|
|
|
|
| |
[root@linux ~]# service named restart
namedを停止中: [ OK ]
namedを起動中: [ OK ]
|
|
|
|
|
|
| |
[root@linux ~]# service named restart
namedを停止中: [ OK ]
namedを起動中: [ OK ]
|
|
|
|
|
|
| |
|
|
| |
[root@linux ~]# rndc reload
server reload successful
|
|
|
| |
|
|
| |
[root@linux ~]# view /var/log/messages
:
:
Mar 12 16:58:31 mbr10 named[1552]: zone mountainbigroad.jp/IN: loaded serial 2006070102
Mar 12 16:58:31 mbr10 named[1552]: zone mountainbigroad.jp/IN: sending notifies (serial 2006070102)
Mar 12 16:58:31 mbr10 named[1552]: client 192.168.71.131#49172: transfer of 'mountainbigroad.jp/IN': AXFR-style
IXFR started: TSIG rndckey
Mar 12 16:58:31 mbr10 named[1552]: client 192.168.71.131#49172: transfer of 'mountainbigroad.jp/IN': AXFR-style
IXFR ended
|
|
|
| |
|
|
| |
[root@linux ~]# view /var/log/messages
:
:
Mar 12 16:58:31 mbr11 named[1549]: client 192.168.71.130#32768: received notify for zone 'mountainbigroad.jp'
Mar 12 16:58:31 mbr11 named[1549]: zone mountainbigroad.jp/IN: Transfer started.
Mar 12 16:58:31 mbr11 named[1549]: transfer of 'mountainbigroad.jp/IN' from 192.168.71.130#53: connected using
192.168.71.131#49108
Mar 12 16:58:31 mbr11 named[1549]: zone mountainbigroad.jp/IN: transferred serial 2006070104: TSIG 'rndckey'
Mar 12 16:58:31 mbr11 named[1549]: transfer of 'mountainbigroad.jp/IN' from 192.168.71.130#53: end of transfer
|
|
|
| |
|
|
 |
|
 |
 |