LinuxSir.cn,穿越时空的Linuxsir!

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

求救:关于dns(bind)的问题

[复制链接]
发表于 2008-2-16 13:23:49 | 显示全部楼层 |阅读模式
我在#rndc status 后出现
rndc: connection to remote host closed
This may indicate that
* the remote server is using an older version of the command protocol,
* this host is not authorized to connect,
* the clocks are not syncronized, or
* the key is invalid.

不知是什么原因?哪位高手知道阿?下面是我的named.conf文件内容:

// secret must be the same as in /etc/rndc.conf
include "/etc/rndc.key";

controls {
    inet 127.0.0.1 port 953
    allow { 127.0.0.1; } keys { mykey; };
};

// Access lists (ACL's) should be defined here
include "/etc/bogon_acl.conf";
include "/etc/trusted_networks_acl.conf";

// Define logging channels
include "/etc/logging.conf";

options {
    version "";
    directory "/var/lib/named";
    dump-file "/var/tmp/named_dump.db";
    pid-file "/var/run/named.pid";
    statistics-file "/var/tmp/named.stats";
    zone-statistics yes;

(略)
zone "255.in-addr.arpa" IN {
        type master;
        file "reverse/named.broadcast";
        allow-update { none; };
};

zone "0.in-addr.arpa" IN {
        type master;
        file "reverse/named.zero";
        allow-update { none; };
};
# Use with the following in named.conf, adjusting the allow list as needed:
key "rndc-key" {
        algorithm hmac-md5;
        secret "v67jDXLMSDqFQ8sDKDyT9g==";
};

controls {
        inet 127.0.0.1 port 953
                allow { 127.0.0.1; } keys { "rndc-key"; };
};
# End of named.conf



                        下面是rndc.conf文件内容
key "rndc-key" {
        algorithm hmac-md5;
        secret "cJdFG1FgMZAjW/rlvdk6lQ==";
};

options {
        default-key "rndc-key";
        default-server 127.0.0.1;
        default-port 953;
};
# End of rndc.conf

# Use with the following in named.conf, adjusting the allow list as needed:
# key "rndc-key" {
#       algorithm hmac-md5;
#       secret "cJdFG1FgMZAjW/rlvdk6lQ==";
# };
#
# controls {
#       inet 127.0.0.1 port 953
#               allow { 127.0.0.1; } keys { "rndc-key"; };
# };
# End of named.conf
发表于 2008-2-16 13:53:46 | 显示全部楼层
secret "v67jDXLMSDqFQ8sDKDyT9g==";

你2个key不一样,要一样才行。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-2-16 14:51:55 | 显示全部楼层
多谢了,搞好了
另外,我#host localhost.com   <enter>
localhost.com has address 10.11.12.13
localhost.com mail is handled by 10 ghost.localhost.com.
localhost是我的主机名,localhost.com是自己的域吗?
那个ip  10.11.12.13,是谁的ip呢?
回复 支持 反对

使用道具 举报

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

本版积分规则

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