[nsd-users] syntax problems

Paul Wouters paul at xelerance.com
Sat Oct 17 17:38:22 UTC 2009


On Sat, 17 Oct 2009, Bobby Wilson wrote:

> I am new to nsd, someone recommended it to me. It seems simple enough,
> but, I keep getting syntax errors. I have scoured the web and the
> mailing list and can't figure out what I am doing wrong or what the
> proper .zone file syntax is. I have found a couple of articles on nsd
> but they seem to be either out of date or leading me down the wrong
> path. With examples like this:
>
> ; Syntax for nsd.zones<nobr> <wbr></nobr>;zone <domain>
> <zone-filename> <masters-notify IP Address(es)>
> ; Primary server for mx
> zone mx                 primary/mx              notify  201.14.4.240
> ; Secondary server for ar
> zone ar                 secondary/ar            masters 210.4.10.50
> ; Sample name server for your domain
> zone yourdomain.com     yourdomain.com
>
> That seem to produce a syntax error on all lines that aren't comments.
> All I am looking for is a simple explanation or template as to how to
> create these files. I am runnning freebsd 7.2 and NSD version 3.2.3.
> The only non-syntax-error producing configuration I have got to work
> is this:
>
> zone a 192.168.1.1
>
> Then it says I don't have an soa record present. So not sure where to
> go from here.

An example from our nsd.conf. Note that this appears after the server:
section.

zone:
         name: "xelerance.com"
         allow-notify: 206.248.173.92 NOKEY
         request-xfr: AXFR 206.248.173.92 at 5353 NOKEY
 	zonefile: "/var/nsd/sec/xelerance.com.signed"
         notify: 209.237.247.134 NOKEY
         notify: 209.237.247.134 NOKEY
         provide-xfr: 193.110.157.24 NOKEY
 	provide-xfr: 209.237.247.134 NOKEY
 	provide-xfr: 193.110.157.136 NOKEY
 	allow-notify: 127.0.0.1 NOKEY
         provide-xfr: 64.86.69.71 NOKEY
         notify: 64.86.69.71 NOKEY

In fact what we do is have the nsd.conf server: section, and then just
have one line added to the end:

include: "/etc/nsd/nsd.zones"

and we put all my zones in there. Then we modify the nsd.zones file using
the git version control system, and the git hooks then propagate these
files and rebuild/reload the nsd's.

Paul



More information about the nsd-users mailing list