]> CyberLeo.Net >> Repos - FreeBSD/releng/8.1.git/blob - contrib/bind9/bin/nsupdate/nsupdate.1
Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.
[FreeBSD/releng/8.1.git] / contrib / bind9 / bin / nsupdate / nsupdate.1
1 .\" Copyright (C) 2004-2009 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: nsupdate.1,v 1.3.48.3 2009/07/11 01:55:21 tbox Exp $
17 .\"
18 .hy 0
19 .ad l
20 .\"     Title: nsupdate
21 .\"    Author: 
22 .\" Generator: DocBook XSL Stylesheets v1.71.1 <http://docbook.sf.net/>
23 .\"      Date: Jun 30, 2000
24 .\"    Manual: BIND9
25 .\"    Source: BIND9
26 .\"
27 .TH "NSUPDATE" "1" "Jun 30, 2000" "BIND9" "BIND9"
28 .\" disable hyphenation
29 .nh
30 .\" disable justification (adjust text to left margin only)
31 .ad l
32 .SH "NAME"
33 nsupdate \- Dynamic DNS update utility
34 .SH "SYNOPSIS"
35 .HP 9
36 \fBnsupdate\fR [\fB\-d\fR] [\fB\-D\fR] [[\fB\-g\fR] | [\fB\-o\fR] | [\fB\-y\ \fR\fB\fI[hmac:]\fR\fIkeyname:secret\fR\fR] | [\fB\-k\ \fR\fB\fIkeyfile\fR\fR]] [\fB\-t\ \fR\fB\fItimeout\fR\fR] [\fB\-u\ \fR\fB\fIudptimeout\fR\fR] [\fB\-r\ \fR\fB\fIudpretries\fR\fR] [\fB\-R\ \fR\fB\fIrandomdev\fR\fR] [\fB\-v\fR] [filename]
37 .SH "DESCRIPTION"
38 .PP
39 \fBnsupdate\fR
40 is used to submit Dynamic DNS Update requests as defined in RFC2136 to a name server. This allows resource records to be added or removed from a zone without manually editing the zone file. A single update request can contain requests to add or remove more than one resource record.
41 .PP
42 Zones that are under dynamic control via
43 \fBnsupdate\fR
44 or a DHCP server should not be edited by hand. Manual edits could conflict with dynamic updates and cause data to be lost.
45 .PP
46 The resource records that are dynamically added or removed with
47 \fBnsupdate\fR
48 have to be in the same zone. Requests are sent to the zone's master server. This is identified by the MNAME field of the zone's SOA record.
49 .PP
50 The
51 \fB\-d\fR
52 option makes
53 \fBnsupdate\fR
54 operate in debug mode. This provides tracing information about the update requests that are made and the replies received from the name server.
55 .PP
56 The
57 \fB\-D\fR
58 option makes
59 \fBnsupdate\fR
60 report additional debugging information to
61 \fB\-d\fR.
62 .PP
63 Transaction signatures can be used to authenticate the Dynamic DNS updates. These use the TSIG resource record type described in RFC2845 or the SIG(0) record described in RFC3535 and RFC2931 or GSS\-TSIG as described in RFC3645. TSIG relies on a shared secret that should only be known to
64 \fBnsupdate\fR
65 and the name server. Currently, the only supported encryption algorithm for TSIG is HMAC\-MD5, which is defined in RFC 2104. Once other algorithms are defined for TSIG, applications will need to ensure they select the appropriate algorithm as well as the key when authenticating each other. For instance, suitable
66 \fBkey\fR
67 and
68 \fBserver\fR
69 statements would be added to
70 \fI/etc/named.conf\fR
71 so that the name server can associate the appropriate secret key and algorithm with the IP address of the client application that will be using TSIG authentication. SIG(0) uses public key cryptography. To use a SIG(0) key, the public key must be stored in a KEY record in a zone served by the name server.
72 \fBnsupdate\fR
73 does not read
74 \fI/etc/named.conf\fR. GSS\-TSIG uses Kerberos credentials.
75 .PP
76 \fBnsupdate\fR
77 uses the
78 \fB\-y\fR
79 or
80 \fB\-k\fR
81 option to provide the shared secret needed to generate a TSIG record for authenticating Dynamic DNS update requests, default type HMAC\-MD5. These options are mutually exclusive. With the
82 \fB\-k\fR
83 option,
84 \fBnsupdate\fR
85 reads the shared secret from the file
86 \fIkeyfile\fR, whose name is of the form
87 \fIK{name}.+157.+{random}.private\fR. For historical reasons, the file
88 \fIK{name}.+157.+{random}.key\fR
89 must also be present. When the
90 \fB\-y\fR
91 option is used, a signature is generated from
92 [\fIhmac:\fR]\fIkeyname:secret.\fR
93 \fIkeyname\fR
94 is the name of the key, and
95 \fIsecret\fR
96 is the base64 encoded shared secret. Use of the
97 \fB\-y\fR
98 option is discouraged because the shared secret is supplied as a command line argument in clear text. This may be visible in the output from
99 \fBps\fR(1)
100 or in a history file maintained by the user's shell.
101 .PP
102 The
103 \fB\-k\fR
104 may also be used to specify a SIG(0) key used to authenticate Dynamic DNS update requests. In this case, the key specified is not an HMAC\-MD5 key.
105 .PP
106 The
107 \fB\-g\fR
108 and
109 \fB\-o\fR
110 specify that GSS\-TSIG is to be used. The
111 \fB\-o\fR
112 should only be used with old Microsoft Windows 2000 servers.
113 .PP
114 By default,
115 \fBnsupdate\fR
116 uses UDP to send update requests to the name server unless they are too large to fit in a UDP request in which case TCP will be used. The
117 \fB\-v\fR
118 option makes
119 \fBnsupdate\fR
120 use a TCP connection. This may be preferable when a batch of update requests is made.
121 .PP
122 The
123 \fB\-t\fR
124 option sets the maximum time an update request can take before it is aborted. The default is 300 seconds. Zero can be used to disable the timeout.
125 .PP
126 The
127 \fB\-u\fR
128 option sets the UDP retry interval. The default is 3 seconds. If zero, the interval will be computed from the timeout interval and number of UDP retries.
129 .PP
130 The
131 \fB\-r\fR
132 option sets the number of UDP retries. The default is 3. If zero, only one update request will be made.
133 .PP
134 The
135 \fB\-R \fR\fB\fIrandomdev\fR\fR
136 option specifies a source of randomness. If the operating system does not provide a
137 \fI/dev/random\fR
138 or equivalent device, the default source of randomness is keyboard input.
139 \fIrandomdev\fR
140 specifies the name of a character device or file containing random data to be used instead of the default. The special value
141 \fIkeyboard\fR
142 indicates that keyboard input should be used. This option may be specified multiple times.
143 .SH "INPUT FORMAT"
144 .PP
145 \fBnsupdate\fR
146 reads input from
147 \fIfilename\fR
148 or standard input. Each command is supplied on exactly one line of input. Some commands are for administrative purposes. The others are either update instructions or prerequisite checks on the contents of the zone. These checks set conditions that some name or set of resource records (RRset) either exists or is absent from the zone. These conditions must be met if the entire update request is to succeed. Updates will be rejected if the tests for the prerequisite conditions fail.
149 .PP
150 Every update request consists of zero or more prerequisites and zero or more updates. This allows a suitably authenticated update request to proceed if some specified resource records are present or missing from the zone. A blank input line (or the
151 \fBsend\fR
152 command) causes the accumulated commands to be sent as one Dynamic DNS update request to the name server.
153 .PP
154 The command formats and their meaning are as follows:
155 .PP
156 \fBserver\fR {servername} [port]
157 .RS 4
158 Sends all dynamic update requests to the name server
159 \fIservername\fR. When no server statement is provided,
160 \fBnsupdate\fR
161 will send updates to the master server of the correct zone. The MNAME field of that zone's SOA record will identify the master server for that zone.
162 \fIport\fR
163 is the port number on
164 \fIservername\fR
165 where the dynamic update requests get sent. If no port number is specified, the default DNS port number of 53 is used.
166 .RE
167 .PP
168 \fBlocal\fR {address} [port]
169 .RS 4
170 Sends all dynamic update requests using the local
171 \fIaddress\fR. When no local statement is provided,
172 \fBnsupdate\fR
173 will send updates using an address and port chosen by the system.
174 \fIport\fR
175 can additionally be used to make requests come from a specific port. If no port number is specified, the system will assign one.
176 .RE
177 .PP
178 \fBzone\fR {zonename}
179 .RS 4
180 Specifies that all updates are to be made to the zone
181 \fIzonename\fR. If no
182 \fIzone\fR
183 statement is provided,
184 \fBnsupdate\fR
185 will attempt determine the correct zone to update based on the rest of the input.
186 .RE
187 .PP
188 \fBclass\fR {classname}
189 .RS 4
190 Specify the default class. If no
191 \fIclass\fR
192 is specified, the default class is
193 \fIIN\fR.
194 .RE
195 .PP
196 \fBttl\fR {seconds}
197 .RS 4
198 Specify the default time to live for records to be added. The value
199 \fInone\fR
200 will clear the default ttl.
201 .RE
202 .PP
203 \fBkey\fR {name} {secret}
204 .RS 4
205 Specifies that all updates are to be TSIG\-signed using the
206 \fIkeyname\fR
207 \fIkeysecret\fR
208 pair. The
209 \fBkey\fR
210 command overrides any key specified on the command line via
211 \fB\-y\fR
212 or
213 \fB\-k\fR.
214 .RE
215 .PP
216 \fBprereq nxdomain\fR {domain\-name}
217 .RS 4
218 Requires that no resource record of any type exists with name
219 \fIdomain\-name\fR.
220 .RE
221 .PP
222 \fBprereq yxdomain\fR {domain\-name}
223 .RS 4
224 Requires that
225 \fIdomain\-name\fR
226 exists (has as at least one resource record, of any type).
227 .RE
228 .PP
229 \fBprereq nxrrset\fR {domain\-name} [class] {type}
230 .RS 4
231 Requires that no resource record exists of the specified
232 \fItype\fR,
233 \fIclass\fR
234 and
235 \fIdomain\-name\fR. If
236 \fIclass\fR
237 is omitted, IN (internet) is assumed.
238 .RE
239 .PP
240 \fBprereq yxrrset\fR {domain\-name} [class] {type}
241 .RS 4
242 This requires that a resource record of the specified
243 \fItype\fR,
244 \fIclass\fR
245 and
246 \fIdomain\-name\fR
247 must exist. If
248 \fIclass\fR
249 is omitted, IN (internet) is assumed.
250 .RE
251 .PP
252 \fBprereq yxrrset\fR {domain\-name} [class] {type} {data...}
253 .RS 4
254 The
255 \fIdata\fR
256 from each set of prerequisites of this form sharing a common
257 \fItype\fR,
258 \fIclass\fR, and
259 \fIdomain\-name\fR
260 are combined to form a set of RRs. This set of RRs must exactly match the set of RRs existing in the zone at the given
261 \fItype\fR,
262 \fIclass\fR, and
263 \fIdomain\-name\fR. The
264 \fIdata\fR
265 are written in the standard text representation of the resource record's RDATA.
266 .RE
267 .PP
268 \fBupdate delete\fR {domain\-name} [ttl] [class] [type\ [data...]]
269 .RS 4
270 Deletes any resource records named
271 \fIdomain\-name\fR. If
272 \fItype\fR
273 and
274 \fIdata\fR
275 is provided, only matching resource records will be removed. The internet class is assumed if
276 \fIclass\fR
277 is not supplied. The
278 \fIttl\fR
279 is ignored, and is only allowed for compatibility.
280 .RE
281 .PP
282 \fBupdate add\fR {domain\-name} {ttl} [class] {type} {data...}
283 .RS 4
284 Adds a new resource record with the specified
285 \fIttl\fR,
286 \fIclass\fR
287 and
288 \fIdata\fR.
289 .RE
290 .PP
291 \fBshow\fR
292 .RS 4
293 Displays the current message, containing all of the prerequisites and updates specified since the last send.
294 .RE
295 .PP
296 \fBsend\fR
297 .RS 4
298 Sends the current message. This is equivalent to entering a blank line.
299 .RE
300 .PP
301 \fBanswer\fR
302 .RS 4
303 Displays the answer.
304 .RE
305 .PP
306 \fBdebug\fR
307 .RS 4
308 Turn on debugging.
309 .RE
310 .PP
311 Lines beginning with a semicolon are comments and are ignored.
312 .SH "EXAMPLES"
313 .PP
314 The examples below show how
315 \fBnsupdate\fR
316 could be used to insert and delete resource records from the
317 \fBexample.com\fR
318 zone. Notice that the input in each example contains a trailing blank line so that a group of commands are sent as one dynamic update request to the master name server for
319 \fBexample.com\fR.
320 .sp
321 .RS 4
322 .nf
323 # nsupdate
324 > update delete oldhost.example.com A
325 > update add newhost.example.com 86400 A 172.16.1.1
326 > send
327 .fi
328 .RE
329 .sp
330 .PP
331 Any A records for
332 \fBoldhost.example.com\fR
333 are deleted. And an A record for
334 \fBnewhost.example.com\fR
335 with IP address 172.16.1.1 is added. The newly\-added record has a 1 day TTL (86400 seconds).
336 .sp
337 .RS 4
338 .nf
339 # nsupdate
340 > prereq nxdomain nickname.example.com
341 > update add nickname.example.com 86400 CNAME somehost.example.com
342 > send
343 .fi
344 .RE
345 .sp
346 .PP
347 The prerequisite condition gets the name server to check that there are no resource records of any type for
348 \fBnickname.example.com\fR. If there are, the update request fails. If this name does not exist, a CNAME for it is added. This ensures that when the CNAME is added, it cannot conflict with the long\-standing rule in RFC1034 that a name must not exist as any other record type if it exists as a CNAME. (The rule has been updated for DNSSEC in RFC2535 to allow CNAMEs to have RRSIG, DNSKEY and NSEC records.)
349 .SH "FILES"
350 .PP
351 \fB/etc/resolv.conf\fR
352 .RS 4
353 used to identify default name server
354 .RE
355 .PP
356 \fBK{name}.+157.+{random}.key\fR
357 .RS 4
358 base\-64 encoding of HMAC\-MD5 key created by
359 \fBdnssec\-keygen\fR(8).
360 .RE
361 .PP
362 \fBK{name}.+157.+{random}.private\fR
363 .RS 4
364 base\-64 encoding of HMAC\-MD5 key created by
365 \fBdnssec\-keygen\fR(8).
366 .RE
367 .SH "SEE ALSO"
368 .PP
369 \fBRFC2136\fR(),
370 \fBRFC3007\fR(),
371 \fBRFC2104\fR(),
372 \fBRFC2845\fR(),
373 \fBRFC1034\fR(),
374 \fBRFC2535\fR(),
375 \fBRFC2931\fR(),
376 \fBnamed\fR(8),
377 \fBdnssec\-keygen\fR(8).
378 .SH "BUGS"
379 .PP
380 The TSIG key is redundantly stored in two separate files. This is a consequence of nsupdate using the DST library for its cryptographic operations, and may change in future releases.
381 .SH "COPYRIGHT"
382 Copyright \(co 2004\-2009 Internet Systems Consortium, Inc. ("ISC")
383 .br
384 Copyright \(co 2000\-2003 Internet Software Consortium.
385 .br