Blob Blame History Raw
#
# nsd.conf -- the NSD(8) configuration file, nsd.conf(5).
#
# Copyright (c) 2001-2011, NLnet Labs. All rights reserved.
#
# See LICENSE for the license.
#

# This is a comment.
# Sample configuration file
# include: "file" # include that file's text over here.  Globbed, "*.conf"

# options for the nsd server
server:
	# Number of NSD servers to fork.  Put the number of CPUs to use here.
	# server-count: 1

	# uncomment to specify specific interfaces to bind (default are the
	# wildcard interfaces 0.0.0.0 and ::0).
	# For servers with multiple IP addresses, list them one by one,
	# or the source address of replies could be wrong.
	# Use ip-transparent to be able to list addresses that turn on later.
	# ip-address: 1.2.3.4
	# ip-address: 1.2.3.4@5678
	# ip-address: 12fe::8ef0

	# Allow binding to non local addresses. Default no.
	# ip-transparent: no

	# use the reuseport socket option for performance. Default no.
	# reuseport: no

	# enable debug mode, does not fork daemon process into the background.
	# debug-mode: no

	# listen on IPv4 connections
	# do-ip4: yes

	# listen on IPv6 connections
	# do-ip6: yes

	# port to answer queries on. default is 53.
	# port: 53

	# Verbosity level.
	# verbosity: 0

	# After binding socket, drop user privileges.
	# can be a username, id or id.gid.
	# username: @user@

	# Run NSD in a chroot-jail.
	# make sure to have pidfile and database reachable from there.
	# by default, no chroot-jail is used.
	# chroot: "@configdir@"

	# The directory for zonefile: files.  The daemon chdirs here.
	# zonesdir: "@zonesdir@"
	
	# the list of dynamically added zones.
	# zonelistfile: "@zonelistfile@"

	# the database to use
	# if set to "" then no disk-database is used, less memory usage.
	# database: "@dbfile@"

	# log messages to file. Default to stderr and syslog (with
	# facility LOG_DAEMON).  stderr disappears when daemon goes to bg.
	# logfile: "@logfile@"

	# File to store pid for nsd in.
	# pidfile: "@pidfile@"

	# The file where secondary zone refresh and expire timeouts are kept.
	# If you delete this file, all secondary zones are forced to be 
	# 'refreshing' (as if nsd got a notify).  Set to "" to disable.
	# xfrdfile: "@xfrdfile@"

	# The directory where zone transfers are stored, in a subdir of it.
	# xfrdir: "@xfrdir@"

	# don't answer VERSION.BIND and VERSION.SERVER CHAOS class queries
	# hide-version: no

	# version string the server responds with for chaos queries.
	# default is 'NSD x.y.z' with the server's version number.
	# version: "NSD"

	# identify the server (CH TXT ID.SERVER entry).
	# identity: "unidentified server"

	# NSID identity (hex string, or "ascii_somestring"). default disabled.
	# nsid: "aabbccdd"

	# Maximum number of concurrent TCP connections per server.
	# tcp-count: 100

	# Maximum number of queries served on a single TCP connection.
	# By default 0, which means no maximum.
	# tcp-query-count: 0

	# Override the default (120 seconds) TCP timeout.
	# tcp-timeout: 120

	# Preferred EDNS buffer size for IPv4.
	# ipv4-edns-size: 4096

	# Preferred EDNS buffer size for IPv6.
	# ipv6-edns-size: 4096

	# statistics are produced every number of seconds. Prints to log.
	# Default is 0, meaning no statistics are produced.
	# statistics: 3600

	# Number of seconds between reloads triggered by xfrd.
	# xfrd-reload-timeout: 1
	
	# log timestamp in ascii (y-m-d h:m:s.msec), yes is default.
	# log-time-ascii: yes

	# round robin rotation of records in the answer.
	# round-robin: no

	# check mtime of all zone files on start and sighup
	# zonefiles-check: yes
	
	# write changed zonefiles to disk, every N seconds.
	# default is 0(disabled) or 3600(if database is "").
	# zonefiles-write: 3600

	# RRLconfig
	# Response Rate Limiting, size of the hashtable. Default 1000000.
	# rrl-size: 1000000

	# Response Rate Limiting, maximum QPS allowed (from one query source).
	# If set to 0, ratelimiting is disabled. Also set
	# rrl-whitelist-ratelimit to 0 to disable ratelimit processing.
	# Default is @ratelimit_default@.
	# rrl-ratelimit: 200

	# Response Rate Limiting, number of packets to discard before
	# sending a SLIP response (a truncated one, allowing an honest
	# resolver to retry with TCP). Default is 2 (one half of the
	# queries will receive a SLIP response, 0 disables SLIP (all
	# packets are discarded), 1 means every request will get a
	# SLIP response.  When the ratelimit is hit the traffic is
	# divided by the rrl-slip value.
	# rrl-slip: 2

	# Response Rate Limiting, IPv4 prefix length. Addresses are
	# grouped by netblock. 
	# rrl-ipv4-prefix-length: 24

	# Response Rate Limiting, IPv6 prefix length. Addresses are
	# grouped by netblock. 
	# rrl-ipv6-prefix-length: 64

	# Response Rate Limiting, maximum QPS allowed (from one query source)
	# for whitelisted types. Default is @ratelimit_default@.
	# rrl-whitelist-ratelimit: 2000
	# RRLend

database: /var/lib/nsd/nsd.db

remote-control:
        control-enable: yes
        control-interface: 127.0.0.1
        control-port: 8952
        server-key-file: "/etc/nsd/nsd_server.key"
        server-cert-file: "/etc/nsd/nsd_server.pem"
        control-key-file: "/etc/nsd/nsd_control.key"
        control-cert-file: "/etc/nsd/nsd_control.pem"

include: /etc/nsd/conf.d/*.conf