|
无法解析dns区文件
我想问下怎么样配置才可以使dns服务器配置正确呀??
windows xp下装的虚拟机上网是通过路游器ip:192.168.1.1 linux ip 192.168.1.4
vi /etc/resolv.conf
1 ; generated by /sbin/dhclient-script
2 nameserver 192.168.1.1
3 search localdomain
vi /etc/host.conf
1 order hosts,bind
#hostname
localhost.localdomain
vi /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 "young.org" IN {
type master;
file "young.com";
};
zone "1.192.168.in-addr.arpa" IN {
type master;
file "1.168.192";
};
include "/etc/rndc.key";
cd /var/named/
cp localdomain.zone young.org
$TTL 86400
@ IN SOA www.young.org. root.www.young.com. (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS www.young.org.
www IN A 192.168.1.4
cp localdomain.zone 1.168.192
$TTL 86400
@ IN SOA ww.young.org. root.www.young.org. (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS www.young.org.
4 IN A www.young.org.
[root@localhost named]# service named restart
停止 named:
启动 named: [ 确定 ]
[root@localhost named]# rndc reload
[root@localhost named]# host www.young.com
www.young.com is an alias for young.com.
young.com has address 216.17.139.152
[root@localhost named]# host www.young.org
www.young.org has address 82.165.128.111
[root@localhost named]# host 192.168.1.4
Host 4.1.168.192.in-addr.arpa not found: 3(NXDOMAIN)
我想问下怎么样配置才可以使dns服务器配置正确呀?? |
|