昨天需要配置一下dns服务器,自己在虚机上面做个实验,但是最终经过两个晚上的折腾是失败的.找了半天就是找不到原因.过程先写一下吧.
1).安装软件包:
安装bind,bind-utils,bind-chroot.
2).在/etc/named.conf中加入:
zone "riverbird.com" IN {
type master;
file "riverbird.com.hosts";
};
zone "0.168.192.in-addr.arpa" IN {
type master;
file "192.168.0.rev";
};
3).在/var/named/下面建立riverbird.com.hosts文件,内容:
$TTL 86400
@ IN SOA dns.riverbird.com. root.riverbird.com. (
1053891162;serial
3H;refresh
15M;retry
1W;expiry
1D );minimum
NS dns.riverbird.com.
MX 10 dns.riverbird.com.
riverbird.com. IN NS dns.riverbird.com.
localhost.riverbird.com IN A 127.0.0.1
; IN NS dns.riverbird.com.
;IN NS 192.168.0.8
dns.riverbird.com. IN A 192.168.0.8
;win01 IN A 192.168.0.7
www IN CNAME
ftp IN CNAME dns.riverbird.com.
4).在/var/named/下面建立192.168.0.rev,内容如下:
$TTL 86400
@ IN SOA dns.riverbird.com. root.riverbird.com. (
1053892104;serial
3H
15M
1W
1D )
IN NS dns.riverbird.com.
120 IN PTR dns.riverbird.com.
122 IN PTR
;77 IN PTR win01.riverbird.com.
5).重启named服务: service named restart
6).将/etc/resolve.conf中的别的namespace注掉,加入现在配的这个IP:192.168.0.8
7).测试: host dns.riverbird.com或host 192.168.0.8,出现:
;; connection timed out; no servers could be reached
到现在仍然没有解决,期各位高人帮忙.
阅读(1659) | 评论(4) | 转发(0) |