当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 2 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : [问题]DNS服务器架构中的问题。
帖子发表于 : 2008-07-11 13:41 

注册: 2008-05-06 16:25
帖子: 7
送出感谢: 0 次
接收感谢: 0 次
我使用BIND9想建立DNS服务器。但是我找不到问题出在哪里。服务运行正常。但是无法进行自己定义的解析。
我这里列出下列配置文件。想麻烦各位帮我分析一下。问题在哪里

这个是name.conf
引用:
// This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
// structure of BIND configuration files in Debian, *BEFORE* you customize
// this configuration file.
//
// If you are just adding zones, please do that in /etc/bind/named.conf.local

include "/etc/bind/named.conf.options";

// prime the server with knowledge of the root servers
zone "." {
type hint;
file "/etc/bind/db.root";
};

// be authoritative for the localhost forward and reverse zones, and for
// broadcast zones as per RFC 1912

zone "localhost" {
type master;
file "/etc/bind/db.local";
};

zone "127.in-addr.arpa" {
type master;
file "/etc/bind/db.127";
};

zone "0.in-addr.arpa" {
type master;
file "/etc/bind/db.0";
};

zone "255.in-addr.arpa" {
type master;
file "/etc/bind/db.255";
};

zone "33.168.192.in-addr.arpa" {

type master;

file "/etc/bind/db.dns";

};


// zone "com" { type delegation-only; };
// zone "net" { type delegation-only; };

// From the release notes:
// Because many of our users are uncomfortable receiving undelegated answers
// from root or top level domains, other than a few for whom that behaviour
// has been trusted and expected for quite some length of time, we have now
// introduced the "root-delegations-only" feature which applies delegation-only
// logic to all top level domains, and to the root domain. An exception list
// should be specified, including "MUSEUM" and "DE", and any other top level
// domains from whom undelegated responses are expected and trusted.
// root-delegation-only exclude { "DE"; "MUSEUM"; };

include "/etc/bind/named.conf.local";




key "rndc-key" {

algorithm hmac-md5;

secret "f6O3asXZ9SnBvbowFQwMBQ==";

};



controls {

inet 127.0.0.1 port 953

allow { 127.0.0.1; } keys { "rndc-key"; };

};


下列为db.fot.com
引用:
;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA dark.fot.com. dark.fot.com. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS dark.fot.com.
@ IN A 192.168.33.86
@ IN MX 10 dark.fot.com.
dark.fot.com. IN A 192.168.33.86

www.fot.com. in chame dark.fot.com.
ftp.fot.com. in chame dark.fot.com.
zabbix.fot.com. in chame dark.fot.com.


named.conf.local
引用:
//
// Do any local configuration here
//

// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";
zone "fot.com" {

type master;

file "/etc/bind/db.fot.com";

};


named.conf.options
引用:
options {
directory "/var/cache/bind";


// If there is a firewall between you and nameservers you want
// to talk to, you might need to uncomment the query-source
// directive below. Previous versions of BIND always asked
// questions using port 53, but BIND 8.1 and later use an unprivileged
// port by default.

// query-source address * port 53;

// If your ISP provided one or more IP addresses for stable
// nameservers, you probably want to use them as forwarders.
// Uncomment the following block, and insert the addresses replacing
// the all-0's placeholder.

forwarders {
202.96.209.133;
202.96.209.5;
};



auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
allow-query { any; };
};


运行rndc status后显示
引用:
dark@dark:/etc/bind$ rndc status
number of zones: 16
debug level: 0
xfers running: 0
xfers deferred: 0
soa queries in progress: 0
query logging is OFF
recursive clients: 0/0/1000
tcp clients: 0/100
server is up and running
dark@dark:/etc/bind$

重启bind
引用:
dark@dark:/etc/bind$ sudo /etc/init.d/bind9 restart
* Stopping domain name service... bind [ OK ]
* Starting domain name service... bind [ OK ]
dark@dark:/etc/bind$



运行nslookup
引用:
dark@dark:/etc/bind$ nslookup dark.fot.com
Server: 192.168.33.86
Address: 192.168.33.86#53

** server can't find dark.fot.com: SERVFAIL

dark@dark:/etc/bind$


页首
 用户资料  
 
2 楼 
 文章标题 :
帖子发表于 : 2008-07-11 14:38 

注册: 2008-05-06 16:25
帖子: 7
送出感谢: 0 次
接收感谢: 0 次
在查看了 syslog文件后才发现问题。是我打错字了。。。
db.fot.com中的

www.fot.com. in chame dark.fot.com.
ftp.fot.com. in chame dark.fot.com.
zabbix.fot.com. in chame dark.fot.com.

应该是cname 不是chame

无语。。。因为没设置LOG文件忘记去syslog里看了。现在已经解决问题了。谢谢


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 2 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 3 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译