由 kpjiang 在 11-20-2002 20:41 发表:
DNS 问题
请教各位,我想在我的局域网内架一个DNS Server.我的dns文件配置如下;但我怎么也不能解析,请各位高手帮我看一下;
hosts:
27.0.0.1 localhost.localdomain localhost
192.168.10.1 linux.star.com
172.18.1.1 linux.star.com
resolv.conf:
nameserver 192.168.10.1
named.conf:
/ generated by named-bootconf.pl
// secret must be the same as in /etc/rndc.conf
key "key" {
algorithm hmac-md5;
secret
"c3Ryb25nIGVub3VnaCBmb3IgYSBtYW4gYnV0IG1hZGUgZm9yIGEgd29tYW4K";
};
controls {
inet 127.0.0.1 allow { any; } keys { "key"; };
};
options {
pid-file "/var/run/named/named.pid";
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
//
zone "." {
type hint;
file "named.ca";
};
zone "0.0.127.in-addr.arpa" {
type master;
file "named.local";
};
zone "star.com" {
type master;
file "named.star.com";
};
zone "10.168.192.in-addr.arpa" {
type master;
file "192.168.10.rev";
};
named.local:
TTL 1d
@ IN SOA linux.star.com. root.linux.star.com. (
2997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS linux.star.com.
1 IN PTR localhost.
named.star.com:
TTL 8640
@ IN SOA linux.star.com. root.localhost (
2977200000 ; serial
2880 ; refresh
730 ; retry
8640 ; ttl
)
@ IN NS linux.star.com.
kpjiang IN A 192.168.10.254
www IN CNAME kpjiang
linux IN A 192.168.10.1
192.168.10.rev:
$TTL 86400
@ IN SOA linux.star.com. root.star.com. (
1 ; serial
3600 ; refresh
300 ; retry
360000 ; expire
3600 ; ttl
)
1 IN NS linux.star.com.
254 IN PTR kpjiang.star.com.
由 小红帽 在 11-20-2002 20:53 发表:
最好把头都写成
TTL 1d
@ IN SOA linux.star