Fabio Alessandro Locati 05a4b5a
#
Fabio Alessandro Locati 05a4b5a
# nsd.conf -- the NSD(8) configuration file, nsd.conf(5).
Fabio Alessandro Locati 05a4b5a
#
Fabio Alessandro Locati 05a4b5a
# Copyright (c) 2001-2011, NLnet Labs. All rights reserved.
Fabio Alessandro Locati 05a4b5a
#
Fabio Alessandro Locati 05a4b5a
# See LICENSE for the license.
Fabio Alessandro Locati 05a4b5a
#
Fabio Alessandro Locati 05a4b5a
Fabio Alessandro Locati 05a4b5a
# This is a comment.
Fabio Alessandro Locati 05a4b5a
# Sample configuration file
Fabio Alessandro Locati 05a4b5a
# include: "file" # include that file's text over here.  Globbed, "*.conf"
Fabio Alessandro Locati 05a4b5a
Fabio Alessandro Locati 05a4b5a
# options for the nsd server
Fabio Alessandro Locati 05a4b5a
server:
Fabio Alessandro Locati 05a4b5a
	# Number of NSD servers to fork.  Put the number of CPUs to use here.
Fabio Alessandro Locati 05a4b5a
	# server-count: 1
Fabio Alessandro Locati 05a4b5a
Fabio Alessandro Locati 05a4b5a
	# uncomment to specify specific interfaces to bind (default are the
Fabio Alessandro Locati 05a4b5a
	# wildcard interfaces 0.0.0.0 and ::0).
Fabio Alessandro Locati 05a4b5a
	# For servers with multiple IP addresses, list them one by one,
Fabio Alessandro Locati 05a4b5a
	# or the source address of replies could be wrong.
Fabio Alessandro Locati 05a4b5a
	# Use ip-transparent to be able to list addresses that turn on later.
Fabio Alessandro Locati 05a4b5a
	# ip-address: 1.2.3.4
Fabio Alessandro Locati 05a4b5a
	# ip-address: 1.2.3.4@5678
Fabio Alessandro Locati 05a4b5a
	# ip-address: 12fe::8ef0
Fabio Alessandro Locati 05a4b5a
Fabio Alessandro Locati 05a4b5a
	# Allow binding to non local addresses. Default no.
Fabio Alessandro Locati 05a4b5a
	# ip-transparent: no
Fabio Alessandro Locati 05a4b5a
Fabio Alessandro Locati 05a4b5a
	# use the reuseport socket option for performance. Default no.
Fabio Alessandro Locati 05a4b5a
	# reuseport: no
Fabio Alessandro Locati 05a4b5a
Fabio Alessandro Locati 05a4b5a
	# enable debug mode, does not fork daemon process into the background.
Fabio Alessandro Locati 05a4b5a
	# debug-mode: no
Fabio Alessandro Locati 05a4b5a
Fabio Alessandro Locati 05a4b5a
	# listen on IPv4 connections
Fabio Alessandro Locati 05a4b5a
	# do-ip4: yes
Fabio Alessandro Locati 05a4b5a
Fabio Alessandro Locati 05a4b5a
	# listen on IPv6 connections
Fabio Alessandro Locati 05a4b5a
	# do-ip6: yes
Fabio Alessandro Locati 05a4b5a
Fabio Alessandro Locati 05a4b5a
	# port to answer queries on. default is 53.
Fabio Alessandro Locati 05a4b5a
	# port: 53
Fabio Alessandro Locati 05a4b5a
Fabio Alessandro Locati 05a4b5a
	# Verbosity level.
Fabio Alessandro Locati 05a4b5a
	# verbosity: 0
Fabio Alessandro Locati 05a4b5a
Fabio Alessandro Locati 05a4b5a
	# After binding socket, drop user privileges.
Fabio Alessandro Locati 05a4b5a
	# can be a username, id or id.gid.
c376124
	# username: nsd
Fabio Alessandro Locati 05a4b5a
Fabio Alessandro Locati 05a4b5a
	# Run NSD in a chroot-jail.
Fabio Alessandro Locati 05a4b5a
	# make sure to have pidfile and database reachable from there.
Fabio Alessandro Locati 05a4b5a
	# by default, no chroot-jail is used.
c376124
	# chroot: "/etc/nsd"
Fabio Alessandro Locati 05a4b5a
Fabio Alessandro Locati 05a4b5a
	# The directory for zonefile: files.  The daemon chdirs here.
c376124
	# zonesdir: "/etc/nsd"
c376124
Fabio Alessandro Locati 05a4b5a
	# the list of dynamically added zones.
c376124
	# zonelistfile: "/var/lib/nsd/zone.list"
Fabio Alessandro Locati 05a4b5a
Fabio Alessandro Locati 05a4b5a
	# the database to use
Fabio Alessandro Locati 05a4b5a
	# if set to "" then no disk-database is used, less memory usage.
c376124
	# database: "/var/lib/nsd/nsd.db"
Fabio Alessandro Locati 05a4b5a
Fabio Alessandro Locati 05a4b5a
	# log messages to file. Default to stderr and syslog (with
Fabio Alessandro Locati 05a4b5a
	# facility LOG_DAEMON).  stderr disappears when daemon goes to bg.
c376124
	# logfile: "/var/log/nsd.log"
Fabio Alessandro Locati 05a4b5a
Fabio Alessandro Locati 05a4b5a
	# File to store pid for nsd in.
c376124
	# pidfile: "/var/run/nsd/nsd.pid"
Fabio Alessandro Locati 05a4b5a
Fabio Alessandro Locati 05a4b5a
	# The file where secondary zone refresh and expire timeouts are kept.
c376124
	# If you delete this file, all secondary zones are forced to be
Fabio Alessandro Locati 05a4b5a
	# 'refreshing' (as if nsd got a notify).  Set to "" to disable.
c376124
	# xfrdfile: "/var/lib/nsd/ixfr.state"
Fabio Alessandro Locati 05a4b5a
Fabio Alessandro Locati 05a4b5a
	# The directory where zone transfers are stored, in a subdir of it.
c376124
	# xfrdir: "/tmp"
Fabio Alessandro Locati 05a4b5a
Fabio Alessandro Locati 05a4b5a
	# don't answer VERSION.BIND and VERSION.SERVER CHAOS class queries
Fabio Alessandro Locati 05a4b5a
	# hide-version: no
Fabio Alessandro Locati 05a4b5a
Fabio Alessandro Locati 05a4b5a
	# version string the server responds with for chaos queries.
Fabio Alessandro Locati 05a4b5a
	# default is 'NSD x.y.z' with the server's version number.
Fabio Alessandro Locati 05a4b5a
	# version: "NSD"
Fabio Alessandro Locati 05a4b5a
Fabio Alessandro Locati 05a4b5a
	# identify the server (CH TXT ID.SERVER entry).
Fabio Alessandro Locati 05a4b5a
	# identity: "unidentified server"
Fabio Alessandro Locati 05a4b5a
Fabio Alessandro Locati 05a4b5a
	# NSID identity (hex string, or "ascii_somestring"). default disabled.
Fabio Alessandro Locati 05a4b5a
	# nsid: "aabbccdd"
Fabio Alessandro Locati 05a4b5a
Fabio Alessandro Locati 05a4b5a
	# Maximum number of concurrent TCP connections per server.
Fabio Alessandro Locati 05a4b5a
	# tcp-count: 100
Fabio Alessandro Locati 05a4b5a
Fabio Alessandro Locati 05a4b5a
	# Maximum number of queries served on a single TCP connection.
Fabio Alessandro Locati 05a4b5a
	# By default 0, which means no maximum.
Fabio Alessandro Locati 05a4b5a
	# tcp-query-count: 0
Fabio Alessandro Locati 05a4b5a
Fabio Alessandro Locati 05a4b5a
	# Override the default (120 seconds) TCP timeout.
Fabio Alessandro Locati 05a4b5a
	# tcp-timeout: 120
Fabio Alessandro Locati 05a4b5a
Fabio Alessandro Locati 05a4b5a
	# Preferred EDNS buffer size for IPv4.
Fabio Alessandro Locati 05a4b5a
	# ipv4-edns-size: 4096
Fabio Alessandro Locati 05a4b5a
Fabio Alessandro Locati 05a4b5a
	# Preferred EDNS buffer size for IPv6.
Fabio Alessandro Locati 05a4b5a
	# ipv6-edns-size: 4096
Fabio Alessandro Locati 05a4b5a
Fabio Alessandro Locati 05a4b5a
	# statistics are produced every number of seconds. Prints to log.
Fabio Alessandro Locati 05a4b5a
	# Default is 0, meaning no statistics are produced.
Fabio Alessandro Locati 05a4b5a
	# statistics: 3600
Fabio Alessandro Locati 05a4b5a
Fabio Alessandro Locati 05a4b5a
	# Number of seconds between reloads triggered by xfrd.
Fabio Alessandro Locati 05a4b5a
	# xfrd-reload-timeout: 1
c376124
Fabio Alessandro Locati 05a4b5a
	# log timestamp in ascii (y-m-d h:m:s.msec), yes is default.
Fabio Alessandro Locati 05a4b5a
	# log-time-ascii: yes
Fabio Alessandro Locati 05a4b5a
Fabio Alessandro Locati 05a4b5a
	# round robin rotation of records in the answer.
Fabio Alessandro Locati 05a4b5a
	# round-robin: no
Fabio Alessandro Locati 05a4b5a
Fabio Alessandro Locati 05a4b5a
	# check mtime of all zone files on start and sighup
Fabio Alessandro Locati 05a4b5a
	# zonefiles-check: yes
c376124
Fabio Alessandro Locati 05a4b5a
	# write changed zonefiles to disk, every N seconds.
Fabio Alessandro Locati 05a4b5a
	# default is 0(disabled) or 3600(if database is "").
Fabio Alessandro Locati 05a4b5a
	# zonefiles-write: 3600
Fabio Alessandro Locati 05a4b5a
Fabio Alessandro Locati 05a4b5a
	# RRLconfig
Fabio Alessandro Locati 05a4b5a
	# Response Rate Limiting, size of the hashtable. Default 1000000.
Fabio Alessandro Locati 05a4b5a
	# rrl-size: 1000000
Fabio Alessandro Locati 05a4b5a
Fabio Alessandro Locati 05a4b5a
	# Response Rate Limiting, maximum QPS allowed (from one query source).
Fabio Alessandro Locati 05a4b5a
	# If set to 0, ratelimiting is disabled. Also set
Fabio Alessandro Locati 05a4b5a
	# rrl-whitelist-ratelimit to 0 to disable ratelimit processing.
c376124
	# Default is on.
Fabio Alessandro Locati 05a4b5a
	# rrl-ratelimit: 200
Fabio Alessandro Locati 05a4b5a
Fabio Alessandro Locati 05a4b5a
	# Response Rate Limiting, number of packets to discard before
Fabio Alessandro Locati 05a4b5a
	# sending a SLIP response (a truncated one, allowing an honest
Fabio Alessandro Locati 05a4b5a
	# resolver to retry with TCP). Default is 2 (one half of the
Fabio Alessandro Locati 05a4b5a
	# queries will receive a SLIP response, 0 disables SLIP (all
Fabio Alessandro Locati 05a4b5a
	# packets are discarded), 1 means every request will get a
Fabio Alessandro Locati 05a4b5a
	# SLIP response.  When the ratelimit is hit the traffic is
Fabio Alessandro Locati 05a4b5a
	# divided by the rrl-slip value.
Fabio Alessandro Locati 05a4b5a
	# rrl-slip: 2
Fabio Alessandro Locati 05a4b5a
Fabio Alessandro Locati 05a4b5a
	# Response Rate Limiting, IPv4 prefix length. Addresses are
c376124
	# grouped by netblock.
Fabio Alessandro Locati 05a4b5a
	# rrl-ipv4-prefix-length: 24
Fabio Alessandro Locati 05a4b5a
Fabio Alessandro Locati 05a4b5a
	# Response Rate Limiting, IPv6 prefix length. Addresses are
c376124
	# grouped by netblock.
Fabio Alessandro Locati 05a4b5a
	# rrl-ipv6-prefix-length: 64
Fabio Alessandro Locati 05a4b5a
Fabio Alessandro Locati 05a4b5a
	# Response Rate Limiting, maximum QPS allowed (from one query source)
c376124
	# for whitelisted types. Default is on.
Fabio Alessandro Locati 05a4b5a
	# rrl-whitelist-ratelimit: 2000
Fabio Alessandro Locati 05a4b5a
	# RRLend
Fabio Alessandro Locati 05a4b5a
c376124
	# Optional local server config
c376124
	include: "/etc/nsd/server.d/*.conf"
c376124
c376124
# Include optional local configs.
c376124
include: "/etc/nsd/conf.d/*.conf"
c376124
c376124
# Remote control config section.
c376124
remote-control:
c376124
	# Enable remote control with nsd-control(8) here.
c376124
	# set up the keys and certificates with nsd-control-setup.
c376124
	control-enable: yes
c376124
c376124
	# what interfaces are listened to for control, default is on localhost.
c376124
	# control-interface: 127.0.0.1
c376124
	# control-interface: ::1
c376124
c376124
	# port number for remote control operations (uses TLS over TCP).
c376124
	# control-port: 8952
c376124
c376124
	# nsd server key file for remote control.
c376124
	# server-key-file: "/etc/nsd/nsd_server.key"
c376124
c376124
	# nsd server certificate file for remote control.
c376124
	# server-cert-file: "/etc/nsd/nsd_server.pem"
Fabio Alessandro Locati 05a4b5a
c376124
	# nsd-control key file.
c376124
	# control-key-file: "/etc/nsd/nsd_control.key"
c376124
c376124
	# nsd-control certificate file.
c376124
	# control-cert-file: "/etc/nsd/nsd_control.pem"
c376124
c376124
c376124
# Secret keys for TSIGs that secure zone transfers.
c376124
# You could include: "secret.keys" and put the 'key:' statements in there,
c376124
# and give that file special access control permissions.
c376124
#
c376124
# key:
c376124
	# The key name is sent to the other party, it must be the same
c376124
	#name: "keyname"
c376124
	# algorithm hmac-md5, or hmac-sha1, or hmac-sha256 (if compiled in)
c376124
	#algorithm: hmac-sha256
c376124
	# secret material, must be the same as the other party uses.
c376124
	# base64 encoded random number.
c376124
	# e.g. from dd if=/dev/random of=/dev/stdout count=1 bs=32 | base64
c376124
	#secret: "K2tf3TRjvQkVCmJF3/Z9vA=="
c376124
c376124
c376124
# Patterns have zone configuration and they are shared by one or more zones.
c376124
#
c376124
# pattern:
c376124
	# name by which the pattern is referred to
c376124
	#name: "myzones"
c376124
	# the zonefile for the zones that use this pattern.
c376124
	# if relative then from the zonesdir (inside the chroot).
c376124
	# the name is processed: %s - zone name (as appears in zone:name).
c376124
	# %1 - first character of zone name, %2 second, %3 third.
c376124
	# %z - topleveldomain label of zone, %y, %x next labels in name.
c376124
	# if label or character does not exist you get a dot '.'.
c376124
	# for example "%s.zone" or "zones/%1/%2/%3/%s" or "secondary/%z/%s"
c376124
	#zonefile: "%s.zone"
c376124
c376124
	# If no master and slave access control elements are provided,
c376124
	# this zone will not be served to/from other servers.
c376124
c376124
	# A master zone needs notify: and provide-xfr: lists.  A slave
c376124
	# may also allow zone transfer (for debug or other secondaries).
c376124
	# notify these slaves when the master zone changes, address TSIG|NOKEY
c376124
	# IP can be ipv4 and ipv6, with @port for a nondefault port number.
c376124
	#notify: 192.0.2.1 NOKEY
c376124
	# allow these IPs and TSIG to transfer zones, addr TSIG|NOKEY|BLOCKED
c376124
	# address range 192.0.2.0/24, 1.2.3.4&255.255.0.0, 3.0.2.20-3.0.2.40
c376124
	#provide-xfr: 192.0.2.0/24 my_tsig_key_name
c376124
	# set the number of retries for notify.
c376124
	#notify-retry: 5
c376124
c376124
	# uncomment to provide AXFR to all the world
c376124
	# provide-xfr: 0.0.0.0/0 NOKEY
c376124
	# provide-xfr: ::0/0 NOKEY
c376124
c376124
	# A slave zone needs allow-notify: and request-xfr: lists.
c376124
	#allow-notify: 2001:db8::0/64 my_tsig_key_name
c376124
	# By default, a slave will request a zone transfer with IXFR/TCP.
c376124
	# If you want to make use of IXFR/UDP use: UDP addr tsigkey
c376124
	# for a master that only speaks AXFR (like NSD) use AXFR addr tsigkey
c376124
	#request-xfr: 192.0.2.2 the_tsig_key_name
c376124
	# Attention: You cannot use UDP and AXFR together. AXFR is always over
c376124
	# TCP. If you use UDP, we higly recommend you to deploy TSIG.
c376124
	# Allow AXFR fallback if the master does not support IXFR. Default
c376124
	# is yes.
c376124
	#allow-axfr-fallback: yes
c376124
	# set local interface for sending zone transfer requests.
c376124
	# default is let the OS choose.
c376124
	#outgoing-interface: 10.0.0.10
c376124
c376124
	# if compiled with --enable-zone-stats, give name of stat block for
c376124
	# this zone (or group of zones).  Output from nsd-control stats.
c376124
	# zonestats: "%s"
c376124
c376124
	# if you give another pattern name here, at this point the settings
c376124
	# from that pattern are inserted into this one (as if it were a
c376124
	# macro).  The statement can be given in between other statements,
c376124
	# because the order of access control elements can make a difference
c376124
	# (which master to request from first, which slave to notify first).
c376124
	#include-pattern: "common-masters"
c376124
c376124
c376124
# Fixed zone entries.  Here you can config zones that cannot be deleted.
c376124
# Zones that are dynamically added and deleted are put in the zonelist file.
c376124
#
c376124
# zone:
c376124
	# name: "example.com"
c376124
	# you can give a pattern here, all the settings from that pattern
c376124
	# are then inserted at this point
c376124
	# include-pattern: "master"
c376124
	# You can also specify (additional) options directly for this zone.
c376124
	# zonefile: "example.com.zone"
c376124
	# request-xfr: 192.0.2.1 example.com.key
c376124
c376124
	# RRLconfig
c376124
	# Response Rate Limiting, whitelist types
c376124
	# rrl-whitelist: nxdomain
c376124
	# rrl-whitelist: error
c376124
	# rrl-whitelist: referral
c376124
	# rrl-whitelist: any
c376124
	# rrl-whitelist: rrsig
c376124
	# rrl-whitelist: wildcard
c376124
	# rrl-whitelist: nodata
c376124
	# rrl-whitelist: dnskey
c376124
	# rrl-whitelist: positive
c376124
	# rrl-whitelist: all
c376124
	# RRLend