update to 9.7.1-P2
[tridge/bind9.git] / contrib / zkt / man / dnssec-zkt.8
1 .TH dnssec-zkt 8 "August 1, 2009" "ZKT 0.99b" ""
2 \" turn off hyphenation
3 .\"     if n .nh
4 .nh
5 .SH NAME
6 dnssec-zkt \(em Secure DNS zone key tool 
7
8 .SH SYNOPSYS
9 .na
10 .B dnssec-zkt
11 .RB [ \-V|--view
12 .IR "view" ]
13 .RB [ \-c
14 .IR "file" ]
15 .RB [ \-l
16 .IR "list" ]
17 .RB [ \-adefhkLrptz ]
18 .RI [{ keyfile | dir }
19 .RI "" ... ]
20
21 .B dnssec-zkt
22 .BR \-C <label>
23 .RB [ \-V|--view
24 .IR "view" ]
25 .RB [ \-c
26 .IR "file" ]
27 .RB [ \-krpz ]
28 .RI [{ keyfile | dir }
29 .RI "" ... ]
30 .br
31 .B dnssec-zkt
32 .BR \-\-create= <label>
33 .RB [ \-V|--view
34 .IR "view" ]
35 .RB [ \-c
36 .IR "file" ]
37 .RB [ \-krpz ]
38 .RI [{ keyfile | dir }
39 .RI "" ... ]
40
41 .B dnssec-zkt
42 .BR \-  { P | A | D | R } <keytag>
43 .RB [ \-V|--view
44 .IR "view" ]
45 .RB [ \-c
46 .IR "file" ]
47 .RB [ \-r ]
48 .RI [{ keyfile | dir }
49 .RI "" ... ]
50 .br
51 .B dnssec-zkt
52 .BR \-\-published= <keytag>
53 .RB [ \-V|--view
54 .IR "view" ]
55 .RB [ \-c
56 .IR "file" ]
57 .RB [ \-r ]
58 .RI [{ keyfile | dir }
59 .RI "" ... ]
60 .br
61 .B dnssec-zkt
62 .BR \-\-active= <keytag>
63 .RB [ \-V|--view
64 .IR "view" ]
65 .RB [ \-c
66 .IR "file" ]
67 .RB [ \-r ]
68 .RI [{ keyfile | dir }
69 .RI "" ... ]
70 .br
71 .B dnssec-zkt
72 .BR \-\-depreciate= <keytag>
73 .RB [ \-V|--view
74 .IR "view" ]
75 .RB [ \-c
76 .IR "file" ]
77 .RB [ \-r ]
78 .RI [{ keyfile | dir }
79 .RI "" ... ]
80 .br
81 .B dnssec-zkt
82 .BR \-\-rename= <keytag>
83 .RB [ \-V|--view
84 .IR "view" ]
85 .RB [ \-c
86 .IR "file" ]
87 .RB [ \-r ]
88 .RI [{ keyfile | dir }
89 .RI "" ... ]
90
91 .B dnssec-zkt
92 .BR \-\-destroy= <keytag>
93 .RB [ \-V|--view
94 .IR "view" ]
95 .RB [ \-c
96 .IR "file" ]
97 .RB [ \-r ]
98 .RI [{ keyfile | dir }
99 .RI "" ... ]
100
101 .B dnssec-zkt
102 .B \-T
103 .RB [ \-V|--view
104 .IR "view" ]
105 .RB [ \-c
106 .IR "file" ]
107 .RB [ \-l
108 .IR "list" ]
109 .RB [ \-hr ]
110 .RI [{ keyfile | dir }
111 .RI "" ... ]
112 .br
113 .B dnssec-zkt
114 .B \-\-list-trustedkeys
115 .RB [ \-V|--view
116 .IR "view" ]
117 .RB [ \-c
118 .IR "file" ]
119 .RB [ \-l
120 .IR "list" ]
121 .RB [ \-hr ]
122 .RI [{ keyfile | dir }
123 .RI "" ... ]
124
125 .B dnssec-zkt
126 .B \-K
127 .RB [ \-V|--view
128 .IR "view" ]
129 .RB [ \-c
130 .IR "file" ]
131 .RB [ \-l
132 .IR "list" ]
133 .RB [ \-hkzr ]
134 .RI [{ keyfile | dir }
135 .RI "" ... ]
136 .br
137 .B dnssec-zkt
138 .B \-\-list-dnskeys
139 .RB [ \-V|--view
140 .IR "view" ]
141 .RB [ \-c
142 .IR "file" ]
143 .RB [ \-l
144 .IR "list" ]
145 .RB [ \-hkzr ]
146 .RI [{ keyfile | dir }
147 .RI "" ... ]
148
149 .B dnssec-zkt
150 .B \-Z
151 .RB [ \-V|--view
152 .IR "view" ]
153 .RB [ \-c
154 .IR "file" ]
155 .br
156 .B dnssec-zkt
157 .B \-\-zone-config
158 .RB [ \-V|--view
159 .IR "view" ]
160 .RB [ \-c
161 .IR "file" ]
162
163 .B dnssec-zkt
164 .B \-9 | \-\-ksk-rollover
165 .br
166 .B dnssec-zkt
167 .B \-1 | \-\-ksk-roll-phase1
168 .I "do.ma.in."
169 .RB [ \-V|--view
170 .IR "view" ]
171 .RB [ \-c
172 .IR "file" ]
173 .br
174 .B dnssec-zkt
175 .B \-2 | \-\-ksk-roll-phase2
176 .I "do.ma.in."
177 .RB [ \-V|--view
178 .IR "view" ]
179 .RB [ \-c
180 .IR "file" ]
181 .br
182 .B dnssec-zkt
183 .B \-3 | \-\-ksk-roll-phase3
184 .I do.ma.in.
185 .RB [ \-V|--view
186 .IR "view" ]
187 .RB [ \-c
188 .IR "file" ]
189 .br
190 .B dnssec-zkt
191 .B \-0 | \-\-ksk-roll-stat
192 .I do.ma.in.
193 .RB [ \-V|--view
194 .IR "view" ]
195 .RB [ \-c
196 .IR "file" ]
197 .br
198 .ad
199
200 .SH DESCRIPTION
201 The 
202 .I dnssec-zkt
203 command is a wrapper around 
204 .I dnssec-keygen(8)
205 to assist in dnssec zone key management.
206 .PP
207 In the common usage the command prints out information about
208 all dnssec (zone) keys found in the given (or predefined default) directory.
209 It is also possible to specify keyfiles (K*.key) as arguments.
210 With option
211 .B \-r
212 subdirectories will be searched recursively, and all dnssec keys found
213 will be listed sorted by domain name, key type and generation time.
214 In that mode the use of the
215 .B \-p
216 option may be helpful to find the location of the keyfile in the directory tree.
217 .PP
218 Other forms of the command print out keys in a format suitable for
219 a trusted-key section or as a DNSKEY resource record.
220 .PP
221 The command is also useful in dns key management.
222 It offers monitoring of key lifetime and modification of key status.
223
224 .SH GENERAL OPTIONS
225 .TP
226 .BI \-V " view" ", \-\-view=" view
227 Try to read the default configuration out of a file named
228 .I dnssec-<view>.conf .
229 Instead of specifying the \-V or --view option every time,
230 it is also possible to create a hard or softlink to the
231 executable file to give it an additional name like 
232 .I dnssec-zkt-<view> .
233 .TP
234 .BI \-c " file" ", \-\-config=" file
235 Read default values from the specified config file.
236 Otherwise the default config file is read or build in defaults
237 will be used.
238 .TP
239 .BI \-O " optstr" ", \-\-config-option=" optstr
240 Set any config file option via the commandline.
241 Several config file options could be specified at the argument string
242 but have to be delimited by semicolon (or newline).
243 .TP
244 .BI \-l " list"
245 Print out information solely about domains given in the comma or space separated
246 list.
247 Take care of, that every domain name has a trailing dot.
248 .TP
249 .BR \-d ", " \-\-directory
250 Skip directory arguments.
251 This will be useful in combination with wildcard arguments
252 to prevent dnsssec-zkt to list all keys found in subdirectories. 
253 For example "dnssec-zkt -d *" will print out a list of all keys only found in
254 the current directory.
255 Maybe it is easier to use "dnssec-zkt ." instead (without -r set).
256 The option works similar to the \-d option of
257 .IR ls(1) .
258 .TP
259 .BR \-L ", " \-\-left-justify
260 Print out the domain name left justified.
261 .TP
262 .BR \-k ", " \-\-ksk
263 Select and print key signing keys only (default depends on command mode).
264 .TP
265 .BR \-z ", " \-\-zsk
266 Select and print zone signing keys only (default depends on command mode).
267 .TP
268 .BR \-r ", " \-\-recursive
269 Recursive mode (default is off).
270 .br
271 Also settable in the dnssec.conf file (Parameter: Recursive).
272 .TP
273 .BR \-p ", " \-\-path
274 Print pathname in listing mode.
275 In -C mode, don't create the new key in the same directory as (already existing)
276 keys with the same label.
277 .TP
278 .BR \-a ", " \-\-age
279 Print age of key in weeks, days, hours, minutes and seconds (default is off).
280 .br
281 Also settable in the dnssec.conf file (Parameter: PrintAge).
282 .TP
283 .BR \-f ", " \-\-lifetime
284 Print the key lifetime.
285 .TP
286 .BR \-F ", " \-\-setlifetime
287 Set the key lifetime of all the selected keys.
288 Use option -k, -z, -l or the file and dir argument for key selection.
289 .TP
290 .BR \-e ", " \-\-exptime
291 Print the key expiration time.
292 .TP
293 .BR \-t ", " \-\-time
294 Print the key generation time (default is on).
295 .br
296 Also settable in the dnssec.conf file (Parameter: PrintTime).
297 .TP
298 .B \-h
299 No header or trusted-key section header and trailer in -T mode
300 .PP
301
302 .SH COMMAND OPTIONS
303 .TP
304 .BR \-H ", " \-\-help
305 Print out the online help.
306 .TP
307 .BR \-T ", " \-\-list-trustedkeys
308 List all key signing keys as a
309 .I named.conf
310 trusted-key section.
311 Use
312 .B \-h
313 to supress the section header/trailer.
314 .TP
315 .BR \-K ", " \-\-list-dnskeys
316 List the public part of all the keys in DNSKEY resource record format.
317 Use
318 .B \-h
319 to suppress comment lines.
320 .TP
321 .BI \-C " zone" ",  \-\-create=" zone
322 Create a new zone signing key for the given zone.
323 Add option
324 .B \-k
325 to create a key signing key.
326 The key algorithm and key length will be examined from built-in default values
327 or from the parameter settings in the
328 .I dnssec.conf
329 file.
330 .br
331 The keyfile will be created in the current directory if
332 the
333 .B \-p
334 option is specified.
335 .TP
336 .BI \-R " keyid" ", \-\-revoke=" keyid
337 Revoke the key signing key with the given keyid.
338 A revoked key has bit 8 in the flags filed set (see RFC5011).
339 The keyid is the numeric keytag with an optionally added zone name separated by a colon.
340 .TP
341 .BI \-\-rename=" keyid
342 Rename the key files of the key with the given keyid
343 (Look at key file names starting with an lower 'k').
344 The keyid is the numeric keytag with an optionally added zone name separated by a colon.
345 .TP
346 .BI \-\-destroy= keyid
347 Deletes the key with the given keyid.
348 The keyid is the numeric keytag with an optionally added zone name separated by a colon.
349 Beware that this deletes both private and public keyfiles, thus the key is
350 unrecoverable lost.
351 .TP
352 .BI \-P|A|D " keyid," " \-\-published=" keyid, " \-\-active=" keyid, " \-\-depreciated=" keyid
353 Change the status of the given dnssec key to
354 published
355 .RB ( \-P ),
356 active
357 .RB ( \-A )
358 or depreciated
359 .RB ( \-D ).
360 The
361 .I keyid
362 is the numeric keytag with an optionally added zone name separated by a colon.
363 Setting the status to "published" or "depreciate" will change the filename
364 of the private key file to ".published" or ".depreciated" respectivly.
365 This prevents the usage of the key as a signing key by the use of
366 .IR dnssec-signzone(8) .
367 The time of status change will be stored in the 'mtime' field of the corresponding
368 ".key" file.
369 Key activation via option
370 .B \-A
371 will restore the original timestamp and file name (".private").
372 .TP
373 .BR \-Z ", " \-\-zone-config
374 Write all config parameters to stdout.
375 The output is suitable as a template for the
376 .I dnssec.conf
377 file, so the easiest way to create a
378 .I dnssec.conf
379 file is to redirect the standard output of the above command.
380 Pay attention not to overwrite an existing file.
381 .TP
382 .BI \-\-ksk-roll-phase[123] " do.ma.in."
383 Initiate a key signing key rollover of the specified domain.
384 This feature is currently in experimental status and is mainly for the use
385 in an hierachical environment.
386 Use --ksk-rollover for a little more detailed description.
387
388
389 .SH SAMPLE USAGE
390 .TP 
391 .fam C
392 .B "dnssec-zkt \-r . 
393 .fam T
394 Print out a list of all zone keys found below the current directory.
395 .TP
396 .fam C
397 .B "dnssec-zkt \-Z \-c """"
398 .fam T
399 Print out the compiled in default parameters.
400 .TP
401 .fam C
402 .B "dnssec-zkt \-C example.net \-k \-r ./zonedir
403 .fam T
404 Create a new key signing key for the zone "example.net".
405 Store the key in the same directory below "zonedir" where the other
406 "example.net" keys live.
407 .TP
408 .fam C
409 .B "dnssec-zkt \-T ./zonedir/example.net
410 .fam T
411 Print out a trusted-key section containing the key signing keys of "example.net".
412 .TP
413 .fam C
414 .B "dnssec-zkt \-D 123245 \-r . 
415 .fam T
416 Depreciate the key with tag "12345" below the current directory,
417 .TP
418 .fam C
419 .B "dnssec-zkt --view intern 
420 .fam T
421 Print out a list of all zone keys found below the directory where all
422 the zones of view intern live.
423 There should be a seperate dnssec config file
424 .I dnssec-intern.conf
425 with a directory option to take affect of this.
426 .TP
427 .fam C
428 .B "dnssec-zkt-intern 
429 .fam T
430 Same as above.
431 The binary file
432 .I dnssec-zkt
433 has another link, named
434 .I dnssec-zkt-intern
435 made, and 
436 .I dnssec-zkt
437 examines argv[0] to find a view whose zones it proceeds to process.
438
439 .SH ENVIRONMENT VARIABLES
440 .TP
441 ZKT_CONFFILE
442 Specifies the name of the default global configuration files.
443
444 .SH FILES
445 .TP
446 .I /var/named/dnssec.conf
447 Built-in default global configuration file.
448 The name of the default global config file is settable via
449 the environment variable ZKT_CONFFILE.
450 .TP
451 .I /var/named/dnssec-<view>.conf
452 View specific global configuration file.
453 .TP
454 .I ./dnssec.conf
455 Local configuration file (only used in
456 .B \-C
457 mode).
458
459 .SH BUGS
460 .PP
461 Some of the general options will not be meaningful in all of the command modes.
462 .br
463 The option
464 .B \-l
465 and the ksk rollover options
466 insist on domain names ending with a dot.
467 .PP
468
469 .SH AUTHORS
470 Holger Zuleger, Mans Nilsson
471
472 .SH COPYRIGHT
473 Copyright (c) 2005 \- 2008 by Holger Zuleger.
474 Licensed under the BSD Licences. There is NO warranty; not even for MERCHANTABILITY or
475 FITNESS FOR A PARTICULAR PURPOSE.
476 .\"--------------------------------------------------
477 .SH SEE ALSO
478 dnssec-keygen(8), dnssec-signzone(8), rndc(8), named.conf(5), dnssec-signer(8),
479 .br
480 RFC4641 
481 "DNSSEC Operational Practices" by Miek Gieben and Olaf Kolkman,
482 .br
483 DNSSEC HOWTO Tutorial by Olaf Kolkman, RIPE NCC
484 .br
485 (http://www.nlnetlabs.nl/dnssec_howto/)