Chinaunix

标题: DNS BIND 9.3.2-SUSE10 [打印本页]

作者: BMX狂    时间: 2012-05-10 16:44
标题: DNS BIND 9.3.2-SUSE10
各位DX,小弟在配置DNS服务的时候出现了一个问题,现在不知道在哪里配置出现问题,希望各位能给点意见

系统是suse10,bind9.3.2 suse的ip是192.168.0.110,web服务器的ip地址是192.168.0.49,域名为www.pim.com.la,需要通过ip地址192.168.0.49来解析www.pim.com.la这个地址,现配置文件如下:

/etc/named.conf配置文件如下:
zone "0.168.192.in-addr.arpa" in {
        type master;
        file "192.168.0.zone";
};
# Include the meta include file generated by createNamedConfInclude.  This
# includes all files as configured in NAMED_CONF_INCLUDE_FILES from
# /etc/sysconfig/named

include "/etc/named.conf.include";
logging {
        category default { log_syslog; };
        channel log_syslog { syslog; };
};
#zone "example.com" in {
#       allow-transfer { any; };
#       file "master/example.com";
#       type master;
#};

# You can insert further zone records for your own domains below or create
# single files in /etc/named.d/ and add the file names to
# NAMED_CONF_INCLUDE_FILES.
# See /usr/share/doc/packages/bind/README.SUSE for more details.
"/etc/named.conf" 152L, 4201C                                 147,1         Bot
zone "." in {
        type hint;
        file "root.hint";
};

zone "localhost" in {
        type master;
        file "localhost.zone";
};

zone "0.0.127.in-addr.arpa" in {
        type master;
        file "127.0.0.zone";
};

zone "pim.zone" in {
        type master;
        file "pim.zone";
};

zone "0.168.192.in-addr.arpa" in {
        type master;
        file "192.168.0.zone";
};
# Include the meta include file generated by createNamedConfInclude.  This
# includes all files as configured in NAMED_CONF_INCLUDE_FILES from
# /etc/sysconfig/named

include "/etc/named.conf.include";
logging {
        category default { log_syslog; };
        channel log_syslog { syslog; };
};
#zone "example.com" in {
#       allow-transfer { any; };
#       file "master/example.com";
#       type master;
#};

正相解析文件为:
$TTL 1W
@    IN SOA dns.pim.com.la. root.pim.com.la.(
                       42;Serial
                       2D;Refresh
                       4H;Retry
                       6W;Expire
                       1W);Minimum
             IN NS  dns.pim.com.la.
             IN A 192.168.0.110
dns          IN  A   192.168.0.110
www          IN A    192.168.0.49
方向解析文件为:
$TTL   1W
@      IN  SOA   pim.com.la.   root.pim.com.la.(
                  42;Serial
                  2D;Refresh
                  4H;Retry
                  6W;Expire
                  1W);Minimum

       IN NS  dns.pim.com.la.
dns     IN A 192.168.0.110
web     IN A 192.168.0.110
www     IN CNAME web

还是解析不了,不知道没有注意哪个细节
作者: chenyx    时间: 2012-05-10 18:38
bind服务启动正常不?检查下系统日志,看看有没有bind的报错信息
作者: BMX狂    时间: 2012-05-11 10:22
service named status,显示系统正常运行,我的日志是在/var/log/message里面看,能麻烦看看我的配置文件写的有没有错吗?
作者: chenyx    时间: 2012-05-11 10:28
方向解析文件为:
$TTL   1W
@      IN  SOA   pim.com.la.   root.pim.com.la.(
                  42;Serial
                  2D;Refresh
                  4H;Retry
                  6W;Expire
                  1W);Minimum

       IN NS  dns.pim.com.la.
dns     IN A 192.168.0.110
web     IN A 192.168.0.110
www     IN CNAME web

这个是反向解析的配置?不对,你应该写成类似
110 IN PTR dns.pim.com.la.
的形式




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2