|
我们有一个对等网通过ADSL上网,没有服务器的,
我想配置一台DNS服务器用来解析局域网的域名.
10.0.0.2 //是局域网的ADSL猫的地址
10.0.0.96 //是我的局域网地址;
cdj.3322.org //是我在3322.org的动态域名,也是外网访问我的web服务器地址
我想另外,如果我想外网可以可以解析我局域网内的域名,我申请了子域名!!
又该如何配置DNS??
我配置的DNS如下:
named.conf:
// generated by named-bootconf.pl
options {
directory "/var/named";
forwarders {10.0.0.96};
/*
* 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 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
};
//
// a caching only nameserver config
//
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
zone "." IN {
type hint;
file "named.ca";
};
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 " cdj.3322.org"IN {
type master;
file "cdj.3322.org.db";
};
zone "0.0.10.in-addr.arpa" IN {
type master;
file "10.0.0.db";
};
include "/etc/rndc.key";
//
/etc/resole.conf
nameserver 10.0.0.2
search localdomain
domain cdj.3322.org
nameserver 10.0.0.96
//
//
10.0.0.db
$TTL 86400
@ IN SOA ns.cdj.3322.org. root.ns.cdj.3322.org. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
@ IN NS ns.cdj.3322.org.
1 IN PTR www.cdj.3322.org.
//
cdj.3322.org.db
$TTL 86400
@ IN SOA ns.cdj.3322.org. root.ns.cdj.org. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
@ IN NS ns.cdj.3322.org.
@ IN A 10.0.0.96
localhost IN A 127.0.0.1
ns IN A 10.0.0.96
www IN A 10.0.0.96
我用nslookup测试的结果,DNS没有配置成功,如下:
[root@localhost named]# nslookup
Note: nslookup is deprecated and may be removed from future releases.
Consider using the `dig' or `host' programs instead. Run nslookup with
the `-sil[ent]' option to prevent this message from appearing.
> www
Server: 10.0.0.2
Address: 10.0.0.2#53
** server can't find www: NXDOMAIN
>
> ns
Server: 10.0.0.2
Address: 10.0.0.2#53
** server can't find ns: NXDOMAIN
>
救救我!!赔了几天了还是不行呀!!! |
|