![]() |
|||||||||
![]() |
![]() |
bind の変更点
* install [#sb1f179c]
yum install bind
*** 設定 [#de8f7a9e]
emacs /etc/named.conf
options {
directory "/var/named";
allow-transfer{
【セカンダリDNSのIPアドレス】;
};
forward only;
query-source port 53;
};
logging {
category lame-servers { null; };
category cname { null; };
};
// 内部向け設定(外部より先に書くこと)
view "internal" {
match-clients{192.168.0.1/16;};
recursion yes;
zone "." in {
type hint;
file "named.root";
};
zone "localhost" in {
type master;
file "named.local";
};
zone "0.0.127.in-addr.arpa" in {
type master;
file "named.local_rev";
};
zone "【ドメイン名】" in {
type master;
file "【ドメイン名】.zone.internal";
};
zone "【IP帯域】.in-addr.arpa" in {
type master;
file "【IPアドレス帯】.rev.internal";
};
};
// 外部向け設定
view "external" {
match-clients{ any;};
recursion no;
zone "." in {
type hint;
file "named.root";
};
zone "localhost" in {
type master;
file "named.local";
};
zone "0.0.127.in-addr.arpa" in {
type master;
file "named.local_rev";
};
zone "【ドメイン名】" in {
type master;
file "【ドメイン名】";
};
zone "【IPアドレス帯】.in-addr.arpa" in {
type master;
file "named.【IPアドレス帯】_rev";
};
};
* 設定更新 [#wbc360e3]
*** ゾーンファイルの設定 [#pe50153c]
emacs /var/named/【ドメイン名】.zone
+更新する。
+シリアルナンバーを変える。
*** ゾーンファイルのチェック [#l9aaf86a]
/usr/sbin/named-checkzone 【ドメイン名】 /var/named/【ドメイン名】.zone
OK が出ればOK
*** 再起動 [#d97485f1]
/etc/rc.d/init.d/named restart
* INFORMATION [#ze42c450]
*** ZONE ファイルのヘッダ [#vf13be10]
$TTL 86400 ;← (データキャッシュの時間指定)
; ↓プライマリのホスト名 ↓メールアドレス
@ IN SOA pdns.example.com. postmaster.example.com. (
2006051001 ; SerialNO (更新時には旧い値より大きい値を入れる)
10800 ; Refresh(s)(セカンダリがゾーン転送チェックにくる間隔)
3600 ; Retry(s) (セカンダリが転送に失敗した際のリトライ時間)
604800 ; Expire (セカンダリが転送失敗時に無効にする期間)
86400 ) ; Minimum TTL(データキャッシュの時間指定)
※ なんと最近の emacs は .zone という拡張子の場合勝手に SerialNOをインクリメントしてくれる。便利。
|
|||||||