xref: /openbsd-src/usr.sbin/nsd/doc/README (revision bf87c3c07c3ad89262e2b8cae09f17e70aa9e1ee)
182c0aec4Sflorian1.0 Introduction
282c0aec4Sflorian1.1 ... Basic theory of operation
382c0aec4Sflorian1.2 ... Quick build & install
482c0aec4Sflorian2.0 Building nsd
582c0aec4Sflorian2.1 ... Unpacking the source
682c0aec4Sflorian2.2 ... Configuring NSD
782c0aec4Sflorian2.3 ... Building
882c0aec4Sflorian2.4 ... Installing
982c0aec4Sflorian3.0 Running NSD
1082c0aec4Sflorian3.1 ... Logging
1182c0aec4Sflorian3.2 ... AXFR access
1282c0aec4Sflorian3.3 ... Using TSIG
1382c0aec4Sflorian3.4 ... Zone expiry of secondary zones
1482c0aec4Sflorian3.5 ... Diagnosing NSD log entries
1582c0aec4Sflorian3.6 ... Interfaces
1682c0aec4Sflorian3.7 ... Tuning
173f21e8ccSflorian3.8 ... Zone verification
1882c0aec4Sflorian4.0 Support and Feedback
1982c0aec4Sflorian4.1 ... Your Support
2082c0aec4Sflorian
2182c0aec4Sflorian
2282c0aec4Sflorian1.0 Introduction
2382c0aec4Sflorian
24*bf87c3c0SflorianThis is NSD Name Server Daemon (NSD) version 4.9.1.
2582c0aec4Sflorian
2682c0aec4SflorianThe NLnet Labs Name Server Daemon (NSD) is an authoritative RFC compliant
2782c0aec4SflorianDNS nameserver. It was first conceived to allow for more genetic
2882c0aec4Sfloriandiversity for DNS server implementations used by the root-server system
2982c0aec4Sflorianand it has been developed for operations in environments where speed,
3082c0aec4Sflorianreliability, stability, and security are of high importance. NSD is
3182c0aec4Sfloriancurrently used on root servers such as k.root-servers.net and is also in
3282c0aec4Sflorianuse by several top-level domain registries.
3382c0aec4Sflorian
3482c0aec4SflorianNSD is a complete implementation of an authoritative DNS name server.
3582c0aec4SflorianFor further information about what NSD is and what NSD is not please
3682c0aec4Sflorianconsult the REQUIREMENTS document which is a part of this distribution.
3782c0aec4Sflorian
3882c0aec4SflorianIf you are a BIND user (the named daemon) consult NSD_FOR_BIND_USERS.
3982c0aec4Sflorian
4082c0aec4SflorianThe source code is available for download from:
4182c0aec4Sflorian
4282c0aec4Sflorian         http://www.nlnetlabs.nl/downloads
4382c0aec4Sflorian
4482c0aec4Sflorian
4582c0aec4Sflorian1.1 Basic Theory of Operation
4682c0aec4Sflorian
4782c0aec4SflorianNSD consists of two programs: the zone compiler 'zonec' and the name
4882c0aec4Sflorianserver 'nsd' itself. The name server works with an intermediate
4982c0aec4Sfloriandatabase prepared by the zone compiler from standard zone files.
5082c0aec4Sflorian
5182c0aec4SflorianFor NSD operation this means that zones have to be compiled by zonec
5282c0aec4Sflorianbefore NSD can use them.
5382c0aec4Sflorian
5482c0aec4SflorianAll this can be controlled via rc.d (SIGTERM, SIGHUP) or nsd-control,
5582c0aec4Sflorianand uses a simple configuration file 'nsd.conf'.
5682c0aec4Sflorian
5782c0aec4Sflorian
5882c0aec4Sflorian1.2 Quick build and install
5982c0aec4Sflorian
60*bf87c3c0SflorianStep 1: Unpack the source with gtar -xzvf nsd-4.9.1.tar.gz
6182c0aec4Sflorian
6282c0aec4SflorianStep 2: Create user nsd or any other unprivileged user of your
6382c0aec4Sflorian        choice. In case of later make sure to use
6482c0aec4Sflorian        --with-user=<username> while running configure.
6582c0aec4Sflorian	You can also set "username: <name>" in the nsd.conf file later.
6682c0aec4Sflorian	Install openssl and libevent.
6782c0aec4Sflorian
6882c0aec4SflorianStep 3: ./configure
6982c0aec4Sflorian
7082c0aec4SflorianStep 4: make all	(or simply 'make').
7182c0aec4Sflorian
7282c0aec4SflorianStep 5: make install
7382c0aec4Sflorian
7482c0aec4SflorianStep 6: Create and edit /etc/nsd/nsd.conf file possibly from
7582c0aec4Sflorian        nsd.conf.sample template that comes with the distribution.
7682c0aec4Sflorian	(installed by default at /etc/nsd/nsd.conf.sample)
7782c0aec4Sflorian	Here you need to configure the zones you want to serve.
7882c0aec4Sflorian	TSIG keys used for secure zone transfers must be included.
7982c0aec4Sflorian	Also server parameters can be set, see nsd.conf(5) man page.
8082c0aec4Sflorian
8182c0aec4Sflorian	If you have a NSD 2 nsd.zones config file take a look at the
8282c0aec4Sflorian	python script contrib/nsd.zones2nsd.conf, it will convert
8382c0aec4Sflorian	zone and TSIG key settings for you.
8482c0aec4Sflorian
8582c0aec4SflorianStep 7: Copy necessary master zone files into appropriate directories
8682c0aec4Sflorian        under /etc/nsd/primary & /etc/nsd/secondary.
8782c0aec4Sflorian
8882c0aec4SflorianStep 8: Run nsd-control start
8982c0aec4Sflorian
9082c0aec4SflorianStep 9: Test the NSD with dig, drill or host.
9182c0aec4Sflorian
9282c0aec4SflorianStep 10: If you're happy add a rc.d script to start into your OS boot up
9382c0aec4Sflorian	 sequence. The format of the rc.d startup script depends on
9482c0aec4Sflorian	 the platform.  Also stop it in the shutdown sequence.
9582c0aec4Sflorian	 You can use SIGTERM to stop, or nsd-control stop.
9682c0aec4Sflorian
9782c0aec4SflorianStep 11: If desired add 'nsd-control write' to your superuser crontab to
9882c0aec4Sflorian         update the zone files with the content transferred from master
9982c0aec4Sflorian	 servers periodically, such as once per day.
10082c0aec4Sflorian
10182c0aec4Sflorian         Got any problems or questions with the steps above? Read the
10282c0aec4Sflorian         rest of this file.
10382c0aec4Sflorian
10482c0aec4Sflorian
10582c0aec4Sflorian
10682c0aec4Sflorian2.0 Building NSD
10782c0aec4Sflorian
10882c0aec4Sflorian
10982c0aec4Sflorian2.1 Unpacking the source
11082c0aec4Sflorian
11182c0aec4SflorianUse your favorite combination of tar and gnu zip to unpack the source,
11282c0aec4Sflorianfor example
11382c0aec4Sflorian
114*bf87c3c0Sflorian$ gtar -xzvf nsd-4.9.1.tar.gz
11582c0aec4Sflorian
116*bf87c3c0Sflorianwill unpack the source into the ./nsd-4.9.1 directory...
11782c0aec4Sflorian
11882c0aec4Sflorian
11982c0aec4Sflorian2.2 Configuring NSD
12082c0aec4Sflorian
12182c0aec4SflorianNSD can be configured using GNU autoconf's configure script. In
12282c0aec4Sflorianaddition to standard configure options, one may use the following:
12382c0aec4Sflorian
12482c0aec4Sflorian  CC=compiler
12582c0aec4Sflorian
12682c0aec4Sflorian        Specify the C compiler.  The default is gcc or cc.  The
12782c0aec4Sflorian        compiler must support ANSI C89.
12882c0aec4Sflorian
12982c0aec4Sflorian  CPPFLAGS=flags
13082c0aec4Sflorian
13182c0aec4Sflorian        Specify the C preprocessor flags.  Such as -I<includedir>.
13282c0aec4Sflorian
13382c0aec4Sflorian  CFLAGS=flags
13482c0aec4Sflorian
13582c0aec4Sflorian        Specify the C compiler flags.  These include code generation,
13682c0aec4Sflorian        optimization, warning, and debugging flags.  These flags are
13782c0aec4Sflorian        also passed to the linker.
13882c0aec4Sflorian
13982c0aec4Sflorian        The default for gcc is "-g -O2".
14082c0aec4Sflorian
14182c0aec4Sflorian  LD=linker
14282c0aec4Sflorian
14382c0aec4Sflorian        Specify the linker (defaults to the C compiler).
14482c0aec4Sflorian
14582c0aec4Sflorian  LDFLAGS=flags
14682c0aec4Sflorian
14782c0aec4Sflorian        Specify linker flags.
14882c0aec4Sflorian
14982c0aec4Sflorian  LIBS=libs
15082c0aec4Sflorian
15182c0aec4Sflorian        Specify additional libraries to link with.
15282c0aec4Sflorian
15382c0aec4Sflorian  --enable-root-server
15482c0aec4Sflorian
15582c0aec4Sflorian        Configure NSD as a root server. Unless this option is
15682c0aec4Sflorian        specified, NSD will refuse to serve the ``.'' zone as a
15782c0aec4Sflorian        misconfiguration safeguard.
15882c0aec4Sflorian
15982c0aec4Sflorian  --disable-ipv6
16082c0aec4Sflorian
16182c0aec4Sflorian        Disables IPv6 support in NSD.
16282c0aec4Sflorian
16382c0aec4Sflorian  --enable-checking
16482c0aec4Sflorian
16582c0aec4Sflorian        Enable some internal development checks.  Useful if you want
16682c0aec4Sflorian        to modify NSD.  This option enables the standard C "assert" macro
16782c0aec4Sflorian	and compiler warnings.
16882c0aec4Sflorian
16982c0aec4Sflorian	This will instruct NSD to be stricter when validating its input.
17082c0aec4Sflorian	This could lead to a reduced service level.
17182c0aec4Sflorian
17282c0aec4Sflorian  --enable-bind8-stats
17382c0aec4Sflorian
17482c0aec4Sflorian        Enables BIND8-like statistics.
17582c0aec4Sflorian
17682c0aec4Sflorian  --enable-ratelimit
17782c0aec4Sflorian
17882c0aec4Sflorian	Enables ratelimiting, based on query name, type and source.
17982c0aec4Sflorian
18082c0aec4Sflorian   --enable-draft-rrtypes
18182c0aec4Sflorian
18282c0aec4Sflorian	Enables draft RRtypes.
18382c0aec4Sflorian
18482c0aec4Sflorian  --with-configdir=dir
18582c0aec4Sflorian
18682c0aec4Sflorian        Specified, NSD configuration directory, default /etc/nsd
18782c0aec4Sflorian
18882c0aec4Sflorian  --with-nsd_conf_file=path
18982c0aec4Sflorian
19082c0aec4Sflorian	Pathname to the NSD configuration file, default /etc/nsd/nsd.conf
19182c0aec4Sflorian
19282c0aec4Sflorian  --with-pidfile=path
19382c0aec4Sflorian
19482c0aec4Sflorian        Pathname to the NSD pidfile, default is platform specific,
19582c0aec4Sflorian        mostly /var/run/nsd.pid
19682c0aec4Sflorian
19782c0aec4Sflorian  --with-zonesdir=dir
19882c0aec4Sflorian
19982c0aec4Sflorian        NSD default location for master zone files, default /etc/nsd/
20082c0aec4Sflorian
20182c0aec4Sflorian  --with-user=username
20282c0aec4Sflorian
20382c0aec4Sflorian        User name or ID to answer the queries with, default is nsd
20482c0aec4Sflorian
20582c0aec4Sflorian  --with-facility=facility
20682c0aec4Sflorian
20782c0aec4Sflorian        Specify the syslog facility to use.  The default is
20882c0aec4Sflorian        LOG_DAEMON.  See the syslog(3) manual page for the available
20982c0aec4Sflorian        facilities.
21082c0aec4Sflorian
21182c0aec4Sflorian  --with-libevent=path
21282c0aec4Sflorian
21382c0aec4Sflorian  	Specity the location of the libevent library (or libev).
21482c0aec4Sflorian	--with-libevent=no uses a builtin portable implementation (select()).
21582c0aec4Sflorian
21682c0aec4Sflorian  --with-ssl=path
21782c0aec4Sflorian
21882c0aec4Sflorian        Specify the location of the OpenSSL libraries.  OpenSSL 0.9.7
21982c0aec4Sflorian        or higher is required for TSIG support.
22082c0aec4Sflorian
22182c0aec4Sflorian  --with-start_priority=number
22282c0aec4Sflorian
22382c0aec4Sflorian	Startup priority for NSD.
22482c0aec4Sflorian
22582c0aec4Sflorian  --with-kill_priority=number
22682c0aec4Sflorian
22782c0aec4Sflorian	Shutdown priority for NSD.
22882c0aec4Sflorian
22982c0aec4Sflorian  --with-tcp-timeout=number
23082c0aec4Sflorian
23182c0aec4Sflorian	Set the default TCP timeout (in seconds). Default 120 seconds.
23282c0aec4Sflorian
23382c0aec4Sflorian  --disable-nsec3
23482c0aec4Sflorian
23582c0aec4Sflorian  	Disable NSEC3 support. With NSEC3 support enabled, very large zones,
23682c0aec4Sflorian	also non-nsec3 zones, use about 20% more memory.
23782c0aec4Sflorian
23882c0aec4Sflorian  --disable-minimal-responses
23982c0aec4Sflorian
24082c0aec4Sflorian  	Disable minimal responses. If disabled, responses are more likely
24182c0aec4Sflorian	to get truncated, resulting in TCP fallback.  When enabled (by default)
24282c0aec4Sflorian	NSD will leave out RRsets to make responses fit inside one datagram,
24382c0aec4Sflorian	but for shorter responses the full normal response is carried.
24482c0aec4Sflorian
24582c0aec4Sflorian  --disable-largefile
24682c0aec4Sflorian
24782c0aec4Sflorian	Disable large file support (64 bit file lengths). Makes off_t
24882c0aec4Sflorian	a 32bit length during compilation.
24982c0aec4Sflorian
25082c0aec4Sflorian
25182c0aec4Sflorian2.3 Building
25282c0aec4Sflorian
25382c0aec4SflorianUse ``make'' to create NSD and support tools.  If you get errors, try to
25482c0aec4Sflorianuse ``gmake'' (gnu version of make), especially on old systems. If so,
25582c0aec4Sfloriando a `gmake realclean` first, to remove stuff that the make call messed up.
25682c0aec4Sflorian
25782c0aec4Sflorian
25882c0aec4Sflorian2.4 Installing
25982c0aec4Sflorian
26082c0aec4SflorianBecome a superuser (if necessary) and type ``make install''
26182c0aec4Sflorian
26282c0aec4SflorianThis step should install four binaries
26382c0aec4Sflorian
26482c0aec4Sfloriannsd               - the daemon itself
26582c0aec4Sfloriannsd-control-setup - a shell script that creates keys for nsd-control.
26682c0aec4Sfloriannsd-control	      - program that connects over SSL to nsd and gives commands.
26782c0aec4Sfloriannsd-checkconf	  - simple C program to check nsd.conf before use.
26882c0aec4Sflorian
26982c0aec4SflorianPlus the manual pages and a sample configuration file.
27082c0aec4Sflorian
27182c0aec4Sflorian
27282c0aec4Sflorian3.0 Running NSD
27382c0aec4Sflorian
27482c0aec4SflorianBefore running NSD you need to create a configuration file for it.
27582c0aec4SflorianThe config file contains server settings, secret keys and zone settings.
27682c0aec4Sflorian
27782c0aec4SflorianThe server settings start with a line with the keyword 'server:'.
27882c0aec4SflorianIn the server settings set 'database: <file>' with the filename of the name
27982c0aec4Sfloriandatabase that NSD will use. Set 'chroot: <dir>' to run nsd in a chroot-jail.
28082c0aec4SflorianMake sure the zone files, database file, xfrdfile, difffile and pidfile
28182c0aec4Sfloriancan be accessed from the chroot-jail.  Set 'username: <user>' to an
28282c0aec4Sflorianunprivileged user, for security.
28382c0aec4Sflorian
28482c0aec4SflorianFor example:
28582c0aec4Sflorian	# This is a sample configuration
28682c0aec4Sflorian	server:
28782c0aec4Sflorian		database: "/etc/nsd/nsd.db"
28882c0aec4Sflorian		pidfile: "/etc/nsd/nsd.pid"
28982c0aec4Sflorian		chroot: "/etc/nsd/"
29082c0aec4Sflorian		username: nsd
29182c0aec4Sflorian
29282c0aec4SflorianAfter the global server settings to need to make entries for the
29382c0aec4Sflorianzones that you wish to serve. For each zone you need to list the zone
29482c0aec4Sflorianname, the file name with the zone contents, and access control lists.
29582c0aec4Sflorian
29682c0aec4Sflorian	zone:
29782c0aec4Sflorian		name:	"example.com"
29882c0aec4Sflorian		zonefile: "example.com.zone"
29982c0aec4Sflorian
30082c0aec4SflorianThe zonefile needs to be filled with the correct zone information
30182c0aec4Sflorianfor master zones. For secondary zones an empty file will suffice,
30282c0aec4Sfloriana zone transfer will be initiated to obtain the slave zone contents.
30382c0aec4Sflorian
30482c0aec4SflorianAccess control lists are needed for zone transfer and notifications.
30582c0aec4Sflorian
30682c0aec4SflorianFor a slave zone list the masters, by IP address. Below is an example
30782c0aec4Sflorianof a slave zone with two master servers. If a master only supports AXFR
30882c0aec4Sfloriantransfers and not IXFR transfers (like NSD), specify the master as
30982c0aec4Sflorian"request-xfr: AXFR <ip_address> <key>". By default, all zone transfer requests
31082c0aec4Sflorianare made over TCP. If you want the IXFR request be transmitted over UDP, use
31182c0aec4Sflorian"request-xfr: UDP <ip address> <key>".
31282c0aec4Sflorian
31382c0aec4Sflorian	zone:
31482c0aec4Sflorian		name: "example.com"
31582c0aec4Sflorian		zonefile: "example.com.zone"
31682c0aec4Sflorian		allow-notify: 168.192.185.33 NOKEY
31782c0aec4Sflorian		request-xfr: 168.192.185.33 NOKEY
31882c0aec4Sflorian		allow-notify: 168.192.199.2 NOKEY
31982c0aec4Sflorian		request-xfr: 168.192.199.2 NOKEY
32082c0aec4Sflorian
32182c0aec4SflorianBy default, a slave will fallback to AXFR requests if the master told us it does
32282c0aec4Sfloriannot support IXFR. You can configure the slave not to do AXFR fallback with:
32382c0aec4Sflorian
32482c0aec4Sflorian		allow-axfr-fallback: "no"
32582c0aec4Sflorian
32682c0aec4SflorianFor a master zone, list the slave servers, by IP address or subnet.
32782c0aec4SflorianBelow is an example of a master zone with two slave servers.
32882c0aec4Sflorian
32982c0aec4Sflorian	zone:
33082c0aec4Sflorian		name: "example.com"
33182c0aec4Sflorian		zonefile: "example.com.zone"
33282c0aec4Sflorian		notify: 168.192.133.75 NOKEY
33382c0aec4Sflorian		provide-xfr: 168.192.133.75 NOKEY
33482c0aec4Sflorian		notify: 168.192.5.44 NOKEY
33582c0aec4Sflorian		provide-xfr: 168.192.5.44 NOKEY
33682c0aec4Sflorian
33782c0aec4SflorianYou also can set the outgoing interface for notifies and zone transfer requests
33882c0aec4Sflorianto satisfy access control lists at the other end:
33982c0aec4Sflorian
34082c0aec4Sflorian		outgoing-interface: 168.192.5.69
34182c0aec4Sflorian
34282c0aec4SflorianBy default, NSD will retry a notify up to 5 times. You can override that
34382c0aec4Sflorianvalue with:
34482c0aec4Sflorian
34582c0aec4Sflorian		notify-retry: 5
34682c0aec4Sflorian
34782c0aec4SflorianZone transfers can be secured with TSIG keys, replace NOKEY with
34882c0aec4Sflorianthe name of the tsig key to use. See section 3.3.
34982c0aec4Sflorian
35082c0aec4SflorianSince NSD is written to be run on the root name servers, the config file
35182c0aec4Sfloriancan to contain something like:
35282c0aec4Sflorian
35382c0aec4Sflorian	zone:
35482c0aec4Sflorian		name: "."
35582c0aec4Sflorian		zonefile: "root.zone"
35682c0aec4Sflorian		provide-xfr: 0.0.0.0/0 NOKEY # allow axfr for everyone.
35782c0aec4Sflorian		provide-xfr: ::0/0 NOKEY
35882c0aec4Sflorian
35982c0aec4SflorianYou should only do that if you're intending to run a root server, NSD
36082c0aec4Sflorianis not suited for running a . cache. Therefore if you choose to serve
36182c0aec4Sflorianthe .  zone you have to make sure that the complete root zone is
36282c0aec4Sfloriantimely and fully updated.
36382c0aec4Sflorian
36482c0aec4SflorianTo prevent misconfiguration, NSD configure has the --enable-root-server
36582c0aec4Sflorianswitch, that is by default disabled.
36682c0aec4Sflorian
36782c0aec4SflorianIn the config file, you can use patterns.  A pattern can have the
36882c0aec4Sfloriansame configuration statements that a zone can have.  And then you can
36982c0aec4Sflorianinclude-pattern: <name-of-pattern> in a zone (or in another pattern)
37082c0aec4Sflorianto apply those settings.  This can be used to organise the settings.
37182c0aec4Sflorian
37282c0aec4SflorianThe nsd-control tool is also controlled from the nsd.conf config file.
37382c0aec4SflorianIt uses SSL encrypted transport to 127.0.0.1, and if you want to use it
37482c0aec4Sflorianyou have to setup the keys and also edit the config file.  You can leave
37582c0aec4Sflorianthe remote-control disabled (the secure default), or opt to turn it on:
37682c0aec4Sflorian
37782c0aec4Sflorian	# generate keys
37882c0aec4Sflorian	nsd-control-setup
37982c0aec4Sflorian
38082c0aec4Sflorian	# edit nsd.conf to add this
38182c0aec4Sflorian	remote-control:
38282c0aec4Sflorian		control-enable: yes
38382c0aec4Sflorian
38482c0aec4SflorianBy default nsd-control is limited to localhost, as well as encrypted, but
38582c0aec4Sfloriansome people may want to remotely administer their nameserver.  What you
38682c0aec4Sflorianthen do is setup nsd-control to listen to the public IP address, with
38782c0aec4Sfloriancontrol-interface: <IP> after the control-enable statement.  Furthermore,
38882c0aec4Sflorianyou copy the key files /etc/nsd/nsd_server.pem /etc/nsd/nsd_control.*
38982c0aec4Sflorianto a remote host on the internet; on that host you can run nsd-control
39082c0aec4Sflorianwith -c <special config file> which references same IP address
39182c0aec4Sfloriancontrol-interface and references the copies of the key files with
39282c0aec4Sflorianserver-cert-file, control-key-file and control-cert-file config lines
39382c0aec4Sflorianafter the control-enable statement.  The nsd-server authenticates the
39482c0aec4Sfloriannsd-control client, and also the nsd-control client authenticates the
39582c0aec4Sfloriannsd-server.
39682c0aec4Sflorian
39782c0aec4SflorianWhen you are done with the configuration file, check the syntax using
39882c0aec4Sflorian
39982c0aec4Sflorian	nsd-checkconf <name of configfile>
40082c0aec4Sflorian
40182c0aec4SflorianThe zone files are read by the daemon, which builds 'nsd.db' with their
40282c0aec4Sfloriancontents.  You can start the daemon with
40382c0aec4Sflorian
40482c0aec4Sflorian	nsd
40582c0aec4Sflorian	or with "nsd-control start" (which execs nsd again).
40682c0aec4Sflorian	or with nsd -c <name of configfile>
40782c0aec4Sflorian
40882c0aec4SflorianTo check if the daemon is running look with ps, top, or if you enabled
40982c0aec4Sfloriannsd-control,
41082c0aec4Sflorian
41182c0aec4Sflorian	nsd-control status
41282c0aec4Sflorian
41382c0aec4SflorianTo reload changed zone files after you edited them, without stopping
41482c0aec4Sflorianthe daemon, use this to check if files are modified:
41582c0aec4Sflorian
41682c0aec4Sflorian	kill -HUP `cat <name of nsd pidfile>`
41782c0aec4Sflorian
41882c0aec4SflorianIf you enabled nsd-control, you can reread with
41982c0aec4Sflorian
42082c0aec4Sflorian	nsd-control reload
42182c0aec4Sflorian
42282c0aec4SflorianWith nsd-control you can also reread the config file (new zones, ..)
42382c0aec4Sflorian
42482c0aec4Sflorian	nsd-control reconfig
42582c0aec4Sflorian
42682c0aec4SflorianTo restart the daemon
42782c0aec4Sflorian
42882c0aec4Sflorian	/etc/rc.d/nsd restart  # or your system(d) equivalent
42982c0aec4Sflorian
43082c0aec4SflorianTo shut it down (for example on the system shutdown) do
43182c0aec4Sflorian
43282c0aec4Sflorian	kill -TERM <pid of nsd>
43382c0aec4Sflorian	or nsd-control stop
43482c0aec4Sflorian
43582c0aec4SflorianNSD will automatically keep track of secondary zones and update them
43682c0aec4Sflorianwhen needed. When primary zones are updated and reloaded notifications
43782c0aec4Sflorianare sent to slave servers.
43882c0aec4Sflorian
43982c0aec4SflorianThe zone transfers are applied to nsd.db by the daemon.  To write changed
44082c0aec4Sfloriancontents of the zone files for slave zones to disk in the text-based zone
44182c0aec4Sflorianfile format, issue nsd-control write.
44282c0aec4Sflorian
44382c0aec4SflorianNSD will send notifications to slave zones if a master zone is updated.
44482c0aec4SflorianNSD will check for updates at master servers periodically and transfer
44582c0aec4Sflorianthe updated zone by AXFR/IXFR and reload the new zone contents. If
44682c0aec4Sflorianyou wish exert manual control use nsd-control notify, transfer and
44782c0aec4Sflorianforce_transfer commands.  The transfer command will check for new versions
44882c0aec4Sflorianof the secondary zones hosted by this NSD. The notify command will send
44982c0aec4Sfloriannotifications to the slave servers configured in 'notify:' statements.
45082c0aec4Sflorian
45182c0aec4Sflorian
45282c0aec4Sflorian3.1 Logging
45382c0aec4Sflorian
45482c0aec4SflorianNSD doesn't do any logging. We believe that logging is a separate task
45582c0aec4Sflorianand has to be done independently from the core operation.
45682c0aec4Sflorian
45782c0aec4SflorianThis consciously is not part of nsd itself in order to keep nsd
45882c0aec4Sflorianfocused and minimize its complexity. It is better to leave logging and
45982c0aec4Sfloriantracing to separate dedicated tools. dnsstat can also easily be
46082c0aec4Sflorianconfigured and/or modified to suit local statistics requirements
46182c0aec4Sflorianwithout any danger of affecting the name server itself. We have run
46282c0aec4Sfloriandnsstat on the same machine as nsd, we would recommend using a
46382c0aec4Sflorianmultiprocessor if performance is an issue. Of course it can also run
46482c0aec4Sflorianon a separate machine that has MAC layer access to the network of the
46582c0aec4Sflorianserver.
46682c0aec4Sflorian
46782c0aec4SflorianThe nsd-control tool can output some statistics, with nsd-control stats
46882c0aec4Sflorianand nsd-control stats_noreset.  In contrib/nsd_munin_ there is a munin
46982c0aec4Sfloriangrapher plugin that uses it.  The output of nsd-control stats is easy
47082c0aec4Sflorianto read (text only) with scripts.  The output values are documented on
47182c0aec4Sflorianthe nsd-control man page.
47282c0aec4Sflorian
47382c0aec4SflorianThe CAIDA dnsstat tool referenced is recommended to nsd operators as a
47482c0aec4Sflorianmeans of keeping statistics and check on abnormal query loads.
47582c0aec4Sflorian
47682c0aec4Sflorian    http://www.caida.org/tools/utilities/dnsstat/dnsstat-3.5.1a.tar.gz
47782c0aec4Sflorian
47882c0aec4SflorianAnother tool is the dnstop, that displays DNS statistics on your network.
47982c0aec4Sflorian
48082c0aec4Sflorian    http://dns.measurement-factory.com/tools/dnstop/src/dnstop-20060517.tar.gz
48182c0aec4Sflorian
48282c0aec4SflorianA sample invocation of dnsstat:
48382c0aec4Sflorian
48482c0aec4Sflorian/usr/local/Coral/bin/crl_dnsstat -D -Ci=60 -Cd=240 -C'filter dst 10.1.1.3'  -h -u if:fxp1
48582c0aec4Sflorian
48682c0aec4SflorianA sample output of a slightly modified version:
48782c0aec4Sflorian
48882c0aec4Sflorian# dnsstat output version: 0.2 "dfk"
48982c0aec4Sflorian
49082c0aec4Sflorian# begin trace interval at 1025267664.859043, duration 15.000000
49182c0aec4Sflorian# DNS messages: 74973 (4998.200000/s); DNS queries: 151983 (10132.200000/s)
49282c0aec4Sflorian# print threshold: 30 messages/sec
49382c0aec4Sflorian
49482c0aec4Sflorian#src              op type  class queries    msgs      rd notes
49582c0aec4Sflorian 208.18.162.10     - -     -         533     533       0
49682c0aec4Sflorian "                 0 MX    IN          6
49782c0aec4Sflorian "                 0 A     IN        264
49882c0aec4Sflorian "                 0 ANY   IN        263
49982c0aec4Sflorian 209.11.18.248     - -     -         661     661       0
50082c0aec4Sflorian "                 0 A     IN        655
50182c0aec4Sflorian "                 0 MX    IN          6
50282c0aec4Sflorian 210.117.65.137    - -     -         745     745       0
50382c0aec4Sflorian "                 0 A     IN        745
50482c0aec4Sflorian 216.54.221.131    - -     -         477     477       0
50582c0aec4Sflorian "                 0 A     IN        477
50682c0aec4Sflorian 193.97.205.80     - -     -         681     681       0
50782c0aec4Sflorian "                 0 A     IN          3
50882c0aec4Sflorian "                 0 ANY   IN        678
50982c0aec4Sflorian 168.30.240.11     - -     -         685     685       0
51082c0aec4Sflorian "                 0 A     IN        405
51182c0aec4Sflorian "                 0 MX    IN        280
51282c0aec4Sflorian 210.94.6.67       - -     -         742     742       0
51382c0aec4Sflorian "                 0 A     IN        742
51482c0aec4Sflorian 63.66.68.237      - -     -        1375    1375       0
51582c0aec4Sflorian "                 0 A     IN       1375
51682c0aec4Sflorian 168.30.240.12     - -     -         493     493       0
51782c0aec4Sflorian "                 0 A     IN        493
51882c0aec4Sflorian 139.142.205.225   - -     -        5579    5579       0
51982c0aec4Sflorian "                 0 A     IN       3006
52082c0aec4Sflorian "                 0 MX    IN       2573
52182c0aec4Sflorian 210.117.65.2      - -     -         700     700       0
52282c0aec4Sflorian "                 0 A     IN        700
52382c0aec4Sflorian# end trace interval
52482c0aec4Sflorian
52582c0aec4Sflorian
52682c0aec4Sflorian3.2 AXFR access
52782c0aec4Sflorian
52882c0aec4SflorianThe access list for AXFR should be set with provide-xfr:
52982c0aec4Sflorianin the nsd config file. This is per zone. See nsd.conf(5).
53082c0aec4SflorianFor example to grant zone 'example.com' AXFR right to localhost for
53182c0aec4SflorianIPv4 and IPv6, use the below config options.
53282c0aec4Sflorian
53382c0aec4Sflorianzone:
53482c0aec4Sflorian	name: "example.com"
53582c0aec4Sflorian	provide-xfr: 127.0.0.1 NOKEY
53682c0aec4Sflorian	provide-xfr: ::1 NOKEY
53782c0aec4Sflorian
53882c0aec4SflorianYou can use dig @localhost example.com axfr to test this.
53982c0aec4Sflorian
54082c0aec4Sflorian
54182c0aec4Sflorian3.3 Using TSIG
54282c0aec4Sflorian
54382c0aec4SflorianNSD supports TSIG for any query to the server, for zone transfer
54482c0aec4Sflorianand for notify sending and receiving.
54582c0aec4Sflorian
54682c0aec4SflorianTSIG keys are based on shared secrets. These must be configured
54782c0aec4Sflorianin the config file. To keep the secret in a separate file use
54882c0aec4Sflorianinclude: "filename" to include that file.
54982c0aec4Sflorian
55082c0aec4SflorianAn example tsig key named sec1_key.
55182c0aec4Sflorian
55282c0aec4Sflorian	key:
55382c0aec4Sflorian		name: "sec1_key"
55482c0aec4Sflorian		algorithm: hmac-md5
55582c0aec4Sflorian		secret: "6KM6qiKfwfEpamEq72HQdA=="
55682c0aec4Sflorian
55782c0aec4SflorianThis key can then be used for any query to the NSD server. NSD
55882c0aec4Sflorianwill check if the signature is valid, and if so, return a signed
55982c0aec4Sfloriananswer. Unsigned queries will be given unsigned replies.
56082c0aec4Sflorian
56182c0aec4SflorianThe key can be used to restrict the access control lists, for
56282c0aec4Sflorianexample to only allow zone transfer with the key, by listing
56382c0aec4Sflorianthe key name on the access control line.
56482c0aec4Sflorian
56582c0aec4Sflorian	# provides AXFR to the subnet when TSIG is used.
56682c0aec4Sflorian	provide-xfr: 10.11.12.0/24 sec1_key
56782c0aec4Sflorian	# allow only notifications that are signed
56882c0aec4Sflorian	allow-notify: 192.168.0.0/16 sec1_key
56982c0aec4Sflorian
57082c0aec4SflorianIf the TSIG key name is used in notify or request-xfr lines,
57182c0aec4Sflorianthe key is used to sign the request/notification messages.
57282c0aec4Sflorian
57382c0aec4Sflorian
57482c0aec4Sflorian3.4 Zone expiry of secondary zones
57582c0aec4Sflorian
57682c0aec4SflorianNSD will keep track of the status of secondary zones, according to the
57782c0aec4Sfloriantiming values in the SOA record for the zone.  When the refresh time of a
57882c0aec4Sflorianzone is reached, the serial number is checked and a zone transfer is
57982c0aec4Sflorianstarted if the zone has changed.  Each master server is tried in turn.
58082c0aec4Sflorian
58182c0aec4SflorianMaster zones cannot expire.  They are always served.  Zones are master
58282c0aec4Sflorianzones if they have no 'request-xfr:' statements in the config file.
58382c0aec4Sflorian
58482c0aec4SflorianAfter the expire timeout (from the SOA record at the zone apex) is reached,
58582c0aec4Sflorianthe zone becomes expired. NSD will return SERVFAIL for expired zones,
58682c0aec4Sflorianand will attempt to perform a zone transfer from any of the masters.
58782c0aec4SflorianAfter a zone transfer succeeds, or if the master indicates that the SOA
58882c0aec4Sflorianserial number is still the same, the zone will be OK again.
58982c0aec4Sflorian
59082c0aec4SflorianIn contrast with e.g. BIND, the inception time for a slave zone is stored
59182c0aec4Sflorianon disk (in the xfrdfile: "xfrd.state"), together with timeouts.  If a
59282c0aec4Sflorianslave zone acquisition time is recent enough, this means that NSD can start
59382c0aec4Sflorianserving a zone immediately on loading, without querying the master server.
59482c0aec4Sflorian
59582c0aec4SflorianIf your slave zone has expired, and no masters can be reached, but you
59682c0aec4Sflorianstill want NSD to serve the zone.  (i.e. ''My network is in shambles, but
59782c0aec4Sflorianserve the zone dangit!'').  You can delete the file 'xfrd.state',
59882c0aec4Sflorianbut leave the zonefile for the zone intact.  Make sure to stop nsd before
59982c0aec4Sflorianyou delete the file, as NSD writes it on exit.  Upon loading NSD will treat
60082c0aec4Sflorianthe zonefile that you as operator have provided as recent and will serve
60182c0aec4Sflorianthe zone.  Even though NSD will start to serve the zone immediately,
60282c0aec4Sflorianthe zone will expire after the timeout is reached again.  NSD will also
60382c0aec4Sflorianattempt to confirm that you have provided the correct data by polling
60482c0aec4Sflorianthe masters.  So when the master servers come back up, it will transfer
60582c0aec4Sflorianthe updated zone within <retry timeout from SOA> seconds.
60682c0aec4Sflorian
60782c0aec4SflorianIn general it is possible to provide zone files for both master and
60882c0aec4Sflorianslave zones manually (say from email or rsync). Reload with SIGHUP
60982c0aec4Sflorianor nsd-control reload to read the new zonefile contents into the name
61082c0aec4Sfloriandatabase.  When this is done the new zone will be served. For master
61182c0aec4Sflorianzones, NSD will issue notifications to all configured 'notify:' targets.
61282c0aec4SflorianFor slave zones the above happens; NSD attempts to validate the zone
61382c0aec4Sflorianfrom the master (checking its SOA serial number).
61482c0aec4Sflorian
61582c0aec4Sflorian
61682c0aec4Sflorian3.5 Diagnosing NSD log entries
61782c0aec4Sflorian
61882c0aec4SflorianNSD will print log messages to the system log (or 'logfile:' configuration
61982c0aec4Sflorianentry). Some of these messages are discussed below. These messages can
62082c0aec4Sflorianget extra support if errors happen.
62182c0aec4Sflorian
62282c0aec4Sflorian- "Reload process <pid> failed with status <s>, continuing with old database"
62382c0aec4Sflorian
62482c0aec4SflorianThis log message indicates the reload process of NSD has failed for
62582c0aec4Sfloriansome reason.  The reason can be anything from a missing database file
62682c0aec4Sflorianto internal errors.  If this happens often, please let us know, this
62782c0aec4Sflorianerror message can be caught in the code, and appropriate action could
62882c0aec4Sflorianbe taken.  We are as of yet not sure what action is appropriate, if any.
62982c0aec4Sflorian
63082c0aec4Sflorian- "snipping off trailing partial part of <ixfr.db>"
63182c0aec4Sflorian
63282c0aec4SflorianPlease let us know if, and how often, this happens.
63382c0aec4Sflorian
63482c0aec4SflorianWhat happens is the file ixfr.db contains only part of expected data.
63582c0aec4SflorianThe corruption is removed by snipping off the trailing part.
63682c0aec4Sflorian
63782c0aec4Sflorian- "memory recyclebin holds <num> bytes"
63882c0aec4Sflorian
63982c0aec4SflorianThis is printed for every reload. NSD allocates and deallocates memory
64082c0aec4Sflorianto service IXFR updates. The recyclebin holds deallocated memory ready
64182c0aec4Sflorianfor future use. If the number grows too large, a restart resets it.
64282c0aec4Sflorian
64382c0aec4Sflorian- "xfrd: max number of tcp connections (32) reached."
64482c0aec4Sflorian
64582c0aec4SflorianThis line is printed when more than 32 zones need a zone transfer at the
64682c0aec4Sfloriansame time.  The value is a compile constant (xfrd-tcp.h), but if this
64782c0aec4Sflorianhappens often for you, we could make this a config option.  NSD will reuse
64882c0aec4Sflorianexisting TCP connections to the same master (determined by IP address)
64982c0aec4Sflorianto transfer up to 64k zones from that master.  Thus this error should
65082c0aec4Sflorianonly happen with more than 32 masters or more than 64*32=2M zones that
65182c0aec4Sflorianneed to be updated at the same time.
65282c0aec4Sflorian
65382c0aec4SflorianIf this happens, more zones have to wait until a zone transfer completes
65482c0aec4Sflorian(or is aborted) before they can have a zone transfer too. This waiting
65582c0aec4Sflorianlist has no size limit.
65682c0aec4Sflorian
65782c0aec4Sflorian- "error: <zone> NSEC3PARAM entry <num> has unknown hash algo <number>"
65882c0aec4Sflorian
65982c0aec4SflorianThis error means that the zone has NSEC3 chain(s) with hash algorithms
66082c0aec4Sflorianthat are not supported by this version of NSD, and thus cannot be served
66182c0aec4Sflorianby NSD.  If there are also no NSECs or NSEC3 chain(s) with known hash
66282c0aec4Sflorianalgorithms, NSD will not be able to serve DNSSEC authenticated denials
66382c0aec4Sflorianfor the zone.
66482c0aec4Sflorian
66582c0aec4Sflorian
66682c0aec4Sflorian3.6 Interfaces
66782c0aec4Sflorian
66882c0aec4SflorianNSD will by default bind itself to the system default interface and
66982c0aec4Sflorianservice ip4 and if available also ip6. It is possible to service only ip4
67082c0aec4Sflorianor ip6 using the -4, -6 commandline options, or the ip4-only and ip6-only
67182c0aec4Sflorianconfig file options.
67282c0aec4Sflorian
67382c0aec4SflorianThe commandline option -a and config file option ip-address can be given
67482c0aec4Sflorianto bind to specific interfaces.  Multiple interfaces can be specified.
67582c0aec4SflorianThis is useful for two reasons:
67682c0aec4Sflorian	o The specific interface bound will result in the OS bypassing
67782c0aec4Sflorian	  routing tables for the interface selection.  This results in
67882c0aec4Sflorian	  a small performance gain.  It is not the performance gain that
67982c0aec4Sflorian	  is the problem, sometimes the routing tables can give the
68082c0aec4Sflorian	  wrong answer, see the next point.
68182c0aec4Sflorian	o The answer will be routed via the interface the query came from.
68282c0aec4Sflorian	  This makes sure that the return address on the DNS replies is the
68382c0aec4Sflorian	  same as the query was sent to.  Many resolvers require the source
68482c0aec4Sflorian	  address of the replies to be correct.  The ip-address: option is
68582c0aec4Sflorian	  easier than configuring the OS routing table to return the DNS
68682c0aec4Sflorian	  replies via the correct interface.
68782c0aec4SflorianThe above means that even for systems with multiple interfaces where you
68882c0aec4Sflorianintend to provide DNS service to all interfaces, it is prudent to specify
68982c0aec4Sflorianall the interfaces as ip-address config file options.
69082c0aec4Sflorian
69182c0aec4SflorianWith the config file option ip-transparent you can allow NSD to bind to
69282c0aec4Sfloriannon local addresses.
69382c0aec4Sflorian
69482c0aec4Sflorian
69582c0aec4Sflorian3.7 Tuning
69682c0aec4Sflorian
69782c0aec4SflorianNSD is performant by design and most users will have little need for tuning
69882c0aec4Sflorianit. For setups that do require every ounce of performance, NSD offers a number
69982c0aec4Sflorianof configuration options.
70082c0aec4Sflorian
70182c0aec4Sflorian
70282c0aec4Sfloriancpu-affinity, server-<N>-cpu-affinity and xfrd-cpu-affinity
70382c0aec4Sflorian
70482c0aec4SflorianModern computer systems have many cores available. By default the operating
70582c0aec4Sfloriansystem's scheduling-algorithm determines which core a given task is allocated
70682c0aec4Sflorianto. Processors build up state, like keeping frequently accessed data in cache
70782c0aec4Sflorianmemory, for the task (process/thread) that it is currently running. Whenever,
70882c0aec4Sfloriana task switches cores, performance is degraded because the core it switched
70982c0aec4Sflorianto has yet to build up said state. The cpu-affinity configuration options can
71082c0aec4Sflorianbe used to bind NSD to one or more cores.
71182c0aec4Sflorian
71282c0aec4Sfloriancpu-affinity can be used to designate a set of cores onto which NSD processes
71382c0aec4Sflorianare scheduled. server-<N>-cpu-affinity and xfrd-cpu-affinity can be used to
71482c0aec4Sfloriandesignate a specific core to each individual process. This improves L1/L2
71582c0aec4Sfloriancache hits and reduces pipeline stalls/flushes.
71682c0aec4Sflorian
71782c0aec4SflorianFor example, a name server configured to fork two NSD servers that must run on
71882c0aec4Sfloriandedicated cores 0 and 2, while the transfer daemon (xfrd) must run on core 1,
71982c0aec4Sflorianthe configuration becomes.
72082c0aec4Sflorian
72182c0aec4Sflorian	server:
72282c0aec4Sflorian		server-count: 2
72382c0aec4Sflorian		cpu-affinity: 0 1 2
72482c0aec4Sflorian		server-1-cpu-affinity: 0
72582c0aec4Sflorian		server-2-cpu-affinity: 2
72682c0aec4Sflorian		xfrd-cpu-affinity: 1
72782c0aec4Sflorian
72882c0aec4Sflorian
72982c0aec4Sflorianip-address: x.x.x.x  servers=<N>
73082c0aec4Sflorian
73182c0aec4Sflorianip-address options can be configured per (set of) server(s). Sockets that are
73282c0aec4Sflorianconfigured for a specific server are closed by other servers on startup. This
73382c0aec4Sflorianimproves select/poll performance and avoids waking up multiple servers when a
73482c0aec4Sflorianpacket comes in.
73582c0aec4Sflorian
73682c0aec4Sflorian
73782c0aec4Sflorianip-address: x.x.x.x  bindtodevice=yes
73882c0aec4Sflorianip-address: x.x.x.x  setfib=<N>
73982c0aec4Sflorian
74082c0aec4SflorianThe bindtodevice attribute on Linux and the setfib ip-address attribute on
74182c0aec4SflorianFreeBSD can be used to skip the interface selection process in the kernel. This
74282c0aec4Sflorianimproves performance, and ensures responses written to the socket are pushed
74382c0aec4Sflorianout the same interface the corresponding query came in on when multiple
74482c0aec4Sflorianinterfaces are configured to listen on the same subnet.
74582c0aec4Sflorian
74682c0aec4SflorianThe aforementioned options all complement eachother and best performance is
74782c0aec4Sflorianachieved by assigning a socket to a single server that runs on a dedicated
74882c0aec4Sfloriancore and line that up with a dedicated network interface. Network interface
74982c0aec4Sflorianinterrupts are best handled by a core not designated to any NSD servers.
75082c0aec4Sflorian
75182c0aec4Sflorian	server:
75282c0aec4Sflorian		server-count: 3
75382c0aec4Sflorian		cpu-affinity: 0 1 2 4
75482c0aec4Sflorian		server-1-cpu-affinity: 0
75582c0aec4Sflorian		server-2-cpu-affinity: 1
75682c0aec4Sflorian		server-3-cpu-affinity: 2
75782c0aec4Sflorian		xfrd-cpu-affinity: 4
75882c0aec4Sflorian		ip-address: 1.2.3.11  servers=1 setfib=1 bindtodevice=yes
75982c0aec4Sflorian		ip-address: 1.2.3.12  servers=2 setfib=2 bindtodevice=yes
76082c0aec4Sflorian		ip-address: 1.2.3.13  servers=3 setfib=3 bindtodevice=yes
76182c0aec4Sflorian
76282c0aec4SflorianThe number of NSD servers to fork and which cores are best used depends
76382c0aec4Sflorianentirely on the hardware. cpu-affinity options are supported on Linux and
76482c0aec4SflorianFreeBSD.
76582c0aec4Sflorian
76682c0aec4Sflorian
7673f21e8ccSflorian3.8 Zone verification
7683f21e8ccSflorian
7693f21e8ccSflorianNSD can be configured to verify a zone is correct before publishing it. This
7703f21e8ccSflorianfeature is primarily aimed at fortifying DNSSEC in the DNS
7713f21e8ccSfloriannotify/transfer-chain, but can be used to carry out any checks desired.
7723f21e8ccSflorian
7733f21e8ccSflorianAn external verifier can be configured per zone. When a zone with verification
7743f21e8ccSflorianenabled is received or updated via an (incremental) zone transfer, it will be
7753f21e8ccSfloriansubmitted to the verifier for evaluation. If the verifier deems the updated
7763f21e8ccSflorianzone correct (indicated with exit status 0), the zone will be served. NSD will
7773f21e8ccSfloriandiscard the update and continue to serve the zone before the update if the
7783f21e8ccSflorianexit status of the verifier is non-zero.
7793f21e8ccSflorian
7803f21e8ccSflorianVerifier options can be configured globally in the "verify:" clause, or
7813f21e8ccSflorianspecifically for a zone/pattern in the respective "zone:" and "pattern:"
7823f21e8ccSflorianclauses. The global values are applied by default.
7833f21e8ccSflorian
7843f21e8ccSflorianThe zone can be provided to the verifier in two ways.
7853f21e8ccSflorian
7863f21e8ccSflorian	1. The complete zone can be fed to the standard input of the verifier.
7873f21e8ccSflorian
7883f21e8ccSflorian	   This modus operandi is enabled by default and can be configured
7893f21e8ccSflorian	   with the "verifier-feed-zone:" option.
7903f21e8ccSflorian
7913f21e8ccSflorian	   Examples for verifiers that read from the standard input are:
7923f21e8ccSflorian	   "ldns-verify-zone -V2" (-V2 to suppress copying to stdout) or
7933f21e8ccSflorian	   "validns -" (don't forget the dash (-) to read the zone from stdin).
7943f21e8ccSflorian
7953f21e8ccSflorian	2. The zone can be served to the verifier.
7963f21e8ccSflorian
7973f21e8ccSflorian	   This is disabled by default and can be enabled by configuring ip-
7983f21e8ccSflorian	   addresses, with the "ip-address:" option in the "verify:" clause,
7993f21e8ccSflorian	   on which the zone to be assessed will be served. Addresses can
8003f21e8ccSflorian	   contain a port number to override the default, which is 5347 by
8013f21e8ccSflorian	   default, but can be overridden with the "port:" option in the
8023f21e8ccSflorian	   verify clause.
8033f21e8ccSflorian
8043f21e8ccSflorian	   For example to validate the SOA of a zone example.com by querying,
8053f21e8ccSflorian	   with a certain DS record as the trust anchor (in file example.com.ds),
8063f21e8ccSflorian	   the "verifier:" option could have the following value:
8073f21e8ccSflorian	   "drill -S -k example.com.ds @localhost -p 5347 example.com SOA"
8083f21e8ccSflorian
8093f21e8ccSflorianA verifier is informed about the domain name of the zone to be verified and
8103f21e8ccSflorianthe accessibility of the system submitting the zone via environment variables.
8113f21e8ccSflorian
8123f21e8ccSflorian	VERIFY_ZONE
8133f21e8ccSflorian		Domain name of the zone to be verified.
8143f21e8ccSflorian
8153f21e8ccSflorian	VERIFY_ZONE_ON_STDIN
8163f21e8ccSflorian		Contains "yes" if the zone is fed over standard input,
8173f21e8ccSflorian		otherwise "no".
8183f21e8ccSflorian
8193f21e8ccSflorian	VERIFY_IP_ADDRESSES
8203f21e8ccSflorian		Contains a list of <ip-address>@<port>s on which the zone
8213f21e8ccSflorian		to be verified can be queried.
8223f21e8ccSflorian
8233f21e8ccSflorian	VERIFY_IPV6_ADDRESS and VERIFY_IPV6_PORT
8243f21e8ccSflorian                Contains the first configured IPv6 address and port.
8253f21e8ccSflorian
8263f21e8ccSflorian	VERIFY_IPV4_ADDRESS and VERIFY_IPV4_PORT
8273f21e8ccSflorian		Contains the first configured IPv4 address and port.
8283f21e8ccSflorian
8293f21e8ccSflorian	VERIFY_IP_ADDRESS and VERIFY_PORT
8303f21e8ccSflorian		Contains the first configured address and port.
8313f21e8ccSflorian		IPv6 is preferred over IPv4.
8323f21e8ccSflorian
8333f21e8ccSflorianFor each zone one verifier will be run at the same time, but when multiple
8343f21e8ccSflorianto-be-verified zones are received, multiple verifiers may be run
8353f21e8ccSfloriansimultaneously. The number of verifiers that may be run simultaneously is
8363f21e8ccSflorianconfigured with the "verifier-count:" option in the "verify:" clause and
8373f21e8ccSfloriandefaults to 1.
8383f21e8ccSflorian
8393f21e8ccSflorianThe time a verifier may take can be configured with the "verifier-timeout:"
8403f21e8ccSflorianoption in the "verify:" clause (to make the general default) or in the "zone:"
8413f21e8ccSflorianor "pattern:" clause to set it for a specific zone. When the time the verifier
8423f21e8ccSfloriantakes exceeds the timeout value, the zone to be verified will be considered
8433f21e8ccSflorianbad. By default the value is 0, which means that the verifier may take as long
8443f21e8ccSflorianas it needs.
8453f21e8ccSflorian
8463f21e8ccSflorianTo enable verification for all zones.
8473f21e8ccSflorian
8483f21e8ccSflorian	verify:
8493f21e8ccSflorian		enable: yes
8503f21e8ccSflorian		verifier: <command>
8513f21e8ccSflorian
8523f21e8ccSflorianTo enable verification only for a specific zone.
8533f21e8ccSflorian
8543f21e8ccSflorian	verify:
8553f21e8ccSflorian		enable: yes
8563f21e8ccSflorian		verify-zones: no
8573f21e8ccSflorian
8583f21e8ccSflorian	zone:
8593f21e8ccSflorian		name: example.com
8603f21e8ccSflorian		verify-zone: yes
8613f21e8ccSflorian
8623f21e8ccSflorian
86382c0aec4Sflorian4.0 Support and Feedback
86482c0aec4Sflorian
86582c0aec4SflorianNLnet Labs is committed to support NSD and its other software products on
86682c0aec4Sfloriana best effort basis, free of charge. This form of community support is
86782c0aec4Sflorianoffered through a mailing lists and the 'bugzilla' web interface.
86882c0aec4Sflorian
86982c0aec4Sflorian	http://www.nlnetlabs.nl/bugs/
87082c0aec4Sflorian
87182c0aec4SflorianIf for any reason NLnet Labs would stop community support of NSD such
87282c0aec4Sflorianwould be announced on our web pages at least two years in advance.
87382c0aec4Sflorian
874b71395eaSflorianThe community mailing list nsd-users@lists.NLnetLabs.nl can be used to discuss
87582c0aec4Sflorianissues with other users of NSD. Subscribe here
87682c0aec4Sflorian
87782c0aec4Sflorian	http://lists.nlnetlabs.nl/mailman/listinfo/nsd-users
87882c0aec4Sflorian
87982c0aec4SflorianNLnet Labs recognizes that in some corporate environments this commitment to
88082c0aec4Sfloriancommunity support is not sufficient and that support needs to be codified.
88182c0aec4SflorianWe therefore offer paid support contracts that come in 3 varieties.
88282c0aec4Sflorian
88382c0aec4SflorianMore information about these support varieties can be found at
884b71395eaSflorian	https://nlnetlabs.nl/services/contracts/
88582c0aec4Sflorian
88682c0aec4SflorianSupport goes two ways.  By acquiring one of the support contracts you
88782c0aec4Sflorianalso support NLnet Labs to continue to participate in the development
88882c0aec4Sflorianof the Internet architecture. We do this through our participation in
88982c0aec4Sflorianthe (IETF) standards process and by developing and maintaining
89082c0aec4Sflorianreference implementations of standards and tools to support operation
89182c0aec4Sflorianand deployment of new and existing Internet technology.
89282c0aec4Sflorian
893b71395eaSflorianWe are interested in our users and in the environment you use NSD. Please drop
894b71395eaSflorianus a mail when you use NSD at users@NLnetLabs.nl. Indicate in what kind of
895b71395eaSflorianoperation you deploy NSD and let us know what your positive and negative
896b71395eaSflorianexperiences are.
89782c0aec4Sflorian
89882c0aec4Sflorian4.1 Your Support
89982c0aec4Sflorian
90082c0aec4SflorianNLnet Labs offers all of its software products as open source, most are
90182c0aec4Sflorianpublished under a BSD license. You can download them, not only from the
90282c0aec4SflorianNLnet Labs website but also through the various OS distributions for
90382c0aec4Sflorianwhich NSD, ldns, and Unbound are packaged. We therefore have little idea
90482c0aec4Sflorianwho uses our software in production environments and have no direct ties
90582c0aec4Sflorianwith 'our customers'.
90682c0aec4Sflorian
90782c0aec4SflorianTherefore, we ask you to contact us at users@NLnetLabs.nl and tell us
90882c0aec4Sflorianwhether you use one of our products in your production environment,
90982c0aec4Sflorianwhat that environment looks like, and maybe even share some praise.
91082c0aec4SflorianWe would like to refer to the fact that your organization is using our
91182c0aec4Sflorianproducts. We will only do that if you explicitly allow us. In all other
91282c0aec4Sfloriancases we will keep the information you share with us to ourselves.
91382c0aec4Sflorian
91482c0aec4SflorianIn addition to the moral support you can also support us
91582c0aec4Sflorianfinancially. NLnet Labs is a recognized not-for-profit charity foundation
91682c0aec4Sflorianthat is chartered to develop open-source software and open-standards
91782c0aec4Sflorianfor the Internet. If you use our software to satisfaction please express
91882c0aec4Sflorianthat by giving us a donation. For small donations PayPal can be used. For
91982c0aec4Sflorianlarger and regular donations please contact us at users@NLnetLabs.nl. Also
92082c0aec4Sfloriansee http://www.nlnetlabs.nl/labs/contributors/.
92182c0aec4Sflorian
92282c0aec4Sflorian
923*bf87c3c0Sflorian$Id: README,v 1.8 2024/04/12 15:53:34 florian Exp $
924