nsd.conf.sample.in revision 1.1.1.4
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	# refuse queries of type ANY.  For stopping floods.
139	# refuse-any: no
140
141	# check mtime of all zone files on start and sighup
142	# zonefiles-check: yes
143	
144	# write changed zonefiles to disk, every N seconds.
145	# default is 0(disabled) or 3600(if database is "").
146	# zonefiles-write: 3600
147
148	# RRLconfig
149	# Response Rate Limiting, size of the hashtable. Default 1000000.
150	# rrl-size: 1000000
151
152	# Response Rate Limiting, maximum QPS allowed (from one query source).
153	# If set to 0, ratelimiting is disabled. Also set
154	# rrl-whitelist-ratelimit to 0 to disable ratelimit processing.
155	# Default is @ratelimit_default@.
156	# rrl-ratelimit: 200
157
158	# Response Rate Limiting, number of packets to discard before
159	# sending a SLIP response (a truncated one, allowing an honest
160	# resolver to retry with TCP). Default is 2 (one half of the
161	# queries will receive a SLIP response, 0 disables SLIP (all
162	# packets are discarded), 1 means every request will get a
163	# SLIP response.  When the ratelimit is hit the traffic is
164	# divided by the rrl-slip value.
165	# rrl-slip: 2
166
167	# Response Rate Limiting, IPv4 prefix length. Addresses are
168	# grouped by netblock. 
169	# rrl-ipv4-prefix-length: 24
170
171	# Response Rate Limiting, IPv6 prefix length. Addresses are
172	# grouped by netblock. 
173	# rrl-ipv6-prefix-length: 64
174
175	# Response Rate Limiting, maximum QPS allowed (from one query source)
176	# for whitelisted types. Default is @ratelimit_default@.
177	# rrl-whitelist-ratelimit: 2000
178	# RRLend
179
180# DNSTAP config section, if compiled with that
181# dnstap:
182	# set this to yes and set one or more of dnstap-log-..-messages to yes.
183	# dnstap-enable: no
184	# dnstap-socket-path: "/var/run/dnstap.sock"
185	# dnstap-send-identity: no
186	# dnstap-send-version: no
187	# dnstap-identity: ""
188	# dnstap-version: ""
189	# dnstap-log-auth-query-messages: no
190	# dnstap-log-auth-response-messages: no
191
192# Remote control config section. 
193remote-control:
194	# Enable remote control with nsd-control(8) here.
195	# set up the keys and certificates with nsd-control-setup.
196	# control-enable: no
197
198	# what interfaces are listened to for control, default is on localhost.
199	# with an absolute path, a unix local named pipe is used for control
200	# (and key and cert files are not needed, use directory permissions).
201	# control-interface: 127.0.0.1
202	# control-interface: ::1
203
204	# port number for remote control operations (uses TLS over TCP).
205	# control-port: 8952
206
207	# nsd server key file for remote control.
208	# server-key-file: "@configdir@/nsd_server.key"
209
210	# nsd server certificate file for remote control.
211	# server-cert-file: "@configdir@/nsd_server.pem"
212
213	# nsd-control key file.
214	# control-key-file: "@configdir@/nsd_control.key"
215
216	# nsd-control certificate file.
217	# control-cert-file: "@configdir@/nsd_control.pem"
218
219
220# Secret keys for TSIGs that secure zone transfers.
221# You could include: "secret.keys" and put the 'key:' statements in there,
222# and give that file special access control permissions.
223#
224# key:
225	# The key name is sent to the other party, it must be the same
226	#name: "keyname"
227	# algorithm hmac-md5, or sha1, sha256, sha224, sha384, sha512
228	#algorithm: sha256
229	# secret material, must be the same as the other party uses.
230	# base64 encoded random number.
231	# e.g. from dd if=/dev/random of=/dev/stdout count=1 bs=32 | base64
232	#secret: "K2tf3TRjvQkVCmJF3/Z9vA=="
233
234
235# Patterns have zone configuration and they are shared by one or more zones.
236# 
237# pattern:
238	# name by which the pattern is referred to
239	#name: "myzones"
240	# the zonefile for the zones that use this pattern.
241	# if relative then from the zonesdir (inside the chroot).
242	# the name is processed: %s - zone name (as appears in zone:name).
243	# %1 - first character of zone name, %2 second, %3 third.
244	# %z - topleveldomain label of zone, %y, %x next labels in name.
245	# if label or character does not exist you get a dot '.'.
246	# for example "%s.zone" or "zones/%1/%2/%3/%s" or "secondary/%z/%s"
247	#zonefile: "%s.zone"
248	
249	# If no master and slave access control elements are provided,
250	# this zone will not be served to/from other servers.
251
252	# A master zone needs notify: and provide-xfr: lists.  A slave
253	# may also allow zone transfer (for debug or other secondaries).
254	# notify these slaves when the master zone changes, address TSIG|NOKEY
255	# IP can be ipv4 and ipv6, with @port for a nondefault port number.
256	#notify: 192.0.2.1 NOKEY
257	# allow these IPs and TSIG to transfer zones, addr TSIG|NOKEY|BLOCKED
258	# address range 192.0.2.0/24, 1.2.3.4&255.255.0.0, 3.0.2.20-3.0.2.40
259	#provide-xfr: 192.0.2.0/24 my_tsig_key_name
260	# set the number of retries for notify.
261	#notify-retry: 5
262
263	# uncomment to provide AXFR to all the world
264	# provide-xfr: 0.0.0.0/0 NOKEY
265	# provide-xfr: ::0/0 NOKEY
266
267	# A slave zone needs allow-notify: and request-xfr: lists.
268	#allow-notify: 2001:db8::0/64 my_tsig_key_name
269	# By default, a slave will request a zone transfer with IXFR/TCP.
270	# If you want to make use of IXFR/UDP use: UDP addr tsigkey
271	# for a master that only speaks AXFR (like NSD) use AXFR addr tsigkey
272	#request-xfr: 192.0.2.2 the_tsig_key_name
273	# Attention: You cannot use UDP and AXFR together. AXFR is always over 
274	# TCP. If you use UDP, we higly recommend you to deploy TSIG.
275	# Allow AXFR fallback if the master does not support IXFR. Default
276	# is yes.
277	#allow-axfr-fallback: yes
278	# set local interface for sending zone transfer requests.
279	# default is let the OS choose.
280	#outgoing-interface: 10.0.0.10
281	# limit the refresh and retry interval in seconds.
282	#max-refresh-time: 2419200
283	#min-refresh-time: 0
284	#max-retry-time: 1209600
285	#min-retry-time: 0
286	# Slave server tries zone transfer to all masters and picks highest
287	# zone version available, for when masters have different versions.
288	#multi-master-check: no
289
290	# limit the zone transfer size (in bytes), stops very large transfers
291	# 0 is no limits enforced.
292	# size-limit-xfr: 0
293
294	# if compiled with --enable-zone-stats, give name of stat block for
295	# this zone (or group of zones).  Output from nsd-control stats.
296	# zonestats: "%s"
297
298	# if you give another pattern name here, at this point the settings
299	# from that pattern are inserted into this one (as if it were a 
300	# macro).  The statement can be given in between other statements,
301	# because the order of access control elements can make a difference
302	# (which master to request from first, which slave to notify first).
303	#include-pattern: "common-masters"
304
305
306# Fixed zone entries.  Here you can config zones that cannot be deleted.
307# Zones that are dynamically added and deleted are put in the zonelist file.
308#
309# zone:
310 	# name: "example.com"
311 	# you can give a pattern here, all the settings from that pattern
312 	# are then inserted at this point
313 	# include-pattern: "master"
314 	# You can also specify (additional) options directly for this zone.
315 	# zonefile: "example.com.zone"
316 	# request-xfr: 192.0.2.1 example.com.key
317
318	# RRLconfig
319	# Response Rate Limiting, whitelist types
320	# rrl-whitelist: nxdomain
321	# rrl-whitelist: error
322	# rrl-whitelist: referral
323	# rrl-whitelist: any
324	# rrl-whitelist: rrsig
325	# rrl-whitelist: wildcard
326	# rrl-whitelist: nodata
327	# rrl-whitelist: dnskey
328	# rrl-whitelist: positive
329	# rrl-whitelist: all
330	# RRLend
331
332