On Tue, 24 Dec 2019 12:11:10 +0100 Anand Buddhdev <anandb at ripe.net> wrote:> > I'm looking at NSD now and I think I can use NSD the same way I use > > tinydns. The only difference is the "one file contains it all" > > system, but that's rather easy to script. Just rsync the zone files > > and send a HUP to the supervisor. If a nameserver is not reachable > > it it will autmagically synchronise. > > > > Are there good reasons *not* to use nsd this way? This will not be a > > 1000000 queries per second system BTW. > > This is a perfectly reasonable way to use NSD. In fact, it is somewhat > better than using zone transfers between one NSD master and some > slaves, because NSD is only able to provide a full AXFR, but not an > incremental IXFR. So rsyncing the zones is probably the most > efficient. As a side effect, you don't need to arrange for NOTIFY > between the servers, nor any kind of XFR ACLs or TSIG keys.Ok, thnx. I'm busy now to "sed" the tinydns format to nsd format. Is there somehow a way to tell nsd to use 1 file for all zones? NSD will only read these files when it receives a HUP or a restart and converts it to a db format. Now I need to add a domain in two places: 1) the zone file itself and 2) an include in the config file containing: zone: name: "example1.com" zonefile: "com/example1/zone" zone: name: "example2.com" zonefile: "com/example2/zone" That needs more scripting and I'm lazy ;-) R. -- richard lucassen http://contact.xaq.nl/
On 24/12/2019 14:01, richard lucassen via nsd-users wrote:> Ok, thnx. I'm busy now to "sed" the tinydns format to nsd format. Is > there somehow a way to tell nsd to use 1 file for all zones? NSD willNo. NSD is more traditional, so it needs a separate file per zone.> only read these files when it receives a HUP or a restart and converts > it to a db format. Now I need to add a domain in two places: 1) theThe DB format is optional, and in fact, not recommended these days. Just set: database: "" in your nsd.conf, and NSD will not build a database file. It will just read zones into memory and serve from there.> zone file itself and 2) an include in the config file containing: > > zone: > name: "example1.com" > zonefile: "com/example1/zone" > zone: > name: "example2.com" > zonefile: "com/example2/zone" > > That needs more scripting and I'm lazy ;-)Yeah, but you just need to do this once, right? If you're going to be adding and removing zones on the fly, you can do that with NSD. You can either add/remove zones in the nsd.conf file, and reload NSD, or use "addzone" and "delzone" with nsd-control. Regards, Anand