QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1281|回复: 21

求解

[复制链接]
发表于 2002-12-5 17:09:42 | 显示全部楼层 |阅读模式
本人设置DNS为内部网使用.现反向解析已成功.但正向解析一直不成功.如果在nslookup环境下输入ns
则提示server can't find ns.:nxdomain
如果输入ns.linux.hz160.com
则提示server can't find ns.linux.hzxxx.com.:servfail
对了此台机器有两块网卡一块内部网地址,一块公网固定IP地址其中linux.hzxxx.com二级域名已指向公网地址.我想内部网与公网同用一个域名.
但是好像听说内部网的DNS配置好像与internet的DNS配置有所区别.
请问各位是否知道要注意点什么?谢谢!
发表于 2002-12-5 17:23:05 | 显示全部楼层
把你的具体配置及出错信息贴上来,不要吝啬的。

内部与 公网的正规域名 使用同一个,我看不大好吧。内部的搞另外的域名好了。
回复

使用道具 举报

 楼主| 发表于 2002-12-5 17:28:25 | 显示全部楼层
好的,只是要明天了,不好意思.
回复

使用道具 举报

 楼主| 发表于 2002-12-6 09:00:42 | 显示全部楼层
named.conf配置

// generated by named-bootconf.pl

options {
        directory "/var/named";
        /*
         * 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 "linux.hz160.com"IN{
        type master;
        file "mydomain.db";
        allow-update {none;};
};

zone "0.168.192.in-addr.arpa"IN{
        type master;
        file "0.168.192";
        allow-update {none;};
};

include "/etc/rndc.key";
回复

使用道具 举报

 楼主| 发表于 2002-12-6 09:02:07 | 显示全部楼层
mydomain.db配置

$TTL 86400
@                 IN SOA ns.linux.hz160.com. root.ns.linux.hz160.com. (
                                        2002120511        ; serial (d. adams)
                                        28800                ; refresh
                                        14400                ; retry
                                        3600000                ; expire
                                        86400 )                ; minimum
                        IN NS                ns.linux.hz160.com.
        localhost        IN A                127.0.0.1
                        IN A                192.168.0.1
        ns                IN A                192.168.0.1
;        mail                   A                192.168.0.1
;        www                   A                192.168.0.1
;        pc98                   A                192.168.0.128
回复

使用道具 举报

 楼主| 发表于 2002-12-6 09:03:28 | 显示全部楼层
localhost配置

$TTL        86400
$ORIGIN localhost.
@                        1D IN SOA ns.linux.hz160.com. root.ns.linux.hz160.com. (
                                        45                ; serial (d. adams)
                                        3H                ; refresh
                                        15M                ; retry
                                        1W                ; expiry
                                        1D )                ; minimum

                        1D IN NS        @
                        1D IN A                127.0.0.1


正向只有localhost可以解析.
回复

使用道具 举报

发表于 2002-12-6 14:43:50 | 显示全部楼层
那 nslookup 、或者 dig 出错信息怎么样呢,具体 ??
回复

使用道具 举报

 楼主| 发表于 2002-12-6 15:22:33 | 显示全部楼层
[root@ns zb]# 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.
> ns
Server:         192.168.0.1
Address:        192.168.0.1#53

** server can't find ns.: NXDOMAIN
> localhost
Server:         192.168.0.1
Address:        192.168.0.1#53

Name:   localhost
Address: 127.0.0.1
> ns.linux.hz160.com
Server:         192.168.0.1
Address:        192.168.0.1#53

** server can't find ns.linux.hz160.com.: SERVFAIL
> 192.168.0.1
Server:         192.168.0.1
Address:        192.168.0.1#53

1.0.168.192.in-addr.arpa        name = ns.linux.hz160.com.
1.0.168.192.in-addr.arpa        name = localhost.
>
回复

使用道具 举报

发表于 2002-12-6 15:43:20 | 显示全部楼层
文件: /etc/resolv.conf 的内容呢。

首先确保你的 named 里面 的部分 “.”是不可缺少的部分。缺少“.”会造成你的解析错误。


提问,要把自己的东西全部告诉人家,人家才能帮助你呀 !!!
回复

使用道具 举报

 楼主| 发表于 2002-12-6 15:52:11 | 显示全部楼层
[root@ns etc]# cat resolv.conf
search linux.hz160.com
nameserver 192.168.0.1
;nameserver localhost

你说的named 里面 的部分 “.”是指named.conf文件里的吗?哪里要"."
回复

使用道具 举报

发表于 2002-12-6 15:55:14 | 显示全部楼层
[quote:6e70b7e31c="bingbingzu"]mydomain.db配置

$TTL 86400
@                 IN SOA ns.linux.hz160.com. root.ns.linux.hz160.com. (
                                        2002120511        ; serial (d. adams)
                                        28800                ; refresh
                                        14400                ; retry
                                        3600000                ; expire
                                        86400 )                ; minimum
                        IN NS                ns.linux.hz160.com.
        localhost        IN A                127.0.0.1
                        IN A                192.168.0.1
        ns                IN A                192.168.0.1
;        mail                   A                192.168.0.1
;        www                   A                192.168.0.1
;        pc98                   A                192.168.0.128[/quote]


我仔细看了看。



        ns                IN A                192.168.0.1
更改为:
ns.linux.hz160.com.         IN A                192.168.0.1

你试一试。
回复

使用道具 举报

 楼主| 发表于 2002-12-6 15:59:50 | 显示全部楼层
好的,谢谢我试试.
回复

使用道具 举报

 楼主| 发表于 2002-12-6 16:05:55 | 显示全部楼层
我试了,好像还是一样的错.
回复

使用道具 举报

发表于 2002-12-6 16:55:55 | 显示全部楼层
[quote:e083c096c4="bingbingzu"]mydomain.db配置

$TTL 86400
@                 IN SOA ns.linux.hz160.com. root.ns.linux.hz160.com. (
                                        2002120511        ; serial (d. adams)
                                        28800                ; refresh
                                        14400                ; retry
                                        3600000                ; expire
                                        86400 )                ; minimum
                        IN NS                ns.linux.hz160.com.
        localhost        IN A                127.0.0.1
                        IN A                192.168.0.1
        ns                IN A                192.168.0.1
;        mail                   A                192.168.0.1
;        www                   A                192.168.0.1
;        pc98                   A                192.168.0.128[/quote]

你的还是有问题:

localhost        IN A                127.0.0.1

不应该在这个文件里面的。

不过你别的没有问题的话,named 会屏蔽它,而不加理睬的。




你看看 系统错误提示。
回复

使用道具 举报

发表于 2002-12-6 17:00:28 | 显示全部楼层
我怀疑你的 mydomain.db 文件没有被 named 加载(由于错误)。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-6-24 19:38 , Processed in 3.392270 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

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