【问题标题】:Syntax and RNDC bind errors on conf [closed]conf上的语法和RNDC绑定错误[关闭]
【发布时间】:2015-10-28 15:07:13
【问题描述】:

我想要做什么:

尝试创建将解析本地地址和公共地址的绑定 DNS 服务。我需要能够解析远程位置的内部本地地址。这些遥控器通过代理访问我们的网络,我正在尝试在该代理服务器上安装绑定服务器。

我正在使用 bind9(根据我的阅读内容),我可以使用视图通过 acl 引导 DNS 请求。

发生了什么:

我有以下配置,它报告了许多语法错误和一个停止 DNS 的 rndc 连接失败错误。

文件:named.conf.local

acl internals {
    x.x.x.x/8; (local)
    192.168.1.0/24;
);

// Custom Zones for SERVER
view "internal" {
    match-clients { internals; };
    zone "SERVER" {
        type master;
            file "/etc/bind/internal/db.SERVER";
    };
};

view "external" {
    match-clients { any: };
    zone "SERVER" {
        type master;
        file "/etc/bind/external/db.SERVER";
    };
};

错误: 来自系统日志

Oct 28 10:29:22 SERVER named[15228]: loading configuration from '/etc/bind/named.conf'
Oct 28 10:29:22 SERVER named[15228]: /etc/bind/named.conf.local:7: missing ';' before '"'
Oct 28 10:29:22 SERVER named[15228]: /etc/bind/named.conf.local:7: missing ';' before '{'
Oct 28 10:29:22 SERVER named[15228]: /etc/bind/named.conf.local:8: missing ';' before '{'
Oct 28 10:29:22 SERVER named[15228]: /etc/bind/named.conf.local:9: missing ';' before '"'
Oct 28 10:29:22 SERVER named[15228]: /etc/bind/named.conf.local:9: missing ';' before '{'
Oct 28 10:29:22 SERVER named[15228]: /etc/bind/named.conf.local:10: missing ';' before 'master'
Oct 28 10:29:22 SERVER named[15228]: /etc/bind/named.conf.local:11: missing ';' before '"'
Oct 28 10:29:22 SERVER named[15228]: /etc/bind/named.conf.local:15: missing ';' before '"'
Oct 28 10:29:22 SERVER named[15228]: /etc/bind/named.conf.local:15: missing ';' before '{'
Oct 28 10:29:22 SERVER named[15228]: /etc/bind/named.conf.local:16: missing ';' before '{'
Oct 28 10:29:22 SERVER named[15228]: /etc/bind/named.conf.local:16: missing ';' before '}'
Oct 28 10:29:22 SERVER named[15228]: /etc/bind/named.conf.local:17: missing ';' before '"'
Oct 28 10:29:22 SERVER named[15228]: /etc/bind/named.conf.local:17: missing ';' before '{'
Oct 28 10:29:22 SERVER named[15228]: /etc/bind/named.conf.local:18: missing ';' before 'master'
Oct 28 10:29:22 SERVER named[15228]: /etc/bind/named.conf.local:19: missing ';' before '"'
Oct 28 10:29:22 SERVER named[15228]: /etc/bind/named.conf:12: missing ';' before '"'
Oct 28 10:29:22 SERVER named[15228]: /etc/bind/named.conf:13: expected IP match list element near end of file
Oct 28 10:29:22 SERVER named[15228]: loading configuration: unexpected token
Oct 28 10:29:22 SERVER named[15228]: exiting (due to fatal error)

我需要知道的:

显然我有什么问题,我只需要知道我在哪里搞砸了。我需要知道语法上是否有问题,或者我没有使用正确的工具来创建绑定服务器。

TL;DR:

鉴于上面的配置文件和错误导致问题的原因是什么?

【问题讨论】:

  • 我猜右括号')'是第4行的语法错误,它应该是右大括号'}'...
  • 这很尴尬。好吧,我想这是一个很好的教训,首先要寻找小东西。请回答,我会选择它,谢谢

标签: linux dns ubuntu-14.04 named bind9


【解决方案1】:

看起来好像右括号')'是第4行的语法错误,它应该是一个右大括号'}'。

当有人发现难以理解此类莫名其妙的语法错误消息的确切原因时,最好开始切断部分输入文件(本例中为配置文件)。通过这种方式,您可以找到引入第一个错误的点,通常这样更容易发现问题。

【讨论】:

  • 赞成调试过程。
猜你喜欢
  • 2014-01-20
  • 2013-07-28
  • 1970-01-01
  • 2015-08-21
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-01-22
  • 2018-12-05
相关资源
最近更新 更多