CentOS6.9 bind配置

前端之家收集整理的这篇文章主要介绍了CentOS6.9 bind配置前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
@H_502_0@#yum -y install bind*

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

@H_502_0@127.0.0.1 test1.yundasys.com

@H_502_0@10.26.100.10test1.yundasys.com

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

@H_502_0@PEERDNS=no

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

@H_502_0@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

@H_502_0@#vim /etc/named.conf

@H_502_0@options {

@H_502_0@ listen-on port 53 { 10.26.100.10; };

@H_502_0@ allow-query { any; };

@H_502_0@ allow-transfer { none; };

@H_502_0@}

@H_502_0@zone "yundasys.com" IN

@H_502_0@{

@H_502_0@ type master;

@H_502_0@ file "test1.yundasys.com.zone";

@H_502_0@};

@H_502_0@

@H_502_0@zone "100.26.10.in-addr.arpa" IN

@H_502_0@{

@H_502_0@ type master;

@H_502_0@ file "test1.10.26.100.zone";

@H_502_0@};

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

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

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

@H_502_0@$TTL 1D

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

@H_502_0@0; serial

@H_502_0@1D; refresh

@H_502_0@1H; retry

@H_502_0@1W; expire

@H_502_0@3H ); minimum

@H_502_0@@INNStest1.yundasys.com.

@H_502_0@test1.yundasys.com.INA10.26.100.10

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

@H_502_0@$TTL 1D

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

@H_502_0@0; serial

@H_502_0@1D; refresh

@H_502_0@1H; retry

@H_502_0@1W; expire

@H_502_0@3H ); minimum

@H_502_0@@INNStest1.yundasys.com.

@H_502_0@10INPTRtest1.yundasys.com.

@H_502_0@#named-checkconf

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

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

@H_502_0@zone tes1.10.26.100/IN: loaded serial 0

@H_502_0@OK

@H_502_0@#service named start

@H_502_0@[root@test1 ~]# nslookup

@H_502_0@> 10.26.100.10

@H_502_0@Server:10.26.100.10

@H_502_0@Address:10.26.100.10#53

@H_502_0@

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

@H_502_0@> test1.yundasys.com

@H_502_0@Server:10.26.100.10

@H_502_0@Address:10.26.100.10#53

@H_502_0@

@H_502_0@Name:test1.yundasys.com

@H_502_0@Address: 10.26.100.10

@H_502_0@

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

猜你在找的CentOS相关文章