]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/blob - contrib/bind9/bin/dnssec/dnssec-signzone.8
MFV 262445:
[FreeBSD/stable/9.git] / contrib / bind9 / bin / dnssec / dnssec-signzone.8
1 .\" Copyright (C) 2004-2009, 2011, 2013 Internet Systems Consortium, Inc. ("ISC")
2 .\" Copyright (C) 2000-2003 Internet Software Consortium.
3 .\" 
4 .\" Permission to use, copy, modify, and/or distribute this software for any
5 .\" purpose with or without fee is hereby granted, provided that the above
6 .\" copyright notice and this permission notice appear in all copies.
7 .\" 
8 .\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
9 .\" REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10 .\" AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
11 .\" INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12 .\" LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
13 .\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14 .\" PERFORMANCE OF THIS SOFTWARE.
15 .\"
16 .\" $Id$
17 .\"
18 .hy 0
19 .ad l
20 .\"     Title: dnssec\-signzone
21 .\"    Author: 
22 .\" Generator: DocBook XSL Stylesheets v1.71.1 <http://docbook.sf.net/>
23 .\"      Date: June 05, 2009
24 .\"    Manual: BIND9
25 .\"    Source: BIND9
26 .\"
27 .TH "DNSSEC\-SIGNZONE" "8" "June 05, 2009" "BIND9" "BIND9"
28 .\" disable hyphenation
29 .nh
30 .\" disable justification (adjust text to left margin only)
31 .ad l
32 .SH "NAME"
33 dnssec\-signzone \- DNSSEC zone signing tool
34 .SH "SYNOPSIS"
35 .HP 16
36 \fBdnssec\-signzone\fR [\fB\-a\fR] [\fB\-c\ \fR\fB\fIclass\fR\fR] [\fB\-d\ \fR\fB\fIdirectory\fR\fR] [\fB\-D\fR] [\fB\-E\ \fR\fB\fIengine\fR\fR] [\fB\-e\ \fR\fB\fIend\-time\fR\fR] [\fB\-f\ \fR\fB\fIoutput\-file\fR\fR] [\fB\-g\fR] [\fB\-h\fR] [\fB\-K\ \fR\fB\fIdirectory\fR\fR] [\fB\-k\ \fR\fB\fIkey\fR\fR] [\fB\-L\ \fR\fB\fIserial\fR\fR] [\fB\-l\ \fR\fB\fIdomain\fR\fR] [\fB\-i\ \fR\fB\fIinterval\fR\fR] [\fB\-I\ \fR\fB\fIinput\-format\fR\fR] [\fB\-j\ \fR\fB\fIjitter\fR\fR] [\fB\-N\ \fR\fB\fIsoa\-serial\-format\fR\fR] [\fB\-o\ \fR\fB\fIorigin\fR\fR] [\fB\-O\ \fR\fB\fIoutput\-format\fR\fR] [\fB\-P\fR] [\fB\-p\fR] [\fB\-R\fR] [\fB\-r\ \fR\fB\fIrandomdev\fR\fR] [\fB\-S\fR] [\fB\-s\ \fR\fB\fIstart\-time\fR\fR] [\fB\-T\ \fR\fB\fIttl\fR\fR] [\fB\-t\fR] [\fB\-u\fR] [\fB\-v\ \fR\fB\fIlevel\fR\fR] [\fB\-X\ \fR\fB\fIextended\ end\-time\fR\fR] [\fB\-x\fR] [\fB\-z\fR] [\fB\-3\ \fR\fB\fIsalt\fR\fR] [\fB\-H\ \fR\fB\fIiterations\fR\fR] [\fB\-A\fR] {zonefile} [key...]
37 .SH "DESCRIPTION"
38 .PP
39 \fBdnssec\-signzone\fR
40 signs a zone. It generates NSEC and RRSIG records and produces a signed version of the zone. The security status of delegations from the signed zone (that is, whether the child zones are secure or not) is determined by the presence or absence of a
41 \fIkeyset\fR
42 file for each child zone.
43 .SH "OPTIONS"
44 .PP
45 \-a
46 .RS 4
47 Verify all generated signatures.
48 .RE
49 .PP
50 \-c \fIclass\fR
51 .RS 4
52 Specifies the DNS class of the zone.
53 .RE
54 .PP
55 \-C
56 .RS 4
57 Compatibility mode: Generate a
58 \fIkeyset\-\fR\fI\fIzonename\fR\fR
59 file in addition to
60 \fIdsset\-\fR\fI\fIzonename\fR\fR
61 when signing a zone, for use by older versions of
62 \fBdnssec\-signzone\fR.
63 .RE
64 .PP
65 \-d \fIdirectory\fR
66 .RS 4
67 Look for
68 \fIdsset\-\fR
69 or
70 \fIkeyset\-\fR
71 files in
72 \fBdirectory\fR.
73 .RE
74 .PP
75 \-D
76 .RS 4
77 Output only those record types automatically managed by
78 \fBdnssec\-signzone\fR, i.e. RRSIG, NSEC, NSEC3 and NSEC3PARAM records. If smart signing (\fB\-S\fR) is used, DNSKEY records are also included. The resulting file can be included in the original zone file with
79 \fB$INCLUDE\fR. This option cannot be combined with
80 \fB\-O raw\fR
81 or serial number updating.
82 .RE
83 .PP
84 \-E \fIengine\fR
85 .RS 4
86 Uses a crypto hardware (OpenSSL engine) for the crypto operations it supports, for instance signing with private keys from a secure key store. When compiled with PKCS#11 support it defaults to pkcs11; the empty name resets it to no engine.
87 .RE
88 .PP
89 \-g
90 .RS 4
91 Generate DS records for child zones from
92 \fIdsset\-\fR
93 or
94 \fIkeyset\-\fR
95 file. Existing DS records will be removed.
96 .RE
97 .PP
98 \-K \fIdirectory\fR
99 .RS 4
100 Key repository: Specify a directory to search for DNSSEC keys. If not specified, defaults to the current directory.
101 .RE
102 .PP
103 \-k \fIkey\fR
104 .RS 4
105 Treat specified key as a key signing key ignoring any key flags. This option may be specified multiple times.
106 .RE
107 .PP
108 \-l \fIdomain\fR
109 .RS 4
110 Generate a DLV set in addition to the key (DNSKEY) and DS sets. The domain is appended to the name of the records.
111 .RE
112 .PP
113 \-s \fIstart\-time\fR
114 .RS 4
115 Specify the date and time when the generated RRSIG records become valid. This can be either an absolute or relative time. An absolute start time is indicated by a number in YYYYMMDDHHMMSS notation; 20000530144500 denotes 14:45:00 UTC on May 30th, 2000. A relative start time is indicated by +N, which is N seconds from the current time. If no
116 \fBstart\-time\fR
117 is specified, the current time minus 1 hour (to allow for clock skew) is used.
118 .RE
119 .PP
120 \-e \fIend\-time\fR
121 .RS 4
122 Specify the date and time when the generated RRSIG records expire. As with
123 \fBstart\-time\fR, an absolute time is indicated in YYYYMMDDHHMMSS notation. A time relative to the start time is indicated with +N, which is N seconds from the start time. A time relative to the current time is indicated with now+N. If no
124 \fBend\-time\fR
125 is specified, 30 days from the start time is used as a default.
126 \fBend\-time\fR
127 must be later than
128 \fBstart\-time\fR.
129 .RE
130 .PP
131 \-X \fIextended end\-time\fR
132 .RS 4
133 Specify the date and time when the generated RRSIG records for the DNSKEY RRset will expire. This is to be used in cases when the DNSKEY signatures need to persist longer than signatures on other records; e.g., when the private component of the KSK is kept offline and the KSK signature is to be refreshed manually.
134 .sp
135 As with
136 \fBstart\-time\fR, an absolute time is indicated in YYYYMMDDHHMMSS notation. A time relative to the start time is indicated with +N, which is N seconds from the start time. A time relative to the current time is indicated with now+N. If no
137 \fBextended end\-time\fR
138 is specified, the value of
139 \fBend\-time\fR
140 is used as the default. (\fBend\-time\fR, in turn, defaults to 30 days from the start time.)
141 \fBextended end\-time\fR
142 must be later than
143 \fBstart\-time\fR.
144 .RE
145 .PP
146 \-f \fIoutput\-file\fR
147 .RS 4
148 The name of the output file containing the signed zone. The default is to append
149 \fI.signed\fR
150 to the input filename. If
151 \fBoutput\-file\fR
152 is set to
153 "\-", then the signed zone is written to the standard output, with a default output format of "full".
154 .RE
155 .PP
156 \-h
157 .RS 4
158 Prints a short summary of the options and arguments to
159 \fBdnssec\-signzone\fR.
160 .RE
161 .PP
162 \-i \fIinterval\fR
163 .RS 4
164 When a previously\-signed zone is passed as input, records may be resigned. The
165 \fBinterval\fR
166 option specifies the cycle interval as an offset from the current time (in seconds). If a RRSIG record expires after the cycle interval, it is retained. Otherwise, it is considered to be expiring soon, and it will be replaced.
167 .sp
168 The default cycle interval is one quarter of the difference between the signature end and start times. So if neither
169 \fBend\-time\fR
170 or
171 \fBstart\-time\fR
172 are specified,
173 \fBdnssec\-signzone\fR
174 generates signatures that are valid for 30 days, with a cycle interval of 7.5 days. Therefore, if any existing RRSIG records are due to expire in less than 7.5 days, they would be replaced.
175 .RE
176 .PP
177 \-I \fIinput\-format\fR
178 .RS 4
179 The format of the input zone file. Possible formats are
180 \fB"text"\fR
181 (default) and
182 \fB"raw"\fR. This option is primarily intended to be used for dynamic signed zones so that the dumped zone file in a non\-text format containing updates can be signed directly. The use of this option does not make much sense for non\-dynamic zones.
183 .RE
184 .PP
185 \-j \fIjitter\fR
186 .RS 4
187 When signing a zone with a fixed signature lifetime, all RRSIG records issued at the time of signing expires simultaneously. If the zone is incrementally signed, i.e. a previously\-signed zone is passed as input to the signer, all expired signatures have to be regenerated at about the same time. The
188 \fBjitter\fR
189 option specifies a jitter window that will be used to randomize the signature expire time, thus spreading incremental signature regeneration over time.
190 .sp
191 Signature lifetime jitter also to some extent benefits validators and servers by spreading out cache expiration, i.e. if large numbers of RRSIGs don't expire at the same time from all caches there will be less congestion than if all validators need to refetch at mostly the same time.
192 .RE
193 .PP
194 \-L \fIserial\fR
195 .RS 4
196 When writing a signed zone to 'raw' format, set the "source serial" value in the header to the specified serial number. (This is expected to be used primarily for testing purposes.)
197 .RE
198 .PP
199 \-n \fIncpus\fR
200 .RS 4
201 Specifies the number of threads to use. By default, one thread is started for each detected CPU.
202 .RE
203 .PP
204 \-N \fIsoa\-serial\-format\fR
205 .RS 4
206 The SOA serial number format of the signed zone. Possible formats are
207 \fB"keep"\fR
208 (default),
209 \fB"increment"\fR
210 and
211 \fB"unixtime"\fR.
212 .RS 4
213 .PP
214 \fB"keep"\fR
215 .RS 4
216 Do not modify the SOA serial number.
217 .RE
218 .PP
219 \fB"increment"\fR
220 .RS 4
221 Increment the SOA serial number using RFC 1982 arithmetics.
222 .RE
223 .PP
224 \fB"unixtime"\fR
225 .RS 4
226 Set the SOA serial number to the number of seconds since epoch.
227 .RE
228 .RE
229 .RE
230 .PP
231 \-o \fIorigin\fR
232 .RS 4
233 The zone origin. If not specified, the name of the zone file is assumed to be the origin.
234 .RE
235 .PP
236 \-O \fIoutput\-format\fR
237 .RS 4
238 The format of the output file containing the signed zone. Possible formats are
239 \fB"text"\fR
240 (default)
241 \fB"full"\fR, which is text output in a format suitable for processing by external scripts, and
242 \fB"raw"\fR
243 or
244 \fB"raw=N"\fR, which store the zone in a binary format for rapid loading by
245 \fBnamed\fR.
246 \fB"raw=N"\fR
247 specifies the format version of the raw zone file: if N is 0, the raw file can be read by any version of
248 \fBnamed\fR; if N is 1, the file can be read by release 9.9.0 or higher. The default is 1.
249 .RE
250 .PP
251 \-p
252 .RS 4
253 Use pseudo\-random data when signing the zone. This is faster, but less secure, than using real random data. This option may be useful when signing large zones or when the entropy source is limited.
254 .RE
255 .PP
256 \-P
257 .RS 4
258 Disable post sign verification tests.
259 .sp
260 The post sign verification test ensures that for each algorithm in use there is at least one non revoked self signed KSK key, that all revoked KSK keys are self signed, and that all records in the zone are signed by the algorithm. This option skips these tests.
261 .RE
262 .PP
263 \-Q
264 .RS 4
265 Remove signatures from keys that are no longer active.
266 .sp
267 Normally, when a previously\-signed zone is passed as input to the signer, and a DNSKEY record has been removed and replaced with a new one, signatures from the old key that are still within their validity period are retained. This allows the zone to continue to validate with cached copies of the old DNSKEY RRset. The
268 \fB\-Q\fR
269 forces
270 \fBdnssec\-signzone\fR
271 to remove signatures from keys that are no longer active. This enables ZSK rollover using the procedure described in RFC 4641, section 4.2.1.1 ("Pre\-Publish Key Rollover").
272 .RE
273 .PP
274 \-R
275 .RS 4
276 Remove signatures from keys that are no longer published.
277 .sp
278 This option is similar to
279 \fB\-Q\fR, except it forces
280 \fBdnssec\-signzone\fR
281 to signatures from keys that are no longer published. This enables ZSK rollover using the procedure described in RFC 4641, section 4.2.1.2 ("Double Signature Zone Signing Key Rollover").
282 .RE
283 .PP
284 \-r \fIrandomdev\fR
285 .RS 4
286 Specifies the source of randomness. If the operating system does not provide a
287 \fI/dev/random\fR
288 or equivalent device, the default source of randomness is keyboard input.
289 \fIrandomdev\fR
290 specifies the name of a character device or file containing random data to be used instead of the default. The special value
291 \fIkeyboard\fR
292 indicates that keyboard input should be used.
293 .RE
294 .PP
295 \-S
296 .RS 4
297 Smart signing: Instructs
298 \fBdnssec\-signzone\fR
299 to search the key repository for keys that match the zone being signed, and to include them in the zone if appropriate.
300 .sp
301 When a key is found, its timing metadata is examined to determine how it should be used, according to the following rules. Each successive rule takes priority over the prior ones:
302 .RS 4
303 .PP
304 .RS 4
305 If no timing metadata has been set for the key, the key is published in the zone and used to sign the zone.
306 .RE
307 .PP
308 .RS 4
309 If the key's publication date is set and is in the past, the key is published in the zone.
310 .RE
311 .PP
312 .RS 4
313 If the key's activation date is set and in the past, the key is published (regardless of publication date) and used to sign the zone.
314 .RE
315 .PP
316 .RS 4
317 If the key's revocation date is set and in the past, and the key is published, then the key is revoked, and the revoked key is used to sign the zone.
318 .RE
319 .PP
320 .RS 4
321 If either of the key's unpublication or deletion dates are set and in the past, the key is NOT published or used to sign the zone, regardless of any other metadata.
322 .RE
323 .RE
324 .RE
325 .PP
326 \-T \fIttl\fR
327 .RS 4
328 Specifies a TTL to be used for new DNSKEY records imported into the zone from the key repository. If not specified, the default is the TTL value from the zone's SOA record. This option is ignored when signing without
329 \fB\-S\fR, since DNSKEY records are not imported from the key repository in that case. It is also ignored if there are any pre\-existing DNSKEY records at the zone apex, in which case new records' TTL values will be set to match them, or if any of the imported DNSKEY records had a default TTL value. In the event of a a conflict between TTL values in imported keys, the shortest one is used.
330 .RE
331 .PP
332 \-t
333 .RS 4
334 Print statistics at completion.
335 .RE
336 .PP
337 \-u
338 .RS 4
339 Update NSEC/NSEC3 chain when re\-signing a previously signed zone. With this option, a zone signed with NSEC can be switched to NSEC3, or a zone signed with NSEC3 can be switch to NSEC or to NSEC3 with different parameters. Without this option,
340 \fBdnssec\-signzone\fR
341 will retain the existing chain when re\-signing.
342 .RE
343 .PP
344 \-v \fIlevel\fR
345 .RS 4
346 Sets the debugging level.
347 .RE
348 .PP
349 \-x
350 .RS 4
351 Only sign the DNSKEY RRset with key\-signing keys, and omit signatures from zone\-signing keys. (This is similar to the
352 \fBdnssec\-dnskey\-kskonly yes;\fR
353 zone option in
354 \fBnamed\fR.)
355 .RE
356 .PP
357 \-z
358 .RS 4
359 Ignore KSK flag on key when determining what to sign. This causes KSK\-flagged keys to sign all records, not just the DNSKEY RRset. (This is similar to the
360 \fBupdate\-check\-ksk no;\fR
361 zone option in
362 \fBnamed\fR.)
363 .RE
364 .PP
365 \-3 \fIsalt\fR
366 .RS 4
367 Generate an NSEC3 chain with the given hex encoded salt. A dash (\fIsalt\fR) can be used to indicate that no salt is to be used when generating the NSEC3 chain.
368 .RE
369 .PP
370 \-H \fIiterations\fR
371 .RS 4
372 When generating an NSEC3 chain, use this many iterations. The default is 10.
373 .RE
374 .PP
375 \-A
376 .RS 4
377 When generating an NSEC3 chain set the OPTOUT flag on all NSEC3 records and do not generate NSEC3 records for insecure delegations.
378 .sp
379 Using this option twice (i.e.,
380 \fB\-AA\fR) turns the OPTOUT flag off for all records. This is useful when using the
381 \fB\-u\fR
382 option to modify an NSEC3 chain which previously had OPTOUT set.
383 .RE
384 .PP
385 zonefile
386 .RS 4
387 The file containing the zone to be signed.
388 .RE
389 .PP
390 key
391 .RS 4
392 Specify which keys should be used to sign the zone. If no keys are specified, then the zone will be examined for DNSKEY records at the zone apex. If these are found and there are matching private keys, in the current directory, then these will be used for signing.
393 .RE
394 .SH "EXAMPLE"
395 .PP
396 The following command signs the
397 \fBexample.com\fR
398 zone with the DSA key generated by
399 \fBdnssec\-keygen\fR
400 (Kexample.com.+003+17247). Because the
401 \fB\-S\fR
402 option is not being used, the zone's keys must be in the master file (\fIdb.example.com\fR). This invocation looks for
403 \fIdsset\fR
404 files, in the current directory, so that DS records can be imported from them (\fB\-g\fR).
405 .sp
406 .RS 4
407 .nf
408 % dnssec\-signzone \-g \-o example.com db.example.com \\
409 Kexample.com.+003+17247
410 db.example.com.signed
411 %
412 .fi
413 .RE
414 .PP
415 In the above example,
416 \fBdnssec\-signzone\fR
417 creates the file
418 \fIdb.example.com.signed\fR. This file should be referenced in a zone statement in a
419 \fInamed.conf\fR
420 file.
421 .PP
422 This example re\-signs a previously signed zone with default parameters. The private keys are assumed to be in the current directory.
423 .sp
424 .RS 4
425 .nf
426 % cp db.example.com.signed db.example.com
427 % dnssec\-signzone \-o example.com db.example.com
428 db.example.com.signed
429 %
430 .fi
431 .RE
432 .SH "SEE ALSO"
433 .PP
434 \fBdnssec\-keygen\fR(8),
435 BIND 9 Administrator Reference Manual,
436 RFC 4033,
437 RFC 4641.
438 .SH "AUTHOR"
439 .PP
440 Internet Systems Consortium
441 .SH "COPYRIGHT"
442 Copyright \(co 2004\-2009, 2011, 2013 Internet Systems Consortium, Inc. ("ISC")
443 .br
444 Copyright \(co 2000\-2003 Internet Software Consortium.
445 .br