Centos Bind配置完整版

    Read

首先要成功安装Centos操作系统,最新版本是Centos 6.4版本,最小化安装。

[root@localhost named]# ifconfig -a


设置本机的dns。SourceByrd's Weblog-https://note.t4x.org/system/centos-bind-config/

SourceByrd's Weblog-https://note.t4x.org/system/centos-bind-config/

yum安装:SourceByrd's Weblog-https://note.t4x.org/system/centos-bind-config/

SourceByrd's Weblog-https://note.t4x.org/system/centos-bind-config/

######在安装bind-chroot的情况下,配置文件保存在/var/named/chroot/etc/目录下,其实是做了软链接过去。SourceByrd's Weblog-https://note.t4x.org/system/centos-bind-config/

配置信息:

SourceByrd's Weblog-https://note.t4x.org/system/centos-bind-config/

到此基本上DNS服务器可以跑起来了。哦,不要忘记去把/etc/resolv.conf修改为自己这台服务器的IP哦!~下面开始创建域以及域文件。SourceByrd's Weblog-https://note.t4x.org/system/centos-bind-config/

可以直接修改named.conf,也可以在named.rfc1912.zones下面创建,我喜欢在named.rfc1912.zones下面创建。SourceByrd's Weblog-https://note.t4x.org/system/centos-bind-config/

SourceByrd's Weblog-https://note.t4x.org/system/centos-bind-config/

然后在SourceByrd's Weblog-https://note.t4x.org/system/centos-bind-config/

SourceByrd's Weblog-https://note.t4x.org/system/centos-bind-config/

创建一个文件名为a.com.zone的正向区域文件。SourceByrd's Weblog-https://note.t4x.org/system/centos-bind-config/

SourceByrd's Weblog-https://note.t4x.org/system/centos-bind-config/

注意第二行哦!!@ IN SOA a.com admin.a.com.是非常重要的哦!~
然后我们再来创建一个反向区域文件。
首先在named.rfc1912.zones创建一个反向区域SourceByrd's Weblog-https://note.t4x.org/system/centos-bind-config/

SourceByrd's Weblog-https://note.t4x.org/system/centos-bind-config/

然后再来创建一个名字为192.168.1.zone的文件。SourceByrd's Weblog-https://note.t4x.org/system/centos-bind-config/

SourceByrd's Weblog-https://note.t4x.org/system/centos-bind-config/

基本创建完成,经过测试正向、反向都正确。参考了很多网络文章,不一一列举,本地配置成功。SourceByrd's Weblog-https://note.t4x.org/system/centos-bind-config/

哦,对了。不要忘记开启防火墙的TCP、UDP 53端口哦!!
[root@localhost ~]# vi /etc/sysconfig/iptables
添加如下内容:SourceByrd's Weblog-https://note.t4x.org/system/centos-bind-config/

SourceByrd's Weblog-https://note.t4x.org/system/centos-bind-config/

完整版本:https://note.t4x.org/service/configuration-intelligence-dns-bases/

参考:Non-existent domain解决方法
参考:(Centos 辅助DNS配置)

参考文章如下:
1:http://dns-learning.twnic.net.tw/dns/main.html
2:http://www.linuxidc.com/ 这个网站下面相关bind的文章全部看过
3:http://blog.sina.com.cn/s/blog_bd846d6e0101dw5q.html
4:http://yuanbin.blog.51cto.com/363003/108578/
5:http://docs.oracle.com/cd/E24847_01/html/E22302/dnsref-13.html
6:http://www.chinaz.com/web/2011/0513/179982.shtml

申明:本文由BYRD原创(基于Centos6.4 X64),未经许可禁止转载!

申明:除非注明Byrd's Blog内容均为原创,未经许可禁止转载!详情请阅读版权申明!
Byrd
  • by Published on August 4, 2013
  • 原文链接:https://note.t4x.org/system/centos-bind-config/
Comments  2  Guest  0  Pingback  2
匿名

Comment

Anonymous

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: