|
|
我想配一个DNS服务器.并可以将www.klgg.com解析为192.168.0.200.
主机名为:linux 版本为AS3.内核是2.4.21-27
配置如下:
文件/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 "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; };
};
zone "klgg.com" IN {
type master;
file "klgg.ssg";
};
zone "0.168.192.in-addr.arpa" IN {
type master;
file "db.192.168.0";
};
include "/etc/rndc.key";
-----------------------------------------------------------------
文件/var/named/klgg.ssg的内容如下:
--------------------------------------------------------------------
@ IN SOA klgg.com. root.localhost(
05021701
36000
3600
72000
600)
@ IN NS klgg.com.
@ IN A 192.168.0.200
www IN A 192.168.0.200
ssg IN CNAME www
----------------------------------------------------------------------
文件/var/named/db.192.168.0的内容如下:
-------------------------------------------------------------------
@ IN SOA klgg.com. root.localhost(
05021701
36000
3600
72000
600)
@ IN NS klgg.com.
200 IN PTR www.klgg.com.
--------------------------------------------------------------------
文件/etc/resolv.conf文件的内容如下:
------------------------------------------------------------------
nameserver 192.168.0.222
-----------------------------------------------------------------
我配置完成后解析不成功。。自己找了两个多小时的错。还是没有找出来。帮帮忙。谢谢~! |
|