【问题标题】:rndc: error: /etc/bind/rndc.key:5: unknown option 'options' .. could not load rndc configurationrndc:错误:/etc/bind/rndc.key:5:未知选项“选项”.. 无法加载 rndc 配置
【发布时间】:2014-01-22 06:11:36
【问题描述】:

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

我在 Ubuntu 12.04 上安装了 BIND9。配置了“named.conf.options”、“named.conf.local”和“rndc.key”。但是,当我尝试重新启动绑定时(使用命令:/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

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

【问题讨论】:

    标签: linux dns ubuntu-12.04 bind


    【解决方案1】:

    rndc.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,但您必须手动清除“虚假”选项。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-10-13
      • 1970-01-01
      • 2015-05-03
      • 2017-05-20
      • 2014-09-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多