关于DNS的很菜的问题
初学linux,自己用虚拟机搭了个DNS服务,最简单的那种,配置基本从网上抄下来的
测试时发现
[root@dns1 /]# nslookup
> www1.zz.com.cn
Server: ::1
Address: ::1#53
Name: www1.zz.com.cn
Address: 172.28.31.39
请问是哪里的问题,多谢指教了!
以下是配置文件
[root@dns1 /]# cat /etc/named.conf /var/named/zz.com.cn.zone /var/named/172.28.0.zone /var/named/127.0.0.zone
//
// named.caching-nameserver.conf
//
// Provided by Red Hat caching-nameserver package to configure the
// ISC BIND named( DNS server as a caching only nameserver
// (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
// DO NOT EDIT THIS FILE - use system-config-bind or an editor
// to create named.conf - edits to this file will be lost on
// caching-nameserver package upgrade.
//
options {
listen-on port 53 { 172.28.31.39; };
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query { any; };
recursion yes;
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
zone "." IN {
type hint;
file "named.ca";
};
zone "zz.com.cn" IN {
type master;
file "zz.com.cn.zone";
allow-update { none; };
};
zone "0.28.172.in-addr.arpa" IN {
type master;
file "172.28.0.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "127.0.0.zone";
};
$TTL 1D
@ IN SOA dns1.zz.com.cn. root.zz.com.cn. (
200810 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
IN NS dns1.zz.com.cn.
dns1 IN A 172.28.31.39
www1 IN A 172.28.31.39
ftp1 IN CNAME www1
$TTL 1D
@ IN SOA dns1.zz.com.cn. root.zz.com.cn. (
200810 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
IN NS dns1.zz.com.cn.
39 IN PTR dns1.zz.com.cn.
39 IN PTR www1.zz.com.cn.
39 IN PTR ftp1.zz.com.cn.
$TTL 1D
@ IN SOA @ root.zz.com.cn. (
200810 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
IN NS localhost.
1 IN PTR localhost.
[root@dns1 /]#