我想做的是:
尝试创建将解析本地地址和公共地址的绑定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";
};
};错误:来自syslog的
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:
给定配置文件和上面的错误,导致问题的原因是什么?
发布于 2015-10-31 01:37:31
如果结束括号符号')‘是第4行的语法错误,则应该是结束大括号'}’。
当有人发现很难理解这些令人费解的语法错误消息的确切原因时,最好开始切断部分输入文件(在本例中为config文件)。这样,您就可以找到引入第一个错误的点,并且通常这样更容易发现问题。
https://stackoverflow.com/questions/33394662
复制相似问题