|
楼主 |
发表于 2003-7-1 22:16:24
|
显示全部楼层
比如我要查看192.168.113.168的主机名!我的dns配置是这样的
/etc/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 "snoopy.gov" IN {
type master;
file"snoopy.gov";
};
zone "113.168.192.in-addr.arpa"IN {
type master;
file "snoopy.ptr";
};
include "/etc/rndc.key";
/var/named/snoopy.gov
$ttl 86400
@ IN SOA snoopy.gov. root.localhost. (
2003052601;
28800;
14400;
3600000;
86400);
IN NS ns.snoopy.gov.
ns IN A 192.168.113.88
ns1 IN A 192.168.113.168 /*这里加上这么一行*/
www IN CNAME ns
~
/var/named/snoopy.ptr
$ttl 86400
@ IN SOA snoopy.gov. root.localhost. (
2003052602;
28800;
14400;
3600000;
86400);
IN NS ns.snoopy.gov.
88 IN PTR ns.snoopy.gov.
ns1 IN PTR 192.168.113.168
这样我用nslookup 192.168.113.168,,找不到
顺便多个问题是,,,在/etc/named.conf里最后一句
include "/etc/rndc.key";
是什么意思来的啊???? |
|