免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1493 | 回复: 1
打印 上一主题 下一主题

在fedora 7下使用bind-9406配置内部网域名服务器如下,但不能实现本地域名解析 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-02-16 21:33 |只看该作者 |倒序浏览
本主机名文件:
/etc/sysconfig/network
NETWORKING=yes
HOSTNAME=root.itfuture.org

/etc/named.conf配置文件如下:
//
// 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 { any; };
listen-on-v6 port 53 { any; };
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 { localhost; };
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.rfc1912.zones";
#};
// named.rfc1912.zones:
//
// Provided by Red Hat caching-nameserver package
//
// ISC BIND named zone configuration for zones recommended by
// RFC 1912 section 4.1 : localhost TLDs and address zones
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
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 "itfuture.org" IN {
type master;
file "itfuture.org.zone";
allow-update { none; };
};

zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};
zone "1.168.192.in-addr.arpa" IN {
type master;
file "1.168.192.in-addr.arpa.zone";
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; };
};



正向解析文件/var/named/chroot/var/named/itfuture.org.zone如下:
$TTL 86400
@ IN SOA @ root.itfuture.org. (
5;serial
28800;refresh
7200;retry
604800;expire
86400)
@ IN NS www.itfuture.org
@ IN A 192.168.1.1
www.itfuture.org IN A 192.168.1.1

反向解析文件/var/named/chroot/var/named/1.168.192.in-addr.arpa.zone如下:
$TTL 86400
@ IN SOA @ root.itfuture.org.(
2008021601;Serial
28800; Refresh
14400; Retry
3600000;Expire
86400)
@ IN NS www.itfuture.org.
1.1.168.192.in-addr-arpa. IN PTR itfuture.org.
1.1.168.192.in-addr-arpa. IN PTR www.itfuture.org.

启动dns服务器成功
[root@root ~]# service named start
[root@root ~]# 启动 named: [确定]

使用nslookup命令来测试dns服务器,报出错误也不能实现解析
[root@root ~]# nslookup
> www.itfuture.org
Server: 192.168.1.1
Address: 192.168.1.1#53

** server can't find www.itfuture.org.itfuture.org: SERVFAIL
> 192.168.1.1
Server: 192.168.1.1
Address: 192.168.1.1#53

** server can't find 1.1.168.192.in-addr.arpa: SERVFAIL
>

论坛徽章:
0
2 [报告]
发表于 2008-02-18 16:42 |只看该作者
麻烦贴一下日志,就是/var/log/messages中关于named的内容
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP