2 - Copyright (C) 2004-2009, 2011, 2013-2015 Internet Systems Consortium, Inc. ("ISC")
3 - Copyright (C) 2000-2003 Internet Software Consortium.
5 - Permission to use, copy, modify, and/or distribute this software for any
6 - purpose with or without fee is hereby granted, provided that the above
7 - copyright notice and this permission notice appear in all copies.
9 - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10 - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11 - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12 - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13 - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14 - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15 - PERFORMANCE OF THIS SOFTWARE.
19 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
20 <title>dnssec-signzone</title>
21 <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
23 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry">
24 <a name="man.dnssec-signzone"></a><div class="titlepage"></div>
25 <div class="refnamediv">
27 <p><span class="application">dnssec-signzone</span> — DNSSEC zone signing tool</p>
29 <div class="refsynopsisdiv">
31 <div class="cmdsynopsis"><p><code class="command">dnssec-signzone</code> [<code class="option">-a</code>] [<code class="option">-c <em class="replaceable"><code>class</code></em></code>] [<code class="option">-d <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-D</code>] [<code class="option">-E <em class="replaceable"><code>engine</code></em></code>] [<code class="option">-e <em class="replaceable"><code>end-time</code></em></code>] [<code class="option">-f <em class="replaceable"><code>output-file</code></em></code>] [<code class="option">-g</code>] [<code class="option">-h</code>] [<code class="option">-K <em class="replaceable"><code>directory</code></em></code>] [<code class="option">-k <em class="replaceable"><code>key</code></em></code>] [<code class="option">-L <em class="replaceable"><code>serial</code></em></code>] [<code class="option">-l <em class="replaceable"><code>domain</code></em></code>] [<code class="option">-i <em class="replaceable"><code>interval</code></em></code>] [<code class="option">-I <em class="replaceable"><code>input-format</code></em></code>] [<code class="option">-j <em class="replaceable"><code>jitter</code></em></code>] [<code class="option">-N <em class="replaceable"><code>soa-serial-format</code></em></code>] [<code class="option">-o <em class="replaceable"><code>origin</code></em></code>] [<code class="option">-O <em class="replaceable"><code>output-format</code></em></code>] [<code class="option">-P</code>] [<code class="option">-p</code>] [<code class="option">-R</code>] [<code class="option">-r <em class="replaceable"><code>randomdev</code></em></code>] [<code class="option">-S</code>] [<code class="option">-s <em class="replaceable"><code>start-time</code></em></code>] [<code class="option">-T <em class="replaceable"><code>ttl</code></em></code>] [<code class="option">-t</code>] [<code class="option">-u</code>] [<code class="option">-v <em class="replaceable"><code>level</code></em></code>] [<code class="option">-V</code>] [<code class="option">-X <em class="replaceable"><code>extended end-time</code></em></code>] [<code class="option">-x</code>] [<code class="option">-z</code>] [<code class="option">-3 <em class="replaceable"><code>salt</code></em></code>] [<code class="option">-H <em class="replaceable"><code>iterations</code></em></code>] [<code class="option">-A</code>] {zonefile} [key...]</p></div>
33 <div class="refsection">
34 <a name="id-1.7"></a><h2>DESCRIPTION</h2>
35 <p><span class="command"><strong>dnssec-signzone</strong></span>
36 signs a zone. It generates
37 NSEC and RRSIG records and produces a signed version of the
38 zone. The security status of delegations from the signed zone
39 (that is, whether the child zones are secure or not) is
40 determined by the presence or absence of a
41 <code class="filename">keyset</code> file for each child zone.
44 <div class="refsection">
45 <a name="id-1.8"></a><h2>OPTIONS</h2>
46 <div class="variablelist"><dl class="variablelist">
47 <dt><span class="term">-a</span></dt>
49 Verify all generated signatures.
51 <dt><span class="term">-c <em class="replaceable"><code>class</code></em></span></dt>
53 Specifies the DNS class of the zone.
55 <dt><span class="term">-C</span></dt>
57 Compatibility mode: Generate a
58 <code class="filename">keyset-<em class="replaceable"><code>zonename</code></em></code>
60 <code class="filename">dsset-<em class="replaceable"><code>zonename</code></em></code>
61 when signing a zone, for use by older versions of
62 <span class="command"><strong>dnssec-signzone</strong></span>.
64 <dt><span class="term">-d <em class="replaceable"><code>directory</code></em></span></dt>
66 Look for <code class="filename">dsset-</code> or
67 <code class="filename">keyset-</code> files in <code class="option">directory</code>.
69 <dt><span class="term">-D</span></dt>
71 Output only those record types automatically managed by
72 <span class="command"><strong>dnssec-signzone</strong></span>, i.e. RRSIG, NSEC,
73 NSEC3 and NSEC3PARAM records. If smart signing
74 (<code class="option">-S</code>) is used, DNSKEY records are also
75 included. The resulting file can be included in the original
76 zone file with <span class="command"><strong>$INCLUDE</strong></span>. This option
77 cannot be combined with <code class="option">-O raw</code> or serial
80 <dt><span class="term">-E <em class="replaceable"><code>engine</code></em></span></dt>
82 Uses a crypto hardware (OpenSSL engine) for the crypto operations
83 it supports, for instance signing with private keys from
84 a secure key store. When compiled with PKCS#11 support
85 it defaults to pkcs11; the empty name resets it to no engine.
87 <dt><span class="term">-g</span></dt>
89 Generate DS records for child zones from
90 <code class="filename">dsset-</code> or <code class="filename">keyset-</code>
91 file. Existing DS records will be removed.
93 <dt><span class="term">-K <em class="replaceable"><code>directory</code></em></span></dt>
95 Key repository: Specify a directory to search for DNSSEC keys.
96 If not specified, defaults to the current directory.
98 <dt><span class="term">-k <em class="replaceable"><code>key</code></em></span></dt>
100 Treat specified key as a key signing key ignoring any
101 key flags. This option may be specified multiple times.
103 <dt><span class="term">-l <em class="replaceable"><code>domain</code></em></span></dt>
105 Generate a DLV set in addition to the key (DNSKEY) and DS sets.
106 The domain is appended to the name of the records.
108 <dt><span class="term">-s <em class="replaceable"><code>start-time</code></em></span></dt>
110 Specify the date and time when the generated RRSIG records
111 become valid. This can be either an absolute or relative
112 time. An absolute start time is indicated by a number
113 in YYYYMMDDHHMMSS notation; 20000530144500 denotes
114 14:45:00 UTC on May 30th, 2000. A relative start time is
115 indicated by +N, which is N seconds from the current time.
116 If no <code class="option">start-time</code> is specified, the current
117 time minus 1 hour (to allow for clock skew) is used.
119 <dt><span class="term">-e <em class="replaceable"><code>end-time</code></em></span></dt>
121 Specify the date and time when the generated RRSIG records
122 expire. As with <code class="option">start-time</code>, an absolute
123 time is indicated in YYYYMMDDHHMMSS notation. A time relative
124 to the start time is indicated with +N, which is N seconds from
125 the start time. A time relative to the current time is
126 indicated with now+N. If no <code class="option">end-time</code> is
127 specified, 30 days from the start time is used as a default.
128 <code class="option">end-time</code> must be later than
129 <code class="option">start-time</code>.
131 <dt><span class="term">-X <em class="replaceable"><code>extended end-time</code></em></span></dt>
134 Specify the date and time when the generated RRSIG records
135 for the DNSKEY RRset will expire. This is to be used in cases
136 when the DNSKEY signatures need to persist longer than
137 signatures on other records; e.g., when the private component
138 of the KSK is kept offline and the KSK signature is to be
142 As with <code class="option">start-time</code>, an absolute
143 time is indicated in YYYYMMDDHHMMSS notation. A time relative
144 to the start time is indicated with +N, which is N seconds from
145 the start time. A time relative to the current time is
146 indicated with now+N. If no <code class="option">extended end-time</code> is
147 specified, the value of <code class="option">end-time</code> is used as
148 the default. (<code class="option">end-time</code>, in turn, defaults to
149 30 days from the start time.) <code class="option">extended end-time</code>
150 must be later than <code class="option">start-time</code>.
153 <dt><span class="term">-f <em class="replaceable"><code>output-file</code></em></span></dt>
155 The name of the output file containing the signed zone. The
156 default is to append <code class="filename">.signed</code> to
157 the input filename. If <code class="option">output-file</code> is
158 set to <code class="literal">"-"</code>, then the signed zone is
159 written to the standard output, with a default output
162 <dt><span class="term">-h</span></dt>
164 Prints a short summary of the options and arguments to
165 <span class="command"><strong>dnssec-signzone</strong></span>.
167 <dt><span class="term">-V</span></dt>
169 Prints version information.
171 <dt><span class="term">-i <em class="replaceable"><code>interval</code></em></span></dt>
174 When a previously-signed zone is passed as input, records
175 may be resigned. The <code class="option">interval</code> option
176 specifies the cycle interval as an offset from the current
177 time (in seconds). If a RRSIG record expires after the
178 cycle interval, it is retained. Otherwise, it is considered
179 to be expiring soon, and it will be replaced.
182 The default cycle interval is one quarter of the difference
183 between the signature end and start times. So if neither
184 <code class="option">end-time</code> or <code class="option">start-time</code>
185 are specified, <span class="command"><strong>dnssec-signzone</strong></span>
187 signatures that are valid for 30 days, with a cycle
188 interval of 7.5 days. Therefore, if any existing RRSIG records
189 are due to expire in less than 7.5 days, they would be
193 <dt><span class="term">-I <em class="replaceable"><code>input-format</code></em></span></dt>
195 The format of the input zone file.
196 Possible formats are <span class="command"><strong>"text"</strong></span> (default)
197 and <span class="command"><strong>"raw"</strong></span>.
198 This option is primarily intended to be used for dynamic
199 signed zones so that the dumped zone file in a non-text
200 format containing updates can be signed directly.
201 The use of this option does not make much sense for
204 <dt><span class="term">-j <em class="replaceable"><code>jitter</code></em></span></dt>
207 When signing a zone with a fixed signature lifetime, all
208 RRSIG records issued at the time of signing expires
209 simultaneously. If the zone is incrementally signed, i.e.
210 a previously-signed zone is passed as input to the signer,
211 all expired signatures have to be regenerated at about the
212 same time. The <code class="option">jitter</code> option specifies a
213 jitter window that will be used to randomize the signature
214 expire time, thus spreading incremental signature
215 regeneration over time.
218 Signature lifetime jitter also to some extent benefits
219 validators and servers by spreading out cache expiration,
220 i.e. if large numbers of RRSIGs don't expire at the same time
221 from all caches there will be less congestion than if all
222 validators need to refetch at mostly the same time.
225 <dt><span class="term">-L <em class="replaceable"><code>serial</code></em></span></dt>
227 When writing a signed zone to 'raw' format, set the "source serial"
228 value in the header to the specified serial number. (This is
229 expected to be used primarily for testing purposes.)
231 <dt><span class="term">-n <em class="replaceable"><code>ncpus</code></em></span></dt>
233 Specifies the number of threads to use. By default, one
234 thread is started for each detected CPU.
236 <dt><span class="term">-N <em class="replaceable"><code>soa-serial-format</code></em></span></dt>
239 The SOA serial number format of the signed zone.
240 Possible formats are <span class="command"><strong>"keep"</strong></span> (default),
241 <span class="command"><strong>"increment"</strong></span> and
242 <span class="command"><strong>"unixtime"</strong></span>.
244 <div class="variablelist"><dl class="variablelist">
245 <dt><span class="term"><span class="command"><strong>"keep"</strong></span></span></dt>
246 <dd><p>Do not modify the SOA serial number.</p></dd>
247 <dt><span class="term"><span class="command"><strong>"increment"</strong></span></span></dt>
248 <dd><p>Increment the SOA serial number using RFC 1982
249 arithmetics.</p></dd>
250 <dt><span class="term"><span class="command"><strong>"unixtime"</strong></span></span></dt>
251 <dd><p>Set the SOA serial number to the number of seconds
252 since epoch.</p></dd>
255 <dt><span class="term">-o <em class="replaceable"><code>origin</code></em></span></dt>
257 The zone origin. If not specified, the name of the zone file
258 is assumed to be the origin.
260 <dt><span class="term">-O <em class="replaceable"><code>output-format</code></em></span></dt>
262 The format of the output file containing the signed zone.
263 Possible formats are <span class="command"><strong>"text"</strong></span> (default)
264 <span class="command"><strong>"full"</strong></span>, which is text output in a
265 format suitable for processing by external scripts,
266 and <span class="command"><strong>"raw"</strong></span> or <span class="command"><strong>"raw=N"</strong></span>,
267 which store the zone in a binary format for rapid loading
268 by <span class="command"><strong>named</strong></span>. <span class="command"><strong>"raw=N"</strong></span>
269 specifies the format version of the raw zone file: if N
270 is 0, the raw file can be read by any version of
271 <span class="command"><strong>named</strong></span>; if N is 1, the file can be
272 read by release 9.9.0 or higher. The default is 1.
274 <dt><span class="term">-p</span></dt>
276 Use pseudo-random data when signing the zone. This is faster,
277 but less secure, than using real random data. This option
278 may be useful when signing large zones or when the entropy
281 <dt><span class="term">-P</span></dt>
284 Disable post sign verification tests.
287 The post sign verification test ensures that for each algorithm
288 in use there is at least one non revoked self signed KSK key,
289 that all revoked KSK keys are self signed, and that all records
290 in the zone are signed by the algorithm.
291 This option skips these tests.
294 <dt><span class="term">-Q</span></dt>
297 Remove signatures from keys that are no longer active.
300 Normally, when a previously-signed zone is passed as input
301 to the signer, and a DNSKEY record has been removed and
302 replaced with a new one, signatures from the old key
303 that are still within their validity period are retained.
304 This allows the zone to continue to validate with cached
305 copies of the old DNSKEY RRset. The <code class="option">-Q</code>
306 forces <span class="command"><strong>dnssec-signzone</strong></span> to remove
307 signatures from keys that are no longer active. This
308 enables ZSK rollover using the procedure described in
309 RFC 4641, section 4.2.1.1 ("Pre-Publish Key Rollover").
312 <dt><span class="term">-R</span></dt>
315 Remove signatures from keys that are no longer published.
318 This option is similar to <code class="option">-Q</code>, except it
319 forces <span class="command"><strong>dnssec-signzone</strong></span> to signatures from
320 keys that are no longer published. This enables ZSK rollover
321 using the procedure described in RFC 4641, section 4.2.1.2
322 ("Double Signature Zone Signing Key Rollover").
325 <dt><span class="term">-r <em class="replaceable"><code>randomdev</code></em></span></dt>
327 Specifies the source of randomness. If the operating
328 system does not provide a <code class="filename">/dev/random</code>
329 or equivalent device, the default source of randomness
330 is keyboard input. <code class="filename">randomdev</code>
332 the name of a character device or file containing random
333 data to be used instead of the default. The special value
334 <code class="filename">keyboard</code> indicates that keyboard
335 input should be used.
337 <dt><span class="term">-S</span></dt>
340 Smart signing: Instructs <span class="command"><strong>dnssec-signzone</strong></span> to
341 search the key repository for keys that match the zone being
342 signed, and to include them in the zone if appropriate.
345 When a key is found, its timing metadata is examined to
346 determine how it should be used, according to the following
347 rules. Each successive rule takes priority over the prior
350 <div class="variablelist"><dl class="variablelist">
353 If no timing metadata has been set for the key, the key is
354 published in the zone and used to sign the zone.
358 If the key's publication date is set and is in the past, the
359 key is published in the zone.
363 If the key's activation date is set and in the past, the
364 key is published (regardless of publication date) and
365 used to sign the zone.
369 If the key's revocation date is set and in the past, and the
370 key is published, then the key is revoked, and the revoked key
371 is used to sign the zone.
375 If either of the key's unpublication or deletion dates are set
376 and in the past, the key is NOT published or used to sign the
377 zone, regardless of any other metadata.
381 <dt><span class="term">-T <em class="replaceable"><code>ttl</code></em></span></dt>
383 Specifies a TTL to be used for new DNSKEY records imported
384 into the zone from the key repository. If not
385 specified, the default is the TTL value from the zone's SOA
386 record. This option is ignored when signing without
387 <code class="option">-S</code>, since DNSKEY records are not imported
388 from the key repository in that case. It is also ignored if
389 there are any pre-existing DNSKEY records at the zone apex,
390 in which case new records' TTL values will be set to match
391 them, or if any of the imported DNSKEY records had a default
392 TTL value. In the event of a a conflict between TTL values in
393 imported keys, the shortest one is used.
395 <dt><span class="term">-t</span></dt>
397 Print statistics at completion.
399 <dt><span class="term">-u</span></dt>
401 Update NSEC/NSEC3 chain when re-signing a previously signed
402 zone. With this option, a zone signed with NSEC can be
403 switched to NSEC3, or a zone signed with NSEC3 can
404 be switch to NSEC or to NSEC3 with different parameters.
405 Without this option, <span class="command"><strong>dnssec-signzone</strong></span> will
406 retain the existing chain when re-signing.
408 <dt><span class="term">-v <em class="replaceable"><code>level</code></em></span></dt>
410 Sets the debugging level.
412 <dt><span class="term">-x</span></dt>
414 Only sign the DNSKEY RRset with key-signing keys, and omit
415 signatures from zone-signing keys. (This is similar to the
416 <span class="command"><strong>dnssec-dnskey-kskonly yes;</strong></span> zone option in
417 <span class="command"><strong>named</strong></span>.)
419 <dt><span class="term">-z</span></dt>
421 Ignore KSK flag on key when determining what to sign. This
422 causes KSK-flagged keys to sign all records, not just the
423 DNSKEY RRset. (This is similar to the
424 <span class="command"><strong>update-check-ksk no;</strong></span> zone option in
425 <span class="command"><strong>named</strong></span>.)
427 <dt><span class="term">-3 <em class="replaceable"><code>salt</code></em></span></dt>
429 Generate an NSEC3 chain with the given hex encoded salt.
430 A dash (<em class="replaceable"><code>salt</code></em>) can
431 be used to indicate that no salt is to be used when generating the NSEC3 chain.
433 <dt><span class="term">-H <em class="replaceable"><code>iterations</code></em></span></dt>
435 When generating an NSEC3 chain, use this many iterations. The
438 <dt><span class="term">-A</span></dt>
441 When generating an NSEC3 chain set the OPTOUT flag on all
442 NSEC3 records and do not generate NSEC3 records for insecure
446 Using this option twice (i.e., <code class="option">-AA</code>)
447 turns the OPTOUT flag off for all records. This is useful
448 when using the <code class="option">-u</code> option to modify an NSEC3
449 chain which previously had OPTOUT set.
452 <dt><span class="term">zonefile</span></dt>
454 The file containing the zone to be signed.
456 <dt><span class="term">key</span></dt>
458 Specify which keys should be used to sign the zone. If
459 no keys are specified, then the zone will be examined
460 for DNSKEY records at the zone apex. If these are found and
461 there are matching private keys, in the current directory,
462 then these will be used for signing.
466 <div class="refsection">
467 <a name="id-1.9"></a><h2>EXAMPLE</h2>
469 The following command signs the <strong class="userinput"><code>example.com</code></strong>
470 zone with the DSA key generated by <span class="command"><strong>dnssec-keygen</strong></span>
471 (Kexample.com.+003+17247). Because the <span class="command"><strong>-S</strong></span> option
472 is not being used, the zone's keys must be in the master file
473 (<code class="filename">db.example.com</code>). This invocation looks
474 for <code class="filename">dsset</code> files, in the current directory,
475 so that DS records can be imported from them (<span class="command"><strong>-g</strong></span>).
477 <pre class="programlisting">% dnssec-signzone -g -o example.com db.example.com \
478 Kexample.com.+003+17247
479 db.example.com.signed
482 In the above example, <span class="command"><strong>dnssec-signzone</strong></span> creates
483 the file <code class="filename">db.example.com.signed</code>. This
484 file should be referenced in a zone statement in a
485 <code class="filename">named.conf</code> file.
488 This example re-signs a previously signed zone with default parameters.
489 The private keys are assumed to be in the current directory.
491 <pre class="programlisting">% cp db.example.com.signed db.example.com
492 % dnssec-signzone -o example.com db.example.com
493 db.example.com.signed
496 <div class="refsection">
497 <a name="id-1.10"></a><h2>SEE ALSO</h2>
498 <p><span class="citerefentry"><span class="refentrytitle">dnssec-keygen</span>(8)</span>,
499 <em class="citetitle">BIND 9 Administrator Reference Manual</em>,
500 <em class="citetitle">RFC 4033</em>, <em class="citetitle">RFC 4641</em>.