summaryrefslogtreecommitdiffstats
path: root/contrib/zkt/dnssec-zkt.8
blob: b53f8bb3751d82eb3e561d620c5643bdeb87f51d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
.TH dnssec-zkt 8 "July 27, 2008" "ZKT 0.97" ""
\" turn off hyphenation
.\"	if n .nh
.nh
.SH NAME
dnssec-zkt \(em Secure DNS zone key tool 

.SH SYNOPSYS
.na
.B dnssec-zkt
.RB [ \-V|--view
.IR "view" ]
.RB [ \-c
.IR "file" ]
.RB [ \-l
.IR "list" ]
.RB [ \-adefhkLrptz ]
.RI [{ keyfile | dir }
.RI "" ... ]

.B dnssec-zkt
.BR \-C <label>
.RB [ \-V|--view
.IR "view" ]
.RB [ \-c
.IR "file" ]
.RB [ \-krpz ]
.RI [{ keyfile | dir }
.RI "" ... ]
.br
.B dnssec-zkt
.BR \-\-create= <label>
.RB [ \-V|--view
.IR "view" ]
.RB [ \-c
.IR "file" ]
.RB [ \-krpz ]
.RI [{ keyfile | dir }
.RI "" ... ]

.B dnssec-zkt
.BR \-  { P | A | D | R } <keytag>
.RB [ \-V|--view
.IR "view" ]
.RB [ \-c
.IR "file" ]
.RB [ \-r ]
.RI [{ keyfile | dir }
.RI "" ... ]
.br
.B dnssec-zkt
.BR \-\-published= <keytag>
.RB [ \-V|--view
.IR "view" ]
.RB [ \-c
.IR "file" ]
.RB [ \-r ]
.RI [{ keyfile | dir }
.RI "" ... ]
.br
.B dnssec-zkt
.BR \-\-active= <keytag>
.RB [ \-V|--view
.IR "view" ]
.RB [ \-c
.IR "file" ]
.RB [ \-r ]
.RI [{ keyfile | dir }
.RI "" ... ]
.br
.B dnssec-zkt
.BR \-\-depreciate= <keytag>
.RB [ \-V|--view
.IR "view" ]
.RB [ \-c
.IR "file" ]
.RB [ \-r ]
.RI [{ keyfile | dir }
.RI "" ... ]
.br
.B dnssec-zkt
.BR \-\-rename= <keytag>
.RB [ \-V|--view
.IR "view" ]
.RB [ \-c
.IR "file" ]
.RB [ \-r ]
.RI [{ keyfile | dir }
.RI "" ... ]

.B dnssec-zkt
.BR \-\-destroy= <keytag>
.RB [ \-V|--view
.IR "view" ]
.RB [ \-c
.IR "file" ]
.RB [ \-r ]
.RI [{ keyfile | dir }
.RI "" ... ]

.B dnssec-zkt
.B \-T
.RB [ \-V|--view
.IR "view" ]
.RB [ \-c
.IR "file" ]
.RB [ \-l
.IR "list" ]
.RB [ \-hr ]
.RI [{ keyfile | dir }
.RI "" ... ]
.br
.B dnssec-zkt
.B \-\-list-trustedkeys
.RB [ \-V|--view
.IR "view" ]
.RB [ \-c
.IR "file" ]
.RB [ \-l
.IR "list" ]
.RB [ \-hr ]
.RI [{ keyfile | dir }
.RI "" ... ]

.B dnssec-zkt
.B \-K
.RB [ \-V|--view
.IR "view" ]
.RB [ \-c
.IR "file" ]
.RB [ \-l
.IR "list" ]
.RB [ \-hkzr ]
.RI [{ keyfile | dir }
.RI "" ... ]
.br
.B dnssec-zkt
.B \-\-list-dnskeys
.RB [ \-V|--view
.IR "view" ]
.RB [ \-c
.IR "file" ]
.RB [ \-l
.IR "list" ]
.RB [ \-hkzr ]
.RI [{ keyfile | dir }
.RI "" ... ]

.B dnssec-zkt
.B \-Z
.RB [ \-V|--view
.IR "view" ]
.RB [ \-c
.IR "file" ]
.br
.B dnssec-zkt
.B \-\-zone-config
.RB [ \-V|--view
.IR "view" ]
.RB [ \-c
.IR "file" ]

.B dnssec-zkt
.B \-9 | \-\-ksk-rollover
.br
.B dnssec-zkt
.B \-1 | \-\-ksk-roll-phase1
.I "do.ma.in."
.RB [ \-V|--view
.IR "view" ]
.RB [ \-c
.IR "file" ]
.br
.B dnssec-zkt
.B \-2 | \-\-ksk-roll-phase2
.I "do.ma.in."
.RB [ \-V|--view
.IR "view" ]
.RB [ \-c
.IR "file" ]
.br
.B dnssec-zkt
.B \-3 | \-\-ksk-roll-phase3
.I do.ma.in.
.RB [ \-V|--view
.IR "view" ]
.RB [ \-c
.IR "file" ]
.br
.B dnssec-zkt
.B \-0 | \-\-ksk-roll-stat
.I do.ma.in.
.RB [ \-V|--view
.IR "view" ]
.RB [ \-c
.IR "file" ]
.br
.ad

.SH DESCRIPTION
The 
.I dnssec-zkt
command is a wrapper around 
.I dnssec-keygen(8)
to assist in dnssec zone key management.
.PP
In the common usage the command prints out information about
all dnssec (zone) keys found in the given (or predefined default) directory.
It's also possible to specify keyfiles (K*.key) as arguments.
With option
.B \-r
subdirectories will be searched recursively, and all dnssec keys found
will be listed sorted by domain name, key type and generation time.
In that mode the use of the
.B \-p
option may be helpful to find the location of the keyfile in the directory tree.
.PP
Other forms of the command print out keys in a format suitable for
a trusted-key section or as a DNSKEY resource record.
.PP
The command is also useful in dns key management.
It allows key livetime monitoring and status change.

.SH GENERAL OPTIONS
.TP
.BI \-V " view" ", \-\-view=" view
Try to read the default configuration out of a file named
.I dnssec-<view>.conf .
Instead of specifying the \-V or --view option every time,
it's also possible to create a hard or softlink to the
executable file to give it an additional name like 
.I dnssec-zkt-<view> .
.TP
.BI \-c " file" ", \-\-config=" file
Read default values from the specified config file.
Otherwise the default config file is read or build in defaults
will be used.
.TP
.BI \-O " optstr" ", \-\-config-option=" optstr
Set any config file option via the commandline.
Several config file options could be specified at the argument string
but have to be delimited by semicolon (or newline).
.TP
.BI \-l " list"
Print out information solely about domains given in the comma or space separated
list.
Take care of, that every domain name has a trailing dot.
.TP
.BR \-d ", " \-\-directory
Skip directory arguments.
This will be useful in combination with wildcard arguments
to prevent dnsssec-zkt to list all keys found in subdirectories. 
For example "dnssec-zkt -d *" will print out a list of all keys only found in
the current directory.
Maybe it's easier to use "dnssec-zkt ." instead (without -r set).
The option works similar to the \-d option of
.IR ls(1) .
.TP
.BR \-L ", " \-\-left-justify
Print out the domain name left justified.
.TP
.BR \-k ", " \-\-ksk
Select and print key signing keys only (default depends on command mode).
.TP
.BR \-z ", " \-\-zsk
Select and print zone signing keys only (default depends on command mode).
.TP
.BR \-r ", " \-\-recursive
Recursive mode (default is off).
.br
Also settable in the dnssec.conf file (Parameter: Recursive).
.TP
.BR \-p ", " \-\-path
Print pathname in listing mode.
In -C mode, don't create the new key in the same directory as (already existing)
keys with the same label.
.TP
.BR \-a ", " \-\-age
Print age of key in weeks, days, hours, minutes and seconds (default is off).
.br
Also settable in the dnssec.conf file (Parameter: PrintAge).
.TP
.BR \-f ", " \-\-lifetime
Print the key lifetime.
.TP
.BR \-F ", " \-\-setlifetime
Set the key lifetime of all the selected keys.
Use option -k, -z, -l or the file and dir argument for key selection.
.TP
.BR \-e ", " \-\-exptime
Print the key expiration time.
.TP
.BR \-t ", " \-\-time
Print the key generation time (default is on).
.br
Also settable in the dnssec.conf file (Parameter: PrintTime).
.TP
.B \-h
No header or trusted-key section header and trailer in -T mode
.PP

.SH COMMAND OPTIONS
.TP
.BR \-H ", " \-\-help
Print out the online help.
.TP
.BR \-T ", " \-\-list-trustedkeys
List all key signing keys as a
.I named.conf
trusted-key section.
Use
.B \-h
to supress the section header/trailer.
.TP
.BR \-K ", " \-\-list-dnskeys
List the public part of all the keys in DNSKEY resource record format.
Use
.B \-h
to suppress comment lines.
.TP
.BI \-C " zone" ",  \-\-create=" zone
Create a new zone signing key for the given zone.
Add option
.B \-k
to create a key signing key.
The key algorithm and key length will be examined from built-in default values
or from the parameter settings in the
.I dnssec.conf
file.
.br
The keyfile will be created in the current directory if
the
.B \-p
option is specified.
.TP
.BI \-R " keyid" ", \-\-revoke=" keyid
Revoke the key signing key with the given keyid.
A revoked key has bit 8 in the flags filed set (see RFC5011).
The keyid is the numeric keytag with an optionally added zone name separated by a colon.
.TP
.BI \-\-rename=" keyid
Rename the key files of the key with the given keyid
(Look at key file names starting with an lower 'k').
The keyid is the numeric keytag with an optionally added zone name separated by a colon.
.TP
.BI \-\-destroy= keyid
Deletes the key with the given keyid.
The keyid is the numeric keytag with an optionally added zone name separated by a colon.
Beware that this deletes both private and public keyfiles, thus the key is
unrecoverable lost.
.TP
.BI \-P|A|D " keyid," " \-\-published=" keyid, " \-\-active=" keyid, " \-\-depreciated=" keyid
Change the status of the given dnssec key to
published
.RB ( \-P ),
active
.RB ( \-A )
or depreciated
.RB ( \-D ).
The
.I keyid
is the numeric keytag with an optionally added zone name separated by a colon.
Setting the status to "published" or "depreciate" will change the filename
of the private key file to ".published" or ".depreciated" respectivly.
This prevents the usage of the key as a signing key by the use of
.IR dnssec-signzone(8) .
The time of status change will be stored in the 'mtime' field of the corresponding
".key" file.
Key activation via option
.B \-A
will restore the original timestamp and file name (".private").
.TP
.BR \-Z ", " \-\-zone-config
Write all config parameters to stdout.
The output is suitable as a template for the
.I dnssec.conf
file, so the easiest way to create a
.I dnssec.conf
file is to redirect the standard output of the above command.
Pay attention not to overwrite an existing file.
.TP
.BI \-\-ksk-roll-phase[123] " do.ma.in."
Initiate a key signing key rollover of the specified domain.
This feature is currently in experimental status and is mainly for the use
in an hierachical environment.
Use --ksk-rollover for a little more detailed description.


.SH SAMPLE USAGE
.TP 
.fam C
.B "dnssec-zkt \-r . 
.fam T
Print out a list of all zone keys found below the current directory.
.TP
.fam C
.B "dnssec-zkt \-Z \-c """"
.fam T
Print out the compiled in default parameters.
.TP
.fam C
.B "dnssec-zkt \-C example.net \-k \-r ./zonedir
.fam T
Create a new key signing key for the zone "example.net".
Store the key in the same directory below "zonedir" where the other
"example.net" keys live.
.TP
.fam C
.B "dnssec-zkt \-T ./zonedir/example.net
.fam T
Print out a trusted-key section containing the key signing keys of "example.net".
.TP
.fam C
.B "dnssec-zkt \-D 123245 \-r . 
.fam T
Depreciate the key with tag "12345" below the current directory,
.TP
.fam C
.B "dnssec-zkt --view intern 
Print out a list of all zone keys found below the directory where all
the zones of view intern live.
There should be a seperate dnssec config file
.I dnssec-intern.conf
with a directory option to take affect of this.
.TP
.fam C
.B "dnssec-zkt-intern 
.fam T
Same as above.
The binary file
.I dnssec-zkt
have linked to
.I dnssec-zkt-intern .

.SH ENVIRONMENT VARIABLES
.TP
ZKT_CONFFILE
Specifies the name of the default global configuration files.

.SH FILES
.TP
.I /var/named/dnssec.conf
Built-in default global configuration file.
The name of the default global config file is settable via
the environment variable ZKT_CONFFILE.
.TP
.I /var/named/dnssec-<view>.conf
View specific global configuration file.
.TP
.I ./dnssec.conf
Local configuration file (only used in
.B \-C
mode).

.SH BUGS
.PP
Some of the general options will not be meaningful in all of the command modes.
.br
The option
.B \-l
and the ksk rollover options
insist on domain names ending with a dot.
.PP

.SH AUTHOR
Holger Zuleger 

.SH COPYRIGHT
Copyright (c) 2005 \- 2007 by Holger Zuleger.
Licensed under the GPL 2. There is NO warranty; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.
.\"--------------------------------------------------
.SH SEE ALSO
dnssec-keygen(8), dnssec-signzone(8), rndc(8), named.conf(5), dnssec-signer(8),
.br
RFC4641 
"DNSSEC Operational Practices" by Miek Gieben and Olaf Kolkman,
.br
DNSSEC HOWTO Tutorial by Olaf Kolkman, RIPE NCC
.br
(http://www.nlnetlabs.nl/dnssec_howto/)