linux - rndc : error:/etc/bind/rndc. key :5: unknown option 'options' . 。无法加载 rndc 配置

标签 linux dns ubuntu-12.04 bind

我正在写我的 Bsc 论文,它讨论了命名实体的基于 DNS 的身份验证 (DANE)。为了设置 DANE 记录,我首先需要设置一个简单的 BIND 服务器(稍后安装 DNSSEC.. ).我是 Linux 的新手,非常感谢详细的帮助:)

我在 Ubuntu 12.04 上安装了 BIND9。配置了“named.conf.options”、“named.conf.local”和“rndc.key”。但是,当我尝试重新启动绑定(bind)(使用命令:/etc/init.d/bind9 restart)时,出现以下错误:

  root@ubuntu:/etc/bind# /etc/init.d/bind9 restart
     * Stopping domain name service... bind9                                                                                                       
rndc: error: /etc/bind/rndc.key:5: unknown option 'options'
    rndc: could not load rndc configuration
                                                                                                                             [ OK ]
     * Starting domain name service... bind9                                                                                       [fail] 
    root@ubuntu:

我也遵循了本教程(http://ubuntuforums.org/showthread.php?t=1543750)和命令:tail/var/log/daemon | grep named 用于分析日志,对我不起作用!

这是我的 named.conf 文件:

include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";
include "/etc/bind/named.conf.default-zones";
include "/etc/bind/rndc.key";
key "rndc-key" {
       algorithm hmac-md5;
       secret "2mPij4Zk4JSh0KKUZPPEgA==";
};
controls {
       inet 127.0.0.1 port 953
       allow { 127.0.0.1; } keys { "rndc-key"; };
};

这是我的 rndc.key 文件:

key "rndc-key" {
        algorithm hmac-md5;
        secret "2mPij4Zk4JSh0KKUZPPEgA==";
};
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 "2mPij4Zk4JSh0KKUZPPEgA==";
# };
#
# controls {
#       inet 127.0.0.1 port 953
#       allow { 127.0.0.1; } keys { "rndc-key"; };
# };
# End of named.conf

这是我的区域设置:

$ORIGIN .
$TTL 86400 ; 1 day

danetest.com. IN SOA srv1.danetest.com. hostmaster.danetest.com. (
        2014010307 ; serial
        8H ; refresh
        4H ; retry;
        25W ; expire
        1D ; minimum
)

danetest.com. IN NS srv1.danetest.com.

$ORIGIN danetest.com.

localhost IN A 127.0.0.1

daneverified IN A 192.168.1.101
danebroken   IN A 192.168.1.101

非常感谢您的帮助!!!谢谢你! :)

最佳答案

rndc.key 不应包含 key 以外的任何内容。然后,您可以将其包含在 /etc/bind/rndc.conf 中(对于 rndc)和 /etc/bind/named.conf 或其包含的某处。我在 https://github.com/chicks-net/dns-cache-performance/tree/master/configs/bind 有一个可以执行此操作的工作配置这花了一些时间。那里有一个 Makefile 用于生成 rndc.key,但您必须手动清除“伪造”选项。

关于linux - rndc : error:/etc/bind/rndc. key :5: unknown option 'options' . 。无法加载 rndc 配置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20922880/

相关文章:

python - 在 Windows 上运行 Linux 虚拟机的建议

linux - 类似于/dev/urandom 的东西,带有可配置的种子?

javascript - 如何在访问时添加iframe当前域?

python - pkg_resources.DistributionNotFound : The 'pip==1.5.4' distribution was not found and is required by the application

python - Telnet 服务器 ubuntu - 密码流

ruby-on-rails - rails : FATAL: Password Authentication Failed For User

c++ - perf 输出中的奇怪字符...

php - MySQL : Monitor Queries

c# - .NET:为什么这个域无法解析?

linux - Curl 返回 ststus 6(DNS 名称错误地址错误)