DNS Server BIND (2)
zone fileの作成を行います。
--ルートゾーンファイル
下記のサイトよりダウンロードする
ftp://ftp.rs.internic.net/domain/
named.root を/var/namedにコピーする
--逆引きのループバックゾーン
# vi /var/named/named.0.0.127.in-addr.arpa
-----
$TTL 86400
@ IN SOA hoge.hogehoge.net. root.hogehoge.net. (
2004080101 ;serial
28800 ;refresh
7200 ;retry
604800 ;expire
86400 ;minimum
)
IN NS hoge.hogehoge.net.
1 IN PTR localhost.
--正引きの家庭内ゾーン
# vi /var/named/hogehoge.zone
-----
$TTL 86400
@ IN SOA hoge.hogehoge.net. root.hogehoge.net. (
2004080101 ;serial
28800 ;refresh
7200 ;retry
604800 ;expire
86400 ;minimum
)
IN NS hoge.hogehoge.net. ;primry
IN A 192.168.0.10 ;Linux
www IN A 192.168.0.10 ;Linux
gw IN A 192.168.0.1 ;Gateway
pc1 IN A 192.168.0.3 ;PC
pc2 IN A 192.168.0.4 ;PC
pc3 IN A 192.168.0.5 ;PC
kuro-chan IN A 192.168.0.200 ;Kuro-box
--逆引きの家庭内ゾーン
# vi /var/named/named.0.168.192.in-addr.arpa
-----
$TTL 86400
@ IN SOA hoge.hogehoge.net. root.hogehoge.net. (
2004080101 ;serial
28800 ;refresh
7200 ;retry
604800 ;expire
86400 ;minimum
)
IN NS hoge.hogehoge.net. ;Primary
1 IN PTR gw.hogehoge.net ;Gateway
3 IN PTR pc1.hogehoge.net ;PC
4 IN PTR pc2.hogehoge.net ;PC
5 IN PTR pc3.hogehoge.net ;PC
10 IN PTR hoge.hogehoge.net ;Linux
200 IN PTR kuro-chan.hogehoge.net ;Kuro-Box
--DNS動作チェック
# named-checkconf
# cd /var/named
# named-checkzone *zone.file*
--namedの再起動
# service named restart
--参考ページ
http://www.kaju.homeip.net/bind.shtml
http://www.jitaku-server.net/bind_intro.html
http://www.aconus.com/~oyaji/dns/bind_linux.htm
「Linux」カテゴリの記事
- CronChecker(2014.08.19)
- 軽量Linux KonaLinux(2014.06.06)
- Ubuntu 14.04 LTSリリース(2014.04.24)
- 秘匿性OS Tails(2014.04.18)
- Ziproxy logrotate(2014.02.18)
The comments to this entry are closed.
Comments