- 论坛徽章:
- 0
|
我在 WINDOWS SERVER 2003 +BIND,配置DNS,我已经注册了一个域名,两个域名服务器,一个是NS.ABC.COM.一个是NS2.ABC.COM有一个公网地址,我按照网上说的,配置好了,BIND也运行起来了,可是结果不对。而且我跟DIG +trace www.abc.com,最后解析域名的是辅域名服务器,可是我是在主域名服务器下配置的呀,我的配置文件是这样的
include "C:\WINDOWS\system32\dns\etc\named\cnc.cfg";
include "C:\WINDOWS\system32\dns\etc\named\chinatelecom.cfg";
options {
//listen-on port 53 { any; }; //监听窗口,
//listen-on-v6 port 53 { ::1; };
directory "C:\WINDOWS\system32\dns\etc\named";
dump-file "C:\WINDOWS\system32\dns\etc\named\data\cache_dump.db";
statistics-file "C:\WINDOWS\system32\dns\etc\named\data\named_stats.txt";
memstatistics-file "C:\WINDOWS\system32\dns\etc\named\data\named_mem_stats.txt";
pid-file "C:\WINDOWS\system32\dns\etc\named.pid";
// Those options should be used carefully because they disable port
// randomization
// query-source port 53;
// query-source-v6 port 53;
forwarders {
218.30.19.40
};
allow-query { any; }; //接受所有查询
allow-query-cache { any; }; //缓存所有查询
recursion yes;
};
key "rndc-key" {
algorithm hmac-md5;
secret "p30d5VTh6iP+QBiVsEI0lw==";
};
controls {
inet 127.0.0.1 port 953
allow { 127.0.0.1; } keys { "rndc-key"; };
};
logging {
channel default_debug {
file "C:\WINDOWS\system32\dns\etc\named\data\named.run";
severity dynamic;
};
};
//view localhost_resolver {
// match-clients { any; };
// match-destinations { any; };
// recursion yes;
// include "/etc/named.rfc1912.zones";
//};
// named.rfc1912.zones:
//
// Provided by Red Hat caching-nameserver package
//
// ISC BIND named zone configuration for zones recommended by
// RFC 1912 section 4.1 : localhost TLDs and address zones
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
view "CNC" {
match-clients { CNC; };
recursion yes;
additional-from-auth yes;
additional-from-cache yes;
zone "abc.com" IN {
type master;
file "CNC.cn.zone";
};
zone "." IN {//根DNS配置文件
type hint;
file "named.ca";
};
zone "localdomain" IN {
type master;
file "localdomain.zone";
allow-update { none; };
};
zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};
zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
type master;
file "named.ip6.local";
allow-update { none; };
};
zone "255.in-addr.arpa" IN {
type master;
file "named.broadcast";
allow-update { none; };
};
zone "0.in-addr.arpa" IN {
type master;
file "named.zero";
allow-update { none; };
};
};
view "other" {
Match-clients{ any; };
Recursion no;
zone "abc.com" IN {
type master;
file "chinatelecom.cn.zone";
};
zone "." IN {//根DNS配置文件
type hint;
file "named.ca";
};
zone "localdomain" IN {
type master;
file "localdomain.zone";
allow-update { none; };
};
zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};
zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
type master;
file "named.ip6.local";
allow-update { none; };
};
zone "255.in-addr.arpa" IN {
type master;
file "named.broadcast";
allow-update { none; };
};
zone "0.in-addr.arpa" IN {
type master;
file "named.zero";
allow-update { none; };
};
};
$ORIGIN abc.com.
$TTL 64800
@ IN SOA ns.abc.com. admin.abc.com (
2009072702 ; serial
10800 ; Refresh
7200 ; Retry
64800 ; Expire
3600 ) ; Minimum TTL
@ IN NS ns.funhd.cn.
ns2 IN A 125.76.233.69
ns IN A 123.138.18.60
www IN A 61.132..255.110
auth IN A 61.132.255.111
@ IN A 123.138.18.60
ORIGIN abc.com.
$TTL 64800
@ IN SOA ns.abc.com. admin.abc.com (
2009072702 ; serial
10800 ; Refresh
7200 ; Retry
64800 ; Expire
3600 ) ; Minimum TTL
@ IN NS ns.funhd.cn.
ns2 IN A 125.76.233.69
ns IN A 123.138.18.60
www IN A 61.132..255.1
auth IN A 61.132.255.2
@ IN A 123.138.18.60
说明下,我这样配置好了,那么对于不同的用户,我是应该给他不同地址的,可是不能正常解析地址呀,问下,我现在这个服务器有哥公网IP,也在上面安装了BIND,我这个DNS服务器上,在首选DNS那里写什么呢,是写自己呢,还是电信的DNS呢,为什么我不能解析成功呢,
我将DNS写成自己,那么可以解析出来,可是换成别的DNS 就是错误的,谁能告诉我是怎么回事呢? |
|