Index ソフト・ハード Bind | Bind タスク |
機能 構成・方式 タスク レジストラ FW許可 起動 nslookup マルチドメイン ゾーン転送要求 rndc インストール |
レジストラの設定 ・ホスト更新(ホストの登録) ・ネームサーバ変更(ネームサーバ情報の変更) ファイアウォール許可
・他のマシンからのアクセスを許可
# firewall-cmd --add-service=dns --zone=public
・システム起動時に許可する。
# firewall-cmd --add-service=dns --zone=public --permanent
Bindの起動
・named.serviceを起動
# systemctl start named-chroot.service
・システム起動時に起動する。
# systemctl enable named-chroot.service
nslookup 「dig」コマンドは、表示形式がゾーンファイルの形式・DNSを利用して確認 ・Windowsではコマンドプロンプトで実行 DNSのキャッシュをクリアする。(nslookupとpingなどと結果が異なる場合) >ipconfig /flushdns Windows IP 構成 DNS リゾルバー キャッシュは正常にフラッシュされました。・type=A(Aレコードを問い合わせる)
C:\>nslookup
> set type=A
> www.aaa.bbb.ccc
名前: www.aaa.bbb.ccc
Address: 192.168.1.2
・type=PTR(PTRレコードを問い合わせる)
C:\>nslookup
> set type=PTR
> 192.168.1.2
2.1.168.192.in-addr.arpa name = www.aaa.bbb.ccc
・type=MX(MXレコードを問い合わせる)
C:\>nslookup
> set type=MX
> aaa.bbb.ccc
aaa.bbb.ccc MX preference = 10, mail exchanger = mail10.aaa.bbb.ccc
aaa.bbb.ccc MX preference = 10, mail exchanger = mail11.aaa.bbb.ccc
・type=CNAME(MXレコードを問い合わせる)
C:\>nslookup
> set type=CNAME
> www.aaa.bbb.ccc
www.aaa.bbb.ccc canonical name = host1.aaa.bbb.ccc
・server(問い合わせるサーバーを指定のサーバーに切り替える)
C:\>nslookup
> server xxx.xxx.xxx.xxx
> www.ddd.eee.fff
サーバー: ns1.ddd.eee.fff
名前: www.ddd.eee.fff
Addresses: xxx.xxx.xxx.xxx
・set debug(DNSに問い合わせて得られる様々な情報を表示)
C:\>nslookup
> set debug
> www.ddd.eee.fff
様々な情報を表示
マルチドメイン ・「/etc/named.conf」を変更 ・zoneファイルを追加(他のzoneファイルと同様)
view "external" {
match-clients { any; };
match-destinations { any; };
recursion no;
include "/etc/named/xxxxxxxx.zone.wan";
include "/etc/named/(追加).zone.wan";
};
・「named-checkconf」コマンドなどで確認ゾーン転送要求 ・「/etc/named.conf」を変更 ・zoneファイルを追加(他のzoneファイルと同様)
view "external" {
match-clients { any; };
match-destinations { any; };
recursion no;
include "/etc/named/xxxxxxxx.zone.wan";
include "/etc/named/(追加).zone.wan";
};
・「named-checkconf」コマンドなどで確認rndc (DNSサーバを操作するユーティリティ) ・DNSサーバの設定を変更時、サービスを再起動しなくても設定を再読み込みできる。 ・書式 rndc [オプション]・オプション
|
All Rights Reserved. Copyright (C) ITCL |