LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1425|回复: 6

F7下DNS死活不成功,求助!谢谢好心人!

[复制链接]
发表于 2007-8-16 10:01:27 | 显示全部楼层 |阅读模式
F7,默认安装DNS
本机 192.168.9.16
hostname thanatosFC
配置目标thanatos.com

named.caching-nameserver.conf 文件([color="red"]基本没有修改,就是把listen-on port 53后面的127.0.0.1改成192.168.9.16了):

//
// named.caching-nameserver.conf
//
// Provided by Red Hat caching-nameserver package to configure the
// ISC BIND named(8) 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 { 192.168.9.16; };
        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     { localhost; };
};
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文件([color="red"]就添加了后面两个正反向)

// 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 "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; };
};

[color="red"]zone "thanatos.com" {
        type master;
        file "thanatos.com";
};

zone "9.168.192.in-addr.arpa" IN {
        type master;
        file "9.168.192.arpa";
};


[color="Red"]thanatos.com文件

$TTL 3h
thanatos.com.   IN      SOA     thanatosFC.     thanatosFC.(
1;
3h;
1h;
1w;
1h);
thanatos.com.           IN      NS      thanatosFC.
www.thanatos.com.       IN      A       192.168.9.16
thanatosFC              IN      A       192.168.9.16

9.168.192.arpa文件
$TTL    3h
9.168.192.in-addr.arpa. IN      SOA     thanatosFC.     thanatosFC.(
1;
3h;
1h;
1w;
1h);
9.168.192.in-addr.arpa.         IN      NS      thanatosFC.
16.9.168.192.in-addr.arpa.      IN      PTR     thanatosFC.
16.9.168.192.in-addr.arpa.      IN      PTR     www.thanatos.com.

还望高手指点,已经一天了,就是启动失败,郁闷……

而且我图形界面看了一下服务,named服务显示没有开启,启动也是失败,右边有这么一句:
rndc:connect failed:127.0.0.1#953:connection refused

这是怎么回事啊?谢谢啦!

[color="Green"]这是我service named restart的相关日志,为什么我是root还没有相关权限啊?
Aug 16 14:55:53 ThanatosFC named[6019]: found 1 CPU, using 1 worker thread
Aug 16 14:55:53 ThanatosFC named[6019]: loading configuration from '/etc/named.caching-nameserver.conf'
Aug 16 14:55:53 ThanatosFC named[6019]: /etc/named.caching-nameserver.conf:36: open: /etc/named.rfc1912.zones: permission denied
Aug 16 14:55:53 ThanatosFC named[6019]: loading configuration: permission denied
Aug 16 14:55:53 ThanatosFC named[6019]: exiting (due to fatal error)
发表于 2007-8-16 10:12:39 | 显示全部楼层
listen-on port 53后面的127.0.0.1改成any了


应该是 服务器ip
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-8-16 13:28:28 | 显示全部楼层
改了一下,把监听IP换成192.168.9.16了,依然启动失败……

是不是还有别的什么文件我需要写或者修改的?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-8-16 22:34:20 | 显示全部楼层
大家别不说话啊,我知道这个问题很多高手都遇到过,也不乏看过的人有遇到过并且解决了的,帮帮我们这些后来者吧,真的非常感谢了!
回复 支持 反对

使用道具 举报

发表于 2007-8-17 12:56:52 | 显示全部楼层
include "/etc/named.rfc1912.zones";


应该是这得问题! 系统里没有 /etc/named.rfc1912.zones 这个文件 或是权限不对,所以导致应用配置文件时出错!
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-8-20 20:41:05 | 显示全部楼层
我明天回去试试看……谢谢楼上的!
回复 支持 反对

使用道具 举报

发表于 2007-8-21 16:36:46 | 显示全部楼层
我在 as5下遇到的问题 基本一样 也是这样 提示如下:
Starting named:
Error in named configuration:
/etc/named.conf:14: change directory to '/var/named/chroot/var/named' failed: file not found

/etc/named.conf:14: parsing failed
我在/var/named/chroot/var/named目录下有各个zone的配置信息 可是怎么不使用

同时用maned -g执行 显示如下错误
21-Aug-2007 16:24:15.849 starting BIND 9.3.3rc2 -g
21-Aug-2007 16:24:15.849 found 4 CPUs, using 4 worker threads
21-Aug-2007 16:24:15.854 loading configuration from '/etc/named.conf'
21-Aug-2007 16:24:15.854 none:0: open: /etc/named.conf: permission denied
21-Aug-2007 16:24:15.854 loading configuration: permission denied
21-Aug-2007 16:24:15.854 exiting (due to fatal error)

他怎么用/etc下的named.conf文件  到底chroot该如何使用呀?????
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表