码迷,mamicode.com
首页 > 其他好文 > 详细

Day1-dns Extension

时间:2016-08-22 16:08:36      阅读:155      评论:0      收藏:0      [点我收藏+]

标签:

子域授权

?

父DNS服务器

yum install -y bind bind-chroot

cp /usr/share/doc/bind-9.8.2/sample/etc/named.conf /var/named/chroot/etc/

cp /usr/share/doc/bind-9.8.2/sample/etc/named.conf /var/named/chroot/etc/

cp /usr/share/doc/bind-9.8.2/sample/var/named/named.localhost /var/named/chroot/var/named/domain.com.zone

?

配置文件加区域

zone domain.com IN {

type master;

file "domain.com.zone";

};

?

解析文件

$TTL 1D

@????IN????SOA????@????name.a. (

????????????????????0????; serial

????????????????????1D????; refresh

????????????????????1H????; retry

????????????????????1W????; expire

????????????????????3H )????; minimum

@????IN????NS????s.domain.com.????????

s????IN????A????192.168.100.100

www????IN????A????192.168.100.100

?

sh.domain.com.????NS????s1.domain.com.

s1????IN????A????192.168.100.101

?

子DNS服务器

配置文件 区域

zone "sh.domain.com" IN {

type master;

file " sh.domain.com .zone";

};

?

解析文件

[root@s1 chroot]# vim var/named/1

$TTL 1D

@ IN SOA @ sub.domain.com. (

0 ; serial

1D ; refresh

1H ; retry

1W ; expire

3H ) ; minimum

@ IN NS sub.domain.com.

sub IN A 192.168.100.101

www IN A 192.168.100.1

?

解析结果

可以使用DIT命令

#dig -t www.domain.com @192.168.100.100

?

[root@s chroot]# nslookup www.sh.domain.com 192.168.100.100

Server:????????192.168.100.100

Address:????192.168.100.100#53

?

Non-authoritative answer:????????????为非权威的

Name:????www.sh.domain.com

Address: 192.168.100.1

?

配置转发

zone "domain.com" {

type forward;

forwarders { 192.168.100.100; };

?

[root@s1 chroot]# nslookup www.domain.com 192.168.100.101

Server:????????192.168.100.101

Address:????192.168.100.101#53

?

Non-authoritative answer:

Name:????www.domain.com

Address: 192.168.100.100

};

Day1-dns Extension

标签:

原文地址:http://www.cnblogs.com/fina/p/5795924.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!