红联Linux门户
Linux帮助

关于dns服务器配置 菜鸟郁闷求助 谢谢各位了

发布时间:2008-04-18 10:45:32来源:红联作者:moocoo
请问各位老鸟这个dns配置有什么不正确 为什么我每次配置最后结果都是这样的
[root@linux named]# nslookup
> www.test.com
Server: 192.168.16.40
Address: 192.168.16.40#53

** server can't find www.test.com: SERVFAIL
下面是具体的信息 希望能够帮我解答这个问题 谢谢


//系统版本
[root@linux named]# lsb_release -a
LSB Version: :core-3.0-ia32:core-3.0-noarch:graphics-3.0-ia32:graphics-3.0-noarch
Distributor ID: RedHatEnterpriseAS
Description: Red Hat Enterprise Linux AS release 4 (Nahant Update 3)
Release: 4
Codename: NahantUpdate3
//主机名字
linux.test.com
//运行环境
VMware 6.0
//配置文件
/etc/named.conf

//
// named.conf for Red Hat caching-nameserver
//

options {
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
/*
* 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 "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 "test.com" IN {
type master;
file "test.name2ip";
allow-update { none; };
};

zone "16.168.192.in-addr.arpa" IN {
type master;
file "test.ip2name";
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; };
};

include "/etc/rndc.key";

/var/named/test.name2ip

$TTL 86400
@ IN SOA linux.test.com. root.linux.test.com. (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
@ IN NS linux.test.com.
www IN A 192.168.16.2
ftp IN A 192.168.16.25


/var/named/test.ip2name

$TTL 86400
@ IN SOA linux.test.com. root.linux.test.com. (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
@ IN NS linux.test.com.
2 IN PTR www.test.com.
15 IN PTR ftp.test.com.
文章评论

共有 4 条评论

  1. zhou111527 于 2009-04-16 11:12:51发表:

  2. zy66289214 于 2008-04-21 17:12:36发表:

    发这些是没用的 关键要发日志给我们看才知道你那里出问题了 tail/var/log/messages

  3. moocoo 于 2008-04-18 11:03:10发表:

    原因是我的test.name2ip test.ip2name 文件的位置没对

    应该放在/var/named/chroot/var/named下面

    但是之前看的书籍和教程根本没有这样写 我没乱说 保证是这样的

    还好我在其他论坛上找出了结果

    还是谢谢大家

  4. moocoo 于 2008-04-18 10:55:52发表:

    我没有开防火墙