LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 601|回复: 1

DNS服务器的配置问题!!求救!!

[复制链接]
发表于 2003-11-10 15:38:49 | 显示全部楼层 |阅读模式
我们有一个对等网通过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

$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
>
救救我!!赔了几天了还是不行呀!!!
发表于 2003-11-10 23:40:30 | 显示全部楼层
配置文件有问题,grep named /var/log/messages看到底哪出了问题。另,你为什么要加一个forwaders??
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表