0

What I'm trying to do:

Trying to create a bind DNS service that will resolve local addresses as well as public addresses. I need to be able to resolve internal local addresses for remote locations. These remotes hit our network through a proxy, and I'm trying to install the bind server on that proxy server.

I'm using bind9 which (according to what I've read) will let me use views to direct DNS requests through an acl.

What's happening:

I have the following config which is reporting a number of syntax errors and a rndc connect failed error that stops the DNS.

file: 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";
    };
};

errors: from 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)

What I need to know:

Obviously I have something wrong, and I just need to know where I messed up. I need to know if there is something wrong syntactically or if I am not using the right tools to create a bind server.

TL;DR:

Given the config file and errors above what is causing the problem?

mtrueblood
  • 414
  • 2
  • 11
  • 28
  • I'd guess the closing parenthesis sign ')' is a syntax error on line #4, it should be a closing brace '}'... – Laszlo Valko Oct 31 '15 at 01:25
  • That's embarrassing. Well I guess it's a good lesson in looking for the small stuff first. Please answer and I'll select it, thank you – mtrueblood Oct 31 '15 at 01:30

1 Answers1

2

It looks as if the closing parenthesis sign ')' is a syntax error on line #4, it should be a closing brace '}'.

When someone finds it difficult to realize the exact reason of some inexplicable syntax error messages like these, it is a good practice to start cutting off parts of the input file (config file in this case). That way you can find the point where the first errors get introduced, and usually it is easier to spot the problem that way.

Laszlo Valko
  • 2,683
  • 25
  • 29