[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
> ; Secondary server for ar
> zone ar                 secondary/ar            masters
> ; 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
> 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:

         name: "xelerance.com"
         allow-notify: NOKEY
         request-xfr: AXFR at 5353 NOKEY
 	zonefile: "/var/nsd/sec/xelerance.com.signed"
         notify: NOKEY
         notify: NOKEY
         provide-xfr: NOKEY
 	provide-xfr: NOKEY
 	provide-xfr: NOKEY
 	allow-notify: NOKEY
         provide-xfr: NOKEY
         notify: 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.


More information about the nsd-users mailing list