From 714fd1c46755d0945d4ecd1aeaada49221046599 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sun, 20 Feb 2005 11:11:03 +0000 Subject: [PATCH] Implemented ZONE_OPTIONS and released as 3.0. --- NEWS | 7 +++++++ README | 26 +++++++++++++++++--------- cf.dist/domains | 11 +++++++++++ m4/mkconf.m4 | 10 +++++++++- nsc.lsm | 8 ++++---- 5 files changed, 48 insertions(+), 14 deletions(-) diff --git a/NEWS b/NEWS index d44ca55..25d8eb0 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,10 @@ +Version 3.0 [20-02-2005] + + One year of testing should be good enough, so releasing 2.99b as 3.0 + with almost no changes. The only one is: + + o ZONE_OPTIONS macro added, allowing to add custom options to zones. + Version 2.99b [21-12-2003] This version has been almost rewritten from scratch. The syntax diff --git a/README b/README index 09d1781..89496f9 100644 --- a/README +++ b/README @@ -1,15 +1,15 @@ - Domain Name Server Configuration Utilities -- NSC 2.99b + Domain Name Server Configuration Utilities -- NSC 3.0 - (c) 1997--2003 Martin Mares + (c) 1997--2005 Martin Mares ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ------------------------------------------------------------------------------------ -WARNING: This is a prerelease of the NSC 3.0. See NEWS for the list of changes. -Most importantly, the configuration files are NOT compatible with the old releases. -Also, it hasn't undergone much extensive testing yet, so there might be bugs around. +WARNING: NSC has undergone significant changes between versions 2.3 and 2.99b. +See NEWS for the summary of changes. Most importantly, the configuration files are +NOT compatible with the old releases. ------------------------------------------------------------------------------------ @@ -136,9 +136,19 @@ REVERSE(network, primary-files...) You can also use the REV macro explicitly, which can be handy for example in SECONDARY declarations. -CONFIG(...) - insert user data to named.conf +ZONE_OPTIONS(`options; + more options; +') + Define options to be inserted to all subsequent zone declarations + until the next ZONE_OPTIONS command. Please keep in mind that the + semicolon character act as M4 comment, so you need to put the + closing quote at a separate line. See our example cf/domains. -MAKEFILE(...) - insert user data to Makefile +CONFIG(...) + Insert user data to named.conf, again beware of semicolons. + +MAKEFILE(...) + Insert user data to Makefile. 3. The Domain Files @@ -437,5 +447,3 @@ chkdel A simple Perl script for checking of domain delegations -- it checks all PRIMARY and SECONDARY records in cf/domains against NS records. Requires the Net::DNS module and also some tweaking of parameters at the top of the script. - - LocalWords: MINTTL NSNAME hostname MAINTNAME diff --git a/cf.dist/domains b/cf.dist/domains index 0269251..f222df9 100644 --- a/cf.dist/domains +++ b/cf.dist/domains @@ -15,6 +15,17 @@ PRIMARY(example.com) PRIMARY(a.example.com) SECONDARY(b.example.com, 10.0.0.1) +; Yet another subdomain residing on another server, but this time with +; access restricted to the internal network. The closing quote after the +; options has to be on a separate line, because semicolon is a comment character. + +ZONE_OPTIONS(`allow-query { 127.0.0.0/8; 10.0.0.0/8; }; + allow-recursion { 127.0.0.0/8; 10.0.0.0/8; }; + allow-transfer { 127.0.0.0/8; 10.0.0.0/8; }; +') +SECONDARY(priv.example.com, 10.10.10.1) +ZONE_OPTIONS() + ; Here are reverse delegations for two networks. NSC automatically creates ; the PTR records from A records in all mentioned zones. See cf/{0,1}.0.10. diff --git a/m4/mkconf.m4 b/m4/mkconf.m4 index dff58a6..131424f 100644 --- a/m4/mkconf.m4 +++ b/m4/mkconf.m4 @@ -1,6 +1,6 @@ dnl ### dnl ### NSC -- BIND Config File Builder -dnl ### (c) 1997--2003 Martin Mares +dnl ### (c) 1997--2005 Martin Mares dnl ### include(m4/dnslib.m4) @@ -9,6 +9,7 @@ include(m4/dnslib.m4) define(`DO_PRIMARY', `divert(0)zone "$1" in { type master; file "ZONEDIR/nsc_file_name($2)"; +ZZ_OPTIONS()dnl }; divert(-1)') @@ -22,6 +23,7 @@ define(`SECONDARY', `divert(0)zone "$1" in { type slave; file "BAKDIR/nsc_file_name($1)"; masters { $2; }; +ZZ_OPTIONS()dnl }; divert(-1)') @@ -43,6 +45,12 @@ divert(-1)') define(`CONFIG', `divert(0)$1 divert(-1)') +# Setting domain options + +define(`ZZ_OPTIONS', `') + +define(`ZONE_OPTIONS', `define(`ZZ_OPTIONS', ifelse(`$1',`',`',`` $1''))') + # The preamble divert(0)dnl diff --git a/nsc.lsm b/nsc.lsm index a7f58e3..613f94c 100644 --- a/nsc.lsm +++ b/nsc.lsm @@ -1,14 +1,14 @@ Begin3 Title: Name Server Configurator -Version: 2.99b -Entered-date: 031221 +Version: 3.0 +Entered-date: 050220 Description: Set of utilities and M4 scripts for easy maintenance of DNS zone files and also automatic generation of BIND 8/9 configuration files. Requires GNU m4 and a Posix-compatible shell. Keywords: named, bind, dns Author: mj@ucw.cz (Martin Mares) Maintained-by: mj@ucw.cz (Martin Mares) -Primary-site: atrey.karlin.mff.cuni.cz pub/local/mj/net/nsc-2.99b.tar.gz -Alternate-site: metalab.unc.edu pub/Linux/system/network/management/nsc-2.99b.tar.gz +Primary-site: atrey.karlin.mff.cuni.cz pub/local/mj/net/nsc-3.0.tar.gz +Alternate-site: metalab.unc.edu pub/Linux/system/network/management/nsc-3.0.tar.gz Copying-policy: GPL End -- 2.39.2