nsd.conf.sample.in revision 1.1.1.2
1#
2# nsd.conf -- the NSD(8) configuration file, nsd.conf(5).
3#
4# Copyright (c) 2001-2011, NLnet Labs. All rights reserved.
5#
6# See LICENSE for the license.
7#
8
9# This is a comment.
10# Sample configuration file
11# include: "file" # include that file's text over here.  Globbed, "*.conf"
12
13# options for the nsd server
14server:
15	# Number of NSD servers to fork.  Put the number of CPUs to use here.
16	# server-count: 1
17
18	# uncomment to specify specific interfaces to bind (default are the
19	# wildcard interfaces 0.0.0.0 and ::0).
20	# For servers with multiple IP addresses, list them one by one,
21	# or the source address of replies could be wrong.
22	# Use ip-transparent to be able to list addresses that turn on later.
23	# ip-address: 1.2.3.4
24	# ip-address: 1.2.3.4@5678
25	# ip-address: 12fe::8ef0
26
27	# Allow binding to non local addresses. Default no.
28	# ip-transparent: no
29
30	# Allow binding to addresses that are down.  Default no.
31	# ip-freebind: no
32
33	# use the reuseport socket option for performance. Default no.
34	# reuseport: no
35
36	# enable debug mode, does not fork daemon process into the background.
37	# debug-mode: no
38
39	# listen on IPv4 connections
40	# do-ip4: yes
41
42	# listen on IPv6 connections
43	# do-ip6: yes
44
45	# port to answer queries on. default is 53.
46	# port: 53
47
48	# Verbosity level.
49	# verbosity: 0
50
51	# After binding socket, drop user privileges.
52	# can be a username, id or id.gid.
53	# username: @user@
54
55	# Run NSD in a chroot-jail.
56	# make sure to have pidfile and database reachable from there.
57	# by default, no chroot-jail is used.
58	# chroot: "@configdir@"
59
60	# The directory for zonefile: files.  The daemon chdirs here.
61	# zonesdir: "@zonesdir@"
62	
63	# the list of dynamically added zones.
64	# zonelistfile: "@zonelistfile@"
65
66	# the database to use
67	# if set to "" then no disk-database is used, less memory usage.
68	# database: "@dbfile@"
69
70	# log messages to file. Default to stderr and syslog (with
71	# facility LOG_DAEMON).  stderr disappears when daemon goes to bg.
72	# logfile: "@logfile@"
73
74	# File to store pid for nsd in.
75	# pidfile: "@pidfile@"
76
77	# The file where secondary zone refresh and expire timeouts are kept.
78	# If you delete this file, all secondary zones are forced to be 
79	# 'refreshing' (as if nsd got a notify).  Set to "" to disable.
80	# xfrdfile: "@xfrdfile@"
81
82	# The directory where zone transfers are stored, in a subdir of it.
83	# xfrdir: "@xfrdir@"
84
85	# don't answer VERSION.BIND and VERSION.SERVER CHAOS class queries
86	# hide-version: no
87
88	# version string the server responds with for chaos queries.
89	# default is 'NSD x.y.z' with the server's version number.
90	# version: "NSD"
91
92	# identify the server (CH TXT ID.SERVER entry).
93	# identity: "unidentified server"
94
95	# NSID identity (hex string, or "ascii_somestring"). default disabled.
96	# nsid: "aabbccdd"
97
98	# Maximum number of concurrent TCP connections per server.
99	# tcp-count: 100
100
101	# Maximum number of queries served on a single TCP connection.
102	# By default 0, which means no maximum.
103	# tcp-query-count: 0
104
105	# Override the default (120 seconds) TCP timeout.
106	# tcp-timeout: 120
107
108	# Maximum segment size (MSS) of TCP socket on which the server
109	# responds to queries. Default is 0, system default MSS.
110	# tcp-mss: 0
111
112	# Maximum segment size (MSS) of TCP socket for outgoing AXFR request.
113	# Default is 0, system default MSS.
114	# outgoing-tcp-mss: 0
115
116	# Preferred EDNS buffer size for IPv4.
117	# ipv4-edns-size: 4096
118
119	# Preferred EDNS buffer size for IPv6.
120	# ipv6-edns-size: 4096
121
122	# statistics are produced every number of seconds. Prints to log.
123	# Default is 0, meaning no statistics are produced.
124	# statistics: 3600
125
126	# Number of seconds between reloads triggered by xfrd.
127	# xfrd-reload-timeout: 1
128	
129	# log timestamp in ascii (y-m-d h:m:s.msec), yes is default.
130	# log-time-ascii: yes
131
132	# round robin rotation of records in the answer.
133	# round-robin: no
134
135	# minimal-responses only emits extra data for referrals.
136	# minimal-responses: no
137
138	# check mtime of all zone files on start and sighup
139	# zonefiles-check: yes
140	
141	# write changed zonefiles to disk, every N seconds.
142	# default is 0(disabled) or 3600(if database is "").
143	# zonefiles-write: 3600
144
145	# RRLconfig
146	# Response Rate Limiting, size of the hashtable. Default 1000000.
147	# rrl-size: 1000000
148
149	# Response Rate Limiting, maximum QPS allowed (from one query source).
150	# If set to 0, ratelimiting is disabled. Also set
151	# rrl-whitelist-ratelimit to 0 to disable ratelimit processing.
152	# Default is @ratelimit_default@.
153	# rrl-ratelimit: 200
154
155	# Response Rate Limiting, number of packets to discard before
156	# sending a SLIP response (a truncated one, allowing an honest
157	# resolver to retry with TCP). Default is 2 (one half of the
158	# queries will receive a SLIP response, 0 disables SLIP (all
159	# packets are discarded), 1 means every request will get a
160	# SLIP response.  When the ratelimit is hit the traffic is
161	# divided by the rrl-slip value.
162	# rrl-slip: 2
163
164	# Response Rate Limiting, IPv4 prefix length. Addresses are
165	# grouped by netblock. 
166	# rrl-ipv4-prefix-length: 24
167
168	# Response Rate Limiting, IPv6 prefix length. Addresses are
169	# grouped by netblock. 
170	# rrl-ipv6-prefix-length: 64
171
172	# Response Rate Limiting, maximum QPS allowed (from one query source)
173	# for whitelisted types. Default is @ratelimit_default@.
174	# rrl-whitelist-ratelimit: 2000
175	# RRLend
176
177# Remote control config section. 
178remote-control:
179	# Enable remote control with nsd-control(8) here.
180	# set up the keys and certificates with nsd-control-setup.
181	# control-enable: no
182
183	# what interfaces are listened to for control, default is on localhost.
184	# control-interface: 127.0.0.1
185	# control-interface: ::1
186
187	# port number for remote control operations (uses TLS over TCP).
188	# control-port: 8952
189
190	# nsd server key file for remote control.
191	# server-key-file: "@configdir@/nsd_server.key"
192
193	# nsd server certificate file for remote control.
194	# server-cert-file: "@configdir@/nsd_server.pem"
195
196	# nsd-control key file.
197	# control-key-file: "@configdir@/nsd_control.key"
198
199	# nsd-control certificate file.
200	# control-cert-file: "@configdir@/nsd_control.pem"
201
202
203# Secret keys for TSIGs that secure zone transfers.
204# You could include: "secret.keys" and put the 'key:' statements in there,
205# and give that file special access control permissions.
206#
207# key:
208	# The key name is sent to the other party, it must be the same
209	#name: "keyname"
210	# algorithm hmac-md5, or sha1, sha256, sha224, sha384, sha512
211	#algorithm: sha256
212	# secret material, must be the same as the other party uses.
213	# base64 encoded random number.
214	# e.g. from dd if=/dev/random of=/dev/stdout count=1 bs=32 | base64
215	#secret: "K2tf3TRjvQkVCmJF3/Z9vA=="
216
217
218# Patterns have zone configuration and they are shared by one or more zones.
219# 
220# pattern:
221	# name by which the pattern is referred to
222	#name: "myzones"
223	# the zonefile for the zones that use this pattern.
224	# if relative then from the zonesdir (inside the chroot).
225	# the name is processed: %s - zone name (as appears in zone:name).
226	# %1 - first character of zone name, %2 second, %3 third.
227	# %z - topleveldomain label of zone, %y, %x next labels in name.
228	# if label or character does not exist you get a dot '.'.
229	# for example "%s.zone" or "zones/%1/%2/%3/%s" or "secondary/%z/%s"
230	#zonefile: "%s.zone"
231	
232	# If no master and slave access control elements are provided,
233	# this zone will not be served to/from other servers.
234
235	# A master zone needs notify: and provide-xfr: lists.  A slave
236	# may also allow zone transfer (for debug or other secondaries).
237	# notify these slaves when the master zone changes, address TSIG|NOKEY
238	# IP can be ipv4 and ipv6, with @port for a nondefault port number.
239	#notify: 192.0.2.1 NOKEY
240	# allow these IPs and TSIG to transfer zones, addr TSIG|NOKEY|BLOCKED
241	# address range 192.0.2.0/24, 1.2.3.4&255.255.0.0, 3.0.2.20-3.0.2.40
242	#provide-xfr: 192.0.2.0/24 my_tsig_key_name
243	# set the number of retries for notify.
244	#notify-retry: 5
245
246	# uncomment to provide AXFR to all the world
247	# provide-xfr: 0.0.0.0/0 NOKEY
248	# provide-xfr: ::0/0 NOKEY
249
250	# A slave zone needs allow-notify: and request-xfr: lists.
251	#allow-notify: 2001:db8::0/64 my_tsig_key_name
252	# By default, a slave will request a zone transfer with IXFR/TCP.
253	# If you want to make use of IXFR/UDP use: UDP addr tsigkey
254	# for a master that only speaks AXFR (like NSD) use AXFR addr tsigkey
255	#request-xfr: 192.0.2.2 the_tsig_key_name
256	# Attention: You cannot use UDP and AXFR together. AXFR is always over 
257	# TCP. If you use UDP, we higly recommend you to deploy TSIG.
258	# Allow AXFR fallback if the master does not support IXFR. Default
259	# is yes.
260	#allow-axfr-fallback: yes
261	# set local interface for sending zone transfer requests.
262	# default is let the OS choose.
263	#outgoing-interface: 10.0.0.10
264	# limit the refresh and retry interval in seconds.
265	#max-refresh-time: 2419200
266	#min-refresh-time: 0
267	#max-retry-time: 1209600
268	#min-retry-time: 0
269	# Slave server tries zone transfer to all masters and picks highest
270	# zone version available, for when masters have different versions.
271	#multi-master-check: no
272
273	# limit the zone transfer size (in bytes), stops very large transfers
274	# 0 is no limits enforced.
275	# size-limit-xfr: 0
276
277	# if compiled with --enable-zone-stats, give name of stat block for
278	# this zone (or group of zones).  Output from nsd-control stats.
279	# zonestats: "%s"
280
281	# if you give another pattern name here, at this point the settings
282	# from that pattern are inserted into this one (as if it were a 
283	# macro).  The statement can be given in between other statements,
284	# because the order of access control elements can make a difference
285	# (which master to request from first, which slave to notify first).
286	#include-pattern: "common-masters"
287
288
289# Fixed zone entries.  Here you can config zones that cannot be deleted.
290# Zones that are dynamically added and deleted are put in the zonelist file.
291#
292# zone:
293 	# name: "example.com"
294 	# you can give a pattern here, all the settings from that pattern
295 	# are then inserted at this point
296 	# include-pattern: "master"
297 	# You can also specify (additional) options directly for this zone.
298 	# zonefile: "example.com.zone"
299 	# request-xfr: 192.0.2.1 example.com.key
300
301	# RRLconfig
302	# Response Rate Limiting, whitelist types
303	# rrl-whitelist: nxdomain
304	# rrl-whitelist: error
305	# rrl-whitelist: referral
306	# rrl-whitelist: any
307	# rrl-whitelist: rrsig
308	# rrl-whitelist: wildcard
309	# rrl-whitelist: nodata
310	# rrl-whitelist: dnskey
311	# rrl-whitelist: positive
312	# rrl-whitelist: all
313	# RRLend
314
315