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