Update repub branch u/fanf2/patch to rebasing branch u/fanf2/rebasing revision v9_15_...
[ipreg/bind9.git] / bin / dnssec / dnssec-signzone.8
1 .\" Copyright (C) 2000-2009, 2011-2019 Internet Systems Consortium, Inc. ("ISC")
2 .\"
3 .\" This Source Code Form is subject to the terms of the Mozilla Public
4 .\" License, v. 2.0. If a copy of the MPL was not distributed with this
5 .\" file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 .\"
7 .hy 0
8 .ad l
9 '\" t
10 .\" Title: dnssec-signzone
11 .\" Author:
12 .\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
13 .\" Date: 2014-02-18
14 .\" Manual: BIND9
15 .\" Source: ISC
16 .\" Language: English
17 .\"
18 .TH "DNSSEC\-SIGNZONE" "8" "2014\-02\-18" "ISC" "BIND9"
19 .\" -----------------------------------------------------------------
20 .\" * Define some portability stuff
21 .\" -----------------------------------------------------------------
22 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
23 .\" http://bugs.debian.org/507673
24 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
25 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26 .ie \n(.g .ds Aq \(aq
27 .el .ds Aq '
28 .\" -----------------------------------------------------------------
29 .\" * set default formatting
30 .\" -----------------------------------------------------------------
31 .\" disable hyphenation
32 .nh
33 .\" disable justification (adjust text to left margin only)
34 .ad l
35 .\" -----------------------------------------------------------------
36 .\" * MAIN CONTENT STARTS HERE *
37 .\" -----------------------------------------------------------------
38 .SH "NAME"
39 dnssec-signzone \- DNSSEC zone signing tool
40 .SH "SYNOPSIS"
41 .HP \w'\fBdnssec\-signzone\fR\ 'u
42 \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\-i\ \fR\fB\fIinterval\fR\fR] [\fB\-I\ \fR\fB\fIinput\-format\fR\fR] [\fB\-j\ \fR\fB\fIjitter\fR\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\-M\ \fR\fB\fImaxttl\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\-Q\fR] [\fB\-R\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\-V\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...]
43 .SH "DESCRIPTION"
44 .PP
45 \fBdnssec\-signzone\fR
46 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
47 keyset
48 file for each child zone\&.
49 .SH "OPTIONS"
50 .PP
51 \-a
52 .RS 4
53 Verify all generated signatures\&.
54 .RE
55 .PP
56 \-c \fIclass\fR
57 .RS 4
58 Specifies the DNS class of the zone\&.
59 .RE
60 .PP
61 \-C
62 .RS 4
63 Compatibility mode: Generate a
64 keyset\-\fIzonename\fR
65 file in addition to
66 dsset\-\fIzonename\fR
67 when signing a zone, for use by older versions of
68 \fBdnssec\-signzone\fR\&.
69 .RE
70 .PP
71 \-d \fIdirectory\fR
72 .RS 4
73 Look for
74 dsset\-
75 or
76 keyset\-
77 files in
78 \fBdirectory\fR\&.
79 .RE
80 .PP
81 \-D
82 .RS 4
83 Output only those record types automatically managed by
84 \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
85 \fB$INCLUDE\fR\&. This option cannot be combined with
86 \fB\-O raw\fR,
87 \fB\-O map\fR, or serial number updating\&.
88 .RE
89 .PP
90 \-E \fIengine\fR
91 .RS 4
92 When applicable, specifies the hardware to use for cryptographic operations, such as a secure key store used for signing\&.
93 .sp
94 When BIND is built with OpenSSL PKCS#11 support, this defaults to the string "pkcs11", which identifies an OpenSSL engine that can drive a cryptographic accelerator or hardware service module\&. When BIND is built with native PKCS#11 cryptography (\-\-enable\-native\-pkcs11), it defaults to the path of the PKCS#11 provider library specified via "\-\-with\-pkcs11"\&.
95 .RE
96 .PP
97 \-g
98 .RS 4
99 Generate DS records for child zones from
100 dsset\-
101 or
102 keyset\-
103 file\&. Existing DS records will be removed\&.
104 .RE
105 .PP
106 \-K \fIdirectory\fR
107 .RS 4
108 Key repository: Specify a directory to search for DNSSEC keys\&. If not specified, defaults to the current directory\&.
109 .RE
110 .PP
111 \-k \fIkey\fR
112 .RS 4
113 Treat specified key as a key signing key ignoring any key flags\&. This option may be specified multiple times\&.
114 .RE
115 .PP
116 \-l \fIdomain\fR
117 .RS 4
118 Generate a DLV set in addition to the key (DNSKEY) and DS sets\&. The domain is appended to the name of the records\&.
119 .RE
120 .PP
121 \-M \fImaxttl\fR
122 .RS 4
123 Sets the maximum TTL for the signed zone\&. Any TTL higher than
124 \fImaxttl\fR
125 in the input zone will be reduced to
126 \fImaxttl\fR
127 in the output\&. This provides certainty as to the largest possible TTL in the signed zone, which is useful to know when rolling keys because it is the longest possible time before signatures that have been retrieved by resolvers will expire from resolver caches\&. Zones that are signed with this option should be configured to use a matching
128 \fBmax\-zone\-ttl\fR
129 in
130 named\&.conf\&. (Note: This option is incompatible with
131 \fB\-D\fR, because it modifies non\-DNSSEC data in the output zone\&.)
132 .RE
133 .PP
134 \-s \fIstart\-time\fR
135 .RS 4
136 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
137 \fBstart\-time\fR
138 is specified, the current time minus 1 hour (to allow for clock skew) is used\&.
139 .RE
140 .PP
141 \-e \fIend\-time\fR
142 .RS 4
143 Specify the date and time when the generated RRSIG records expire\&. As with
144 \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
145 \fBend\-time\fR
146 is specified, 30 days from the start time is used as a default\&.
147 \fBend\-time\fR
148 must be later than
149 \fBstart\-time\fR\&.
150 .RE
151 .PP
152 \-X \fIextended end\-time\fR
153 .RS 4
154 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\&.
155 .sp
156 As with
157 \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
158 \fBextended end\-time\fR
159 is specified, the value of
160 \fBend\-time\fR
161 is used as the default\&. (\fBend\-time\fR, in turn, defaults to 30 days from the start time\&.)
162 \fBextended end\-time\fR
163 must be later than
164 \fBstart\-time\fR\&.
165 .RE
166 .PP
167 \-f \fIoutput\-file\fR
168 .RS 4
169 The name of the output file containing the signed zone\&. The default is to append
170 \&.signed
171 to the input filename\&. If
172 \fBoutput\-file\fR
173 is set to
174 "\-", then the signed zone is written to the standard output, with a default output format of "full"\&.
175 .RE
176 .PP
177 \-h
178 .RS 4
179 Prints a short summary of the options and arguments to
180 \fBdnssec\-signzone\fR\&.
181 .RE
182 .PP
183 \-V
184 .RS 4
185 Prints version information\&.
186 .RE
187 .PP
188 \-i \fIinterval\fR
189 .RS 4
190 When a previously\-signed zone is passed as input, records may be resigned\&. The
191 \fBinterval\fR
192 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\&.
193 .sp
194 The default cycle interval is one quarter of the difference between the signature end and start times\&. So if neither
195 \fBend\-time\fR
196 or
197 \fBstart\-time\fR
198 are specified,
199 \fBdnssec\-signzone\fR
200 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\&.
201 .RE
202 .PP
203 \-I \fIinput\-format\fR
204 .RS 4
205 The format of the input zone file\&. Possible formats are
206 \fB"text"\fR
207 (default),
208 \fB"raw"\fR, and
209 \fB"map"\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\&.
210 .RE
211 .PP
212 \-j \fIjitter\fR
213 .RS 4
214 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
215 \fBjitter\fR
216 option specifies a jitter window that will be used to randomize the signature expire time, thus spreading incremental signature regeneration over time\&.
217 .sp
218 Signature lifetime jitter also to some extent benefits validators and servers by spreading out cache expiration, i\&.e\&. if large numbers of RRSIGs don\*(Aqt 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\&.
219 .RE
220 .PP
221 \-L \fIserial\fR
222 .RS 4
223 When writing a signed zone to "raw" or "map" format, set the "source serial" value in the header to the specified serial number\&. (This is expected to be used primarily for testing purposes\&.)
224 .RE
225 .PP
226 \-n \fIncpus\fR
227 .RS 4
228 Specifies the number of threads to use\&. By default, one thread is started for each detected CPU\&.
229 .RE
230 .PP
231 \-N \fIsoa\-serial\-format\fR
232 .RS 4
233 The SOA serial number format of the signed zone\&. Possible formats are
234 \fB"keep"\fR
235 (default),
236 \fB"increment"\fR,
237 \fB"unixtime"\fR, and
238 \fB"date"\fR\&.
239 .PP
240 \fB"keep"\fR
241 .RS 4
242 Do not modify the SOA serial number\&.
243 .RE
244 .PP
245 \fB"increment"\fR
246 .RS 4
247 Increment the SOA serial number using RFC 1982 arithmetics\&.
248 .RE
249 .PP
250 \fB"unixtime"\fR
251 .RS 4
252 Set the SOA serial number to the number of seconds since epoch\&.
253 .RE
254 .PP
255 \fB"date"\fR
256 .RS 4
257 Set the SOA serial number to today\*(Aqs date in YYYYMMDDNN format\&.
258 .RE
259 .RE
260 .PP
261 \-o \fIorigin\fR
262 .RS 4
263 The zone origin\&. If not specified, the name of the zone file is assumed to be the origin\&.
264 .RE
265 .PP
266 \-O \fIoutput\-format\fR
267 .RS 4
268 The format of the output file containing the signed zone\&. Possible formats are
269 \fB"text"\fR
270 (default), which is the standard textual representation of the zone;
271 \fB"full"\fR, which is text output in a format suitable for processing by external scripts; and
272 \fB"map"\fR,
273 \fB"raw"\fR, and
274 \fB"raw=N"\fR, which store the zone in binary formats for rapid loading by
275 \fBnamed\fR\&.
276 \fB"raw=N"\fR
277 specifies the format version of the raw zone file: if N is 0, the raw file can be read by any version of
278 \fBnamed\fR; if N is 1, the file can be read by release 9\&.9\&.0 or higher; the default is 1\&.
279 .RE
280 .PP
281 \-P
282 .RS 4
283 Disable post sign verification tests\&.
284 .sp
285 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\&.
286 .RE
287 .PP
288 \-Q
289 .RS 4
290 Remove signatures from keys that are no longer active\&.
291 .sp
292 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
293 \fB\-Q\fR
294 forces
295 \fBdnssec\-signzone\fR
296 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")\&.
297 .RE
298 .PP
299 \-R
300 .RS 4
301 Remove signatures from keys that are no longer published\&.
302 .sp
303 This option is similar to
304 \fB\-Q\fR, except it forces
305 \fBdnssec\-signzone\fR
306 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")\&.
307 .RE
308 .PP
309 \-S
310 .RS 4
311 Smart signing: Instructs
312 \fBdnssec\-signzone\fR
313 to search the key repository for keys that match the zone being signed, and to include them in the zone if appropriate\&.
314 .sp
315 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:
316 .PP
317 .RS 4
318 If no timing metadata has been set for the key, the key is published in the zone and used to sign the zone\&.
319 .RE
320 .PP
321 .RS 4
322 If the key\*(Aqs publication date is set and is in the past, the key is published in the zone\&.
323 .RE
324 .PP
325 .RS 4
326 If the key\*(Aqs activation date is set and in the past, the key is published (regardless of publication date) and used to sign the zone\&.
327 .RE
328 .PP
329 .RS 4
330 If the key\*(Aqs 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\&.
331 .RE
332 .PP
333 .RS 4
334 If either of the key\*(Aqs 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\&.
335 .RE
336 .PP
337 .RS 4
338 If key\*(Aqs sync publication date is set and in the past, synchronization records (type CDS and/or CDNSKEY) are created\&.
339 .RE
340 .PP
341 .RS 4
342 If key\*(Aqs sync deletion date is set and in the past, synchronization records (type CDS and/or CDNSKEY) are removed\&.
343 .RE
344 .RE
345 .PP
346 \-T \fIttl\fR
347 .RS 4
348 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\*(Aqs SOA record\&. This option is ignored when signing without
349 \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\*(Aq 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\&.
350 .RE
351 .PP
352 \-t
353 .RS 4
354 Print statistics at completion\&.
355 .RE
356 .PP
357 \-u
358 .RS 4
359 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,
360 \fBdnssec\-signzone\fR
361 will retain the existing chain when re\-signing\&.
362 .RE
363 .PP
364 \-v \fIlevel\fR
365 .RS 4
366 Sets the debugging level\&.
367 .RE
368 .PP
369 \-x
370 .RS 4
371 Only sign the DNSKEY, CDNSKEY, and CDS RRsets with key\-signing keys, and omit signatures from zone\-signing keys\&. (This is similar to the
372 \fBdnssec\-dnskey\-kskonly yes;\fR
373 zone option in
374 \fBnamed\fR\&.)
375 .RE
376 .PP
377 \-z
378 .RS 4
379 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
380 \fBupdate\-check\-ksk no;\fR
381 zone option in
382 \fBnamed\fR\&.)
383 .RE
384 .PP
385 \-3 \fIsalt\fR
386 .RS 4
387 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\&.
388 .RE
389 .PP
390 \-H \fIiterations\fR
391 .RS 4
392 When generating an NSEC3 chain, use this many iterations\&. The default is 10\&.
393 .RE
394 .PP
395 \-A
396 .RS 4
397 When generating an NSEC3 chain set the OPTOUT flag on all NSEC3 records and do not generate NSEC3 records for insecure delegations\&.
398 .sp
399 Using this option twice (i\&.e\&.,
400 \fB\-AA\fR) turns the OPTOUT flag off for all records\&. This is useful when using the
401 \fB\-u\fR
402 option to modify an NSEC3 chain which previously had OPTOUT set\&.
403 .RE
404 .PP
405 zonefile
406 .RS 4
407 The file containing the zone to be signed\&.
408 .RE
409 .PP
410 key
411 .RS 4
412 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\&.
413 .RE
414 .SH "EXAMPLE"
415 .PP
416 The following command signs the
417 \fBexample\&.com\fR
418 zone with the ECDSAP256SHA256 key generated by key generated by
419 \fBdnssec\-keygen\fR
420 (Kexample\&.com\&.+013+17247)\&. Because the
421 \fB\-S\fR
422 option is not being used, the zone\*(Aqs keys must be in the master file (db\&.example\&.com)\&. This invocation looks for
423 dsset
424 files, in the current directory, so that DS records can be imported from them (\fB\-g\fR)\&.
425 .sp
426 .if n \{\
427 .RS 4
428 .\}
429 .nf
430 % dnssec\-signzone \-g \-o example\&.com db\&.example\&.com \e
431 Kexample\&.com\&.+013+17247
432 db\&.example\&.com\&.signed
433 %
434 .fi
435 .if n \{\
436 .RE
437 .\}
438 .PP
439 In the above example,
440 \fBdnssec\-signzone\fR
441 creates the file
442 db\&.example\&.com\&.signed\&. This file should be referenced in a zone statement in a
443 named\&.conf
444 file\&.
445 .PP
446 This example re\-signs a previously signed zone with default parameters\&. The private keys are assumed to be in the current directory\&.
447 .sp
448 .if n \{\
449 .RS 4
450 .\}
451 .nf
452 % cp db\&.example\&.com\&.signed db\&.example\&.com
453 % dnssec\-signzone \-o example\&.com db\&.example\&.com
454 db\&.example\&.com\&.signed
455 %
456 .fi
457 .if n \{\
458 .RE
459 .\}
460 .SH "SEE ALSO"
461 .PP
462 \fBdnssec-keygen\fR(8),
463 BIND 9 Administrator Reference Manual,
464 RFC 4033,
465 RFC 4641\&.
466 .SH "AUTHOR"
467 .PP
468 \fBInternet Systems Consortium, Inc\&.\fR
469 .SH "COPYRIGHT"
470 .br
471 Copyright \(co 2000-2009, 2011-2019 Internet Systems Consortium, Inc. ("ISC")
472 .br