WEB开发网
开发学院服务器Dns服务器 配置DNS辅助域名服务器和子域名服务器 阅读

配置DNS辅助域名服务器和子域名服务器

 2007-12-02 16:30:35 来源:WEB开发网   
核心提示:一、规划说明:主机A: 双网卡192.168.1.7 --> mydomain.org主域名服务器192.168.10.7 --> myzone.org主域名服务器,其有两个子域,配置DNS辅助域名服务器和子域名服务器,为market.myzone.org和develog.myzone.org主机B:双网卡

一、规划说明:

主机A: 双网卡

192.168.1.7 --> mydomain.org主域名服务器

192.168.10.7 --> myzone.org主域名服务器,其有两个子域,为market.myzone.org和develog.myzone.org

主机B:双网卡

192.168.1.6 --> mydomain.org辅助域名服务器

192.168.10.6 --> market.myzone.org子域名服务器

两台服务器均有DNS独立的日志,用以记录查询(query_logs)记录和错误(err_logs)记录,以便于DNS后期管理;本文不过多涉及安全方面的问题。---http://www.bianceng.cn

安装过程请参照另一篇文章“Bind 9.4.0rc2安装笔记(一步步学习配置简易DNS)”。

二、主机A:

1. 主配置文件/etc/named.conf

options {
     directory "/var/named/";
     version "0.0.0";
};
logging {
     channel dns_errors
     { file "/var/log/named/err_logs" versions 3 size 10m;
     severity error;
     print-category yes;
     print-severity yes;
     print-time yes;
     };
     channel dns_queries
     { file "/var/log/named/query_logs" versions 3 size 10m;
     severity info;
     print-category yes;
     print-severity yes;
     print-time yes;
     };
     category default { dns_errors; };
     category queries { dns_queries; };
};
zone "." {
     type hint;
     file "named.ca";
};
zone "localhost" {
     type master;
     file "named.local";
};
zone "0.0.127.IN-addr.arpa" {
     type master;
     file "named.rev";
};
zone "mydomain.org" {
     type master;
     file "mydomain.org.zone";
     allow-transfer { 192.168.1.6/32; };
};
zone "myzone.org" {
     type master;
     file "myzone.org.zone";
     allow-transfer { 192.168.10.0/24; };
};
zone "10.168.192.in-addr.arpa" {
     type master;
     file "192.168.10.zone";
     allow-transfer { 192.168.10.0/24; };
};
zone "1.168.192.in-addr.arpa" {
     type master;
     file "192.168.1.zone";
     allow-transfer { 192.168.1.6/32; };
};
key "rndc-key" {
     algorithm hmac-md5;
     secret "oKLRLl8BolNj883OX1YcxQ==";
};
controls {
     inet 127.0.0.1 port 953
         allow { 127.0.0.1; } keys { "rndc-key"; };
};
# End of named.conf

2.域mydomain.org的正向解析文件/var/named/mydomain.org.zone

$TTL 1D
$ORIGIN mydomain.org.
@    1D   IN   SOA   mydomain.org.  root.mail.mydomain.org. (
             20070301
             1H
             15M
             1W
             1D )
         IN   NS   ns.mydomain.org.
         IN   MX 10  mail.mydomain.org.
mydomain.org.  IN   A    192.168.1.7   #泛域名解析
ns       IN   A    192.168.1.7
mail      IN   A    192.168.1.100
www       IN   CNAME  mail
ftp       IN   CNAME  mail

3.域mydomain.org的反向解析文件/var/named/192.168.1.zone

$TTL 1D
@    1D   IN   SOA   mydomain.org.  root.mail.mydomain.org. (
             20070301
             1H
             15M
             1W
             1D )
         IN   NS   ns.mydomain.org.
7        IN   PTR   marion.org.
7        IN   PTR   ns.mydomain.org.
100       IN   PTR   mail.mydomain.org.

1 2 3  下一页

Tags:配置 DNS 辅助

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接