1NSUPDATE(1)                         BIND 9                         NSUPDATE(1)
2
3
4

NAME

6       nsupdate - dynamic DNS update utility
7

SYNOPSIS

9       nsupdate  [-d]  [-D]  [-i]  [-L  level]  [  [-g]  |  [-o]  | [-l] | [-y
10       [hmac:]keyname:secret] | [-k keyfile] ] [-t  timeout]  [-u  udptimeout]
11       [-r udpretries] [-v] [-T] [-P] [-V] [ [-4] | [-6] ] [filename]
12

DESCRIPTION

14       nsupdate  is  used to submit Dynamic DNS Update requests, as defined in
15       RFC 2136, to a name server. This allows resource records to be added or
16       removed  from  a  zone without manually editing the zone file. A single
17       update request can contain requests to add or remove more than one  re‐
18       source record.
19
20       Zones  that  are  under  dynamic  control via nsupdate or a DHCP server
21       should not be edited by hand. Manual edits could conflict with  dynamic
22       updates and cause data to be lost.
23
24       The  resource  records that are dynamically added or removed with nsup‐
25       date must be in the same zone. Requests are sent to the zone's  primary
26       server,  which  is  identified  by  the  MNAME  field of the zone's SOA
27       record.
28
29       Transaction signatures can be used to authenticate the Dynamic DNS  up‐
30       dates.  These  use the TSIG resource record type described in RFC 2845,
31       the SIG(0) record described in RFC 2535 and RFC 2931,  or  GSS-TSIG  as
32       described in RFC 3645.
33
34       TSIG  relies  on  a shared secret that should only be known to nsupdate
35       and the name server. For instance, suitable key and  server  statements
36       are  added to /etc/named.conf so that the name server can associate the
37       appropriate secret key and algorithm with the IP address of the  client
38       application  that is using TSIG authentication. ddns-confgen can gener‐
39       ate suitable configuration fragments. nsupdate uses the -y  or  -k  op‐
40       tions to provide the TSIG shared secret; these options are mutually ex‐
41       clusive.
42
43       SIG(0) uses public key cryptography. To use a SIG(0)  key,  the  public
44       key must be stored in a KEY record in a zone served by the name server.
45
46       GSS-TSIG  uses Kerberos credentials. Standard GSS-TSIG mode is switched
47       on with the -g flag. A non-standards-compliant variant of GSS-TSIG used
48       by Windows 2000 can be switched on with the -o flag.
49

OPTIONS

51       -4     This option sets use of IPv4 only.
52
53       -6     This option sets use of IPv6 only.
54
55       -C     Overrides  the  default  resolv.conf file. This is only intended
56              for testing.
57
58       -d     This option sets debug mode, which provides tracing  information
59              about the update requests that are made and the replies received
60              from the name server.
61
62       -D     This option sets extra debug mode.
63
64       -g     This option enables standard GSS-TSIG mode.
65
66       -i     This option forces interactive mode, even when standard input is
67              not a terminal.
68
69       -k keyfile
70              This  option  indicates the file containing the TSIG authentica‐
71              tion key. Keyfiles may be in two formats: a single file contain‐
72              ing  a  named.conf-format  key statement, which may be generated
73              automatically by ddns-confgen; or a pair of  files  whose  names
74              are     of    the    format    K{name}.+157.+{random}.key    and
75              K{name}.+157.+{random}.private,  which  can  be   generated   by
76              dnssec-keygen.  The  -k  option  can  also  be used to specify a
77              SIG(0) key used to authenticate Dynamic DNS update requests.  In
78              this case, the key specified is not an HMAC-MD5 key.
79
80       -l     This option sets local-host only mode, which sets the server ad‐
81              dress to localhost (disabling the server so that the server  ad‐
82              dress cannot be overridden). Connections to the local server use
83              a TSIG key found in /var/run/session.key, which is automatically
84              generated by named if any local primary zone has set update-pol‐
85              icy to local. The location of this key file  can  be  overridden
86              with the -k option.
87
88       -L level
89              This  option  sets  the logging debug level. If zero, logging is
90              disabled.
91
92       -o     This  option  enables  a  non-standards-compliant   variant   of
93              GSS-TSIG used by Windows 2000.
94
95       -p port
96              This  option  sets  the  port  to  use for connections to a name
97              server. The default is 53.
98
99       -P     This option prints the list of  private  BIND-specific  resource
100              record  types  whose  format is understood by nsupdate. See also
101              the -T option.
102
103       -r udpretries
104              This option sets the number of UDP retries. The default is 3. If
105              zero, only one update request is made.
106
107       -t timeout
108              This option sets the maximum time an update request can take be‐
109              fore it is aborted. The default is 300  seconds.  If  zero,  the
110              timeout is disabled.
111
112       -T     This  option  prints  the  list of IANA standard resource record
113              types whose format is understood by nsupdate. nsupdate exits af‐
114              ter  the  lists  are printed. The -T option can be combined with
115              the -P option.
116
117              Other types can be entered using TYPEXXXXX where  XXXXX  is  the
118              decimal  value  of the type with no leading zeros. The rdata, if
119              present, is parsed using the UNKNOWN rdata format,  (<backslash>
120              <hash> <space> <length> <space> <hexstring>).
121
122       -u udptimeout
123              This  option  sets the UDP retry interval. The default is 3 sec‐
124              onds. If zero, the interval is computed from the timeout  inter‐
125              val and number of UDP retries.
126
127       -v     This option specifies that TCP should be used even for small up‐
128              date requests. By default, nsupdate uses UDP to send update  re‐
129              quests  to the name server unless they are too large to fit in a
130              UDP request, in which case TCP is used. TCP  may  be  preferable
131              when a batch of update requests is made.
132
133       -V     This option prints the version number and exits.
134
135       -y [hmac:]keyname:secret
136              This option sets the literal TSIG authentication key. keyname is
137              the name of the key, and secret is the base64 encoded shared se‐
138              cret.  hmac  is the name of the key algorithm; valid choices are
139              hmac-md5, hmac-sha1, hmac-sha224, hmac-sha256,  hmac-sha384,  or
140              hmac-sha512.  If hmac is not specified, the default is hmac-md5,
141              or if MD5 was disabled, hmac-sha256.
142
143              NOTE: Use of the -y option is discouraged because the shared se‐
144              cret  is supplied as a command-line argument in clear text. This
145              may be visible in the output from ps1 or in a history file main‐
146              tained by the user's shell.
147

INPUT FORMAT

149       nsupdate  reads  input from filename or standard input. Each command is
150       supplied on exactly one line of input. Some commands are  for  adminis‐
151       trative purposes; others are either update instructions or prerequisite
152       checks on the contents of the zone. These checks  set  conditions  that
153       some name or set of resource records (RRset) either exists or is absent
154       from the zone. These conditions must be met if the  entire  update  re‐
155       quest  is to succeed. Updates are rejected if the tests for the prereq‐
156       uisite conditions fail.
157
158       Every update request consists of zero or more prerequisites and zero or
159       more  updates.  This  allows a suitably authenticated update request to
160       proceed if some specified resource records are either present or  miss‐
161       ing  from the zone. A blank input line (or the send command) causes the
162       accumulated commands to be sent as one Dynamic DNS  update  request  to
163       the name server.
164
165       The command formats and their meanings are as follows:
166
167       server servername port
168              This  command  sends  all  dynamic  update  requests to the name
169              server servername.  When no server statement is provided,  nsup‐
170              date  sends  updates  to the primary server of the correct zone.
171              The MNAME field of that zone's SOA record identify  the  primary
172              server  for  that  zone.   port is the port number on servername
173              where the dynamic update requests are sent. If no port number is
174              specified, the default DNS port number of 53 is used.
175
176              NOTE:
177                 This command has no effect when GSS-TSIG is in use.
178
179       local address port
180              This  command  sends all dynamic update requests using the local
181              address. When no local statement is provided, nsupdate sends up‐
182              dates  using  an address and port chosen by the system. port can
183              also be used to force requests to come from a specific port.  If
184              no port number is specified, the system assigns one.
185
186       zone zonename
187              This  command  specifies  that all updates are to be made to the
188              zone zonename.  If no zone statement is provided,  nsupdate  at‐
189              tempts to determine the correct zone to update based on the rest
190              of the input.
191
192       class classname
193              This command specifies the default class. If no class is  speci‐
194              fied, the default class is IN.
195
196       ttl seconds
197              This command specifies the default time-to-live, in seconds, for
198              records to be added. The value none clears the default TTL.
199
200       key hmac:keyname secret
201              This command specifies that all updates are  to  be  TSIG-signed
202              using the keyname-secret pair. If hmac is specified, it sets the
203              signing algorithm in use. The default is hmac-md5;  if  MD5  was
204              disabled,  the default is hmac-sha256. The key command overrides
205              any key specified on the command line via -y or -k.
206
207       gsstsig
208              This command uses GSS-TSIG to sign the updates. This is  equiva‐
209              lent to specifying -g on the command line.
210
211       oldgsstsig
212              This  command  uses the Windows 2000 version of GSS-TSIG to sign
213              the updates. This is equivalent to specifying -o on the  command
214              line.
215
216       realm [realm_name]
217              When   using   GSS-TSIG,  this  command  specifies  the  use  of
218              realm_name rather than the default realm  in  krb5.conf.  If  no
219              realm is specified, the saved realm is cleared.
220
221       check-names [boolean]
222              This  command  turns on or off check-names processing on records
223              to be added.  Check-names has  no  effect  on  prerequisites  or
224              records to be deleted.  By default check-names processing is on.
225              If check-names processing fails, the record is not added to  the
226              UPDATE message.
227
228       prereq nxdomain domain-name
229              This  command requires that no resource record of any type exist
230              with the name domain-name.
231
232       prereq yxdomain domain-name
233              This command requires that domain-name exist (as  at  least  one
234              resource record, of any type).
235
236       prereq nxrrset domain-name class type
237              This command requires that no resource record exist of the spec‐
238              ified type, class, and domain-name. If class is omitted, IN (In‐
239              ternet) is assumed.
240
241       prereq yxrrset domain-name class type
242              This  command  requires  that a resource record of the specified
243              type, class and domain-name exist. If class is omitted, IN  (in‐
244              ternet) is assumed.
245
246       prereq yxrrset domain-name class type data
247              With  this  command,  the data from each set of prerequisites of
248              this form sharing a common type, class, and domain-name are com‐
249              bined  to  form a set of RRs. This set of RRs must exactly match
250              the set of RRs existing in the zone at the  given  type,  class,
251              and  domain-name. The data are written in the standard text rep‐
252              resentation of the resource record's RDATA.
253
254       update delete domain-name ttl class type data
255              This command deletes any resource records named domain-name.  If
256              type  and  data are provided, only matching resource records are
257              removed.  The Internet class is assumed if  class  is  not  sup‐
258              plied.  The  ttl is ignored, and is only allowed for compatibil‐
259              ity.
260
261       update add domain-name ttl class type data
262              This command adds a new resource record with the specified  ttl,
263              class, and data.
264
265       show   This command displays the current message, containing all of the
266              prerequisites and updates specified since the last send.
267
268       send   This command sends the current message. This  is  equivalent  to
269              entering a blank line.
270
271       answer This command displays the answer.
272
273       debug  This command turns on debugging.
274
275       version
276              This command prints the version number.
277
278       help   This command prints a list of commands.
279
280       Lines beginning with a semicolon (;) are comments and are ignored.
281

EXAMPLES

283       The  examples  below show how nsupdate can be used to insert and delete
284       resource records from the example.com zone. Notice that  the  input  in
285       each  example  contains  a trailing blank line, so that a group of com‐
286       mands is sent as one dynamic update request to the primary name  server
287       for example.com.
288
289          # nsupdate
290          > update delete oldhost.example.com A
291          > update add newhost.example.com 86400 A 172.16.1.1
292          > send
293
294       Any  A records for oldhost.example.com are deleted, and an A record for
295       newhost.example.com with IP address  172.16.1.1  is  added.  The  newly
296       added record has a TTL of 1 day (86400 seconds).
297
298          # nsupdate
299          > prereq nxdomain nickname.example.com
300          > update add nickname.example.com 86400 CNAME somehost.example.com
301          > send
302
303       The  prerequisite  condition tells the name server to verify that there
304       are no resource records of any type for nickname.example.com. If  there
305       are, the update request fails. If this name does not exist, a CNAME for
306       it is added. This ensures that when the CNAME is added, it cannot  con‐
307       flict  with the long-standing rule in RFC 1034 that a name must not ex‐
308       ist as any other record type if it exists as a  CNAME.  (The  rule  has
309       been  updated  for  DNSSEC  in  RFC 2535 to allow CNAMEs to have RRSIG,
310       DNSKEY, and NSEC records.)
311

FILES

313       /etc/resolv.conf
314              Used to identify the default name server
315
316       /var/run/session.key
317              Sets the default TSIG key for use in local-only mode
318
319       K{name}.+157.+{random}.key
320              Base-64 encoding of the HMAC-MD5 key created by dnssec-keygen.
321
322       K{name}.+157.+{random}.private
323              Base-64 encoding of the HMAC-MD5 key created by dnssec-keygen.
324

SEE ALSO

326       RFC 2136, RFC 3007, RFC 2104, RFC 2845, RFC 1034, RFC 2535,  RFC  2931,
327       named(8), dnssec-keygen(8), tsig-keygen(8).
328

BUGS

330       The  TSIG  key  is  redundantly stored in two separate files. This is a
331       consequence of nsupdate using the DST library for its cryptographic op‐
332       erations, and may change in future releases.
333

AUTHOR

335       Internet Systems Consortium
336
338       2023, Internet Systems Consortium
339
340
341
342
3439.18.11                                                            NSUPDATE(1)
Impressum