CentOS6.9 bind配置

#yum -y install bind*

[root@test1 ~]# cat /etc/hosts

127.0.0.1 test1.yundasys.com

10.26.100.10test1.yundasys.com

[root@test1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0

PEERDNS=no

[root@test1 ~]# cat /etc/nsswitch.conf

hosts: files dns

[root@test1 ~]# cat /etc/resolv.conf

# Generated by NetworkManager

search yundasys.com

#nameserver 202.103.24.68

#nameserver 202.103.44.150

nameserver 10.26.100.10

#vim /etc/named.conf

options {

listen-on port 53 { 10.26.100.10; };

allow-query { any; };

allow-transfer { none; };

}

zone "yundasys.com" IN

{

type master;

file "test1.yundasys.com.zone";

};


zone "100.26.10.in-addr.arpa" IN

{

type master;

file "test1.10.26.100.zone";

};

#cp -a named.localhost test1.yundasys.com.zone

#cp -a named.localhost test1.10.26.100.zone

[root@test1 ~]# cat /var/named/test1.yundasys.com.zone

$TTL 1D

@IN SOAtest1.yundasys.com. root.test1.yundasys.com. (

0; serial

1D; refresh

1H; retry

1W; expire

3H ); minimum

@INNStest1.yundasys.com.

test1.yundasys.com.INA10.26.100.10

[root@test1 ~]# cat /var/named/test1.10.26.100.zone

$TTL 1D

@IN SOA test1.yundasys.com. root.test1.yundasys.com. (

0; serial

1D; refresh

1H; retry

1W; expire

3H ); minimum

@INNStest1.yundasys.com.

10INPTRtest1.yundasys.com.

#named-checkconf

#named-checkzone tes1.yundasys.com /var/named/test1.yundasys.com.zone

[root@test1 ~]# named-checkzone tes1.10.26.100 /var/named/test1.10.26.100.zone

zone tes1.10.26.100/IN: loaded serial 0

OK

#service named start

[root@test1 ~]# nslookup

> 10.26.100.10

Server:10.26.100.10

Address:10.26.100.10#53


10.100.26.10.in-addr.arpaname = test1.yundasys.com.

> test1.yundasys.com

Server:10.26.100.10

Address:10.26.100.10#53


Name:test1.yundasys.com

Address: 10.26.100.10


参考资料http://linux.vbird.org/linux_server/0350dns.php#DNS_master_rr_re

相关文章

文章浏览阅读903次。4.清除缓存目录(/var/cache/yum)下的软件...
文章浏览阅读1.5k次。Python 是一种高级解释性编程语言,已被...
文章浏览阅读2.6k次。打开终端或控制台,以root或具有sudo权...
文章浏览阅读744次,点赞24次,收藏26次。目标:通过AppSrv为...
文章浏览阅读1.1w次,点赞8次,收藏26次。chmod命令来自于英...
文章浏览阅读1.2k次。yum源的URL地址,本例中是文件系统的路...