|
环境:rhel5.1 2.6.18-53.el5xen vm
ip地址:10.10.43.42
配置了bind
[root@vm etc]# pwd
/var/named/chroot/etc
[root@vm etc]# ll
total 44
-rw-r--r-- 1 root named 318 Dec 14 12:18 43.10.10.in-addr.local
-rw-r--r-- 1 root root 405 Feb 3 2009 localtime
-rw-r--r-- 1 root named 628 Dec 14 12:14 named.conf
-rw-r--r-- 1 root named 1426 Dec 14 10:27 named.confbak
-rw-r--r-- 1 root root 435 Dec 14 11:33 named.rfc1912.zones
-rw-r--r-- 1 root root 524 Mar 30 2006 named.root.hints
-rw-r--r-- 1 root named 113 Feb 3 2009 rndc.key
-rw-r--r-- 1 root named 281 Dec 14 12:24 test.com.zone
-rw-r--r-- 1 root named 293 Dec 14 12:19 test.org.zone
[root@vm etc]# cat named.conf
options
{
query-source port 53;
query-source-v6 port 53;
directory "/etc";
dump-file "data/cache_dump.db";
statistics-file "data/named_stats.txt";
memstatistics-file "data/named_mem_stats.txt";
version "1.1.1";
allow-query { any; };
};
logging
{
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
view "localhost_resolver"
{
match-clients { localhost; };
match-destinations { localhost; };
recursion yes;
# include "/etc/named.root.hints";
include "/etc/named.rfc1912.zones";
};
[root@vm etc]# cat named.rfc1912.zones
// named.rfc1912.zones:
//
// ISC BIND named zone configuration for zones recommended by
// RFC 1912 section 4.1 : localhost TLDs and address zones
//
zone "test.com" IN {
type master;
file "test.com.zone";
allow-update { none; };
};
zone "test.org" IN {
type master;
file "test.org.zone";
allow-update { none; };
};
zone "43.10.10.in-addr.arpa" IN {
type master;
file "43.10.10.in-addr.local";
allow-update { none; };
};
[root@vm etc]# cat test.com.zone
$TTL 86400
@ IN SOA @ root (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS test.com.
IN MX 10 mail.test.com.
# IN AAAA ::1
www IN A 10.10.43.203
mail IN A 10.10.43.203
[root@vm etc]# cat test.org.zone
$TTL 86400
@ IN SOA localhost root (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS test.org.
IN MX 10 mail.test.org.
www IN A 10.10.43.203
mail IN A 10.10.43.203
[root@vm etc]# cat 43.10.10.in-addr.local
$TTL 86400
@ IN SOA @ root (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS test.com
IN NS test.org
IN AAAA ::1
203 IN PTR www.test.com
203 IN PTR www.test.org
203 IN PTR mail.test.com
203 IN PTR mail.test.org
启动DNS 为OK 测试有问题 nslookup一样
症状为ping www.test.com 无法获得响应,提示
C:\Documents and Settings\yy>ping www.test.com
Ping request could not find host www.test.com. Please check the name and try again. |
|