2006年10月19日
BIND暗号鍵作成
BIND9からはmd5の共通暗号鍵が使えるらしいので追加してみる。
1.BINDの停止
ricopheria:~# /etc/init.d/bind9 stop
実行したまま設定を変えたら再起動できなくってハマってました。。。
2.鍵の作成
ricopheria:~# dnssec-keygen -a HMAC-MD5 -b 256 -n USER bind
3.rndc.keyファイルのバックアップ
ricopheria:~# cp /etc/bind
ricopheria:/etc/bind# mv rndc.key rndc.key~
4.rndc.keyの編集
(2)で作成したキーをコピーする
ricopheria:/etc/bind# more ~/Kbind.+157+21494.key
bind. IN KEY 0 2 157 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
パブリックキーを貼り付ける
ricopheria:/etc/bind# vi rndc.key
key "rndc-key" {
algorithm hmac-md5;
secret "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
};
5.rndc.confの作成
rndc.confを作ってnamed.confへrndc.keyをincludeする方法
ricopheria:/etc/bind# vi rndc.conf
# rndc.conf (based for : dnssec-keygen)
options {
default-server localhost;
default-key rndc_key;
};key rndc_key {
algorithm "hmac-md5";
secret "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
};server localhost {
key rndc_key;
};
6.named.confの編集
ricopheria:/etc/bind# vi named.conf
一行ほど追加する
include "/etc/bind/rndc.key";
7.BINDの起動
ricopheria:/etc/bind# /etc/init.d/bind9 start
- by
- at 22:35









