nsupdate.docbook revision 1753d3c4d74241a847794f7e7cfd94cc79be6600
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
ca41b452ede6feaa9d8739ec3cae19389a7b0d03Bob Halley "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence [<!ENTITY mdash "—">]>
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley - Copyright (C) 2004-2012 Internet Systems Consortium, Inc. ("ISC")
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley - Copyright (C) 2000-2003 Internet Software Consortium.
15a44745412679c30a6d022733925af70a38b715David Lawrence - Permission to use, copy, modify, and/or distribute this software for any
15a44745412679c30a6d022733925af70a38b715David Lawrence - purpose with or without fee is hereby granted, provided that the above
15a44745412679c30a6d022733925af70a38b715David Lawrence - copyright notice and this permission notice appear in all copies.
15a44745412679c30a6d022733925af70a38b715David Lawrence - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
15a44745412679c30a6d022733925af70a38b715David Lawrence - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
15a44745412679c30a6d022733925af70a38b715David Lawrence - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
15a44745412679c30a6d022733925af70a38b715David Lawrence - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence - PERFORMANCE OF THIS SOFTWARE.
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley <refentryinfo>
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley </refentryinfo>
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley <refentrytitle><application>nsupdate</application></refentrytitle>
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley <refname><application>nsupdate</application></refname>
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley <refpurpose>Dynamic DNS update utility</refpurpose>
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley </refnamediv>
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley </copyright>
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley </copyright>
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley <refsynopsisdiv>
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley <cmdsynopsis>
6af51ff1a30dd977c4fc6c342a0661bb4f6501a5Bob Halley <arg><option>-y <replaceable class="parameter"><optional>hmac:</optional>keyname:secret</replaceable></option></arg>
c90f5e8d1edbd5c277f2ee320167a12a30ba7c7bMichael Graff <arg><option>-k <replaceable class="parameter">keyfile</replaceable></option></arg>
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley <arg><option>-t <replaceable class="parameter">timeout</replaceable></option></arg>
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley <arg><option>-u <replaceable class="parameter">udptimeout</replaceable></option></arg>
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley <arg><option>-r <replaceable class="parameter">udpretries</replaceable></option></arg>
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley <arg><option>-R <replaceable class="parameter">randomdev</replaceable></option></arg>
6af51ff1a30dd977c4fc6c342a0661bb4f6501a5Bob Halley </cmdsynopsis>
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley </refsynopsisdiv>
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley is used to submit Dynamic DNS Update requests as defined in RFC 2136
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley to a name server.
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley This allows resource records to be added or removed from a zone
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley without manually editing the zone file.
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley A single update request can contain requests to add or remove more than
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley resource record.
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley Zones that are under dynamic control via
bfa633fc0e5dea8f65676c5393993ba7053a9899Andreas Gustafsson or a DHCP server should not be edited by hand.
bfa633fc0e5dea8f65676c5393993ba7053a9899Andreas Gustafsson Manual edits could
315879710704bbcf66df301664cd90df8ad31265David Lawrence conflict with dynamic updates and cause data to be lost.
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley The resource records that are dynamically added or removed with
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley have to be in the same zone.
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley Requests are sent to the zone's master server.
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley This is identified by the MNAME field of the zone's SOA record.
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley option makes
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley operate in debug mode.
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley This provides tracing information about the update requests that are
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley made and the replies received from the name server.
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley The <option>-D</option> option makes <command>nsupdate</command>
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley report additional debugging information to <option>-d</option>.
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley The <option>-L</option> option with an integer argument of zero or
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley higher sets the logging debug level. If zero, logging is disabled.
315879710704bbcf66df301664cd90df8ad31265David Lawrence Transaction signatures can be used to authenticate the Dynamic
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley DNS updates. These use the TSIG resource record type described
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley in RFC 2845 or the SIG(0) record described in RFC 2535 and
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley RFC 2931 or GSS-TSIG as described in RFC 3645. TSIG relies on
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley a shared secret that should only be known to
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley <command>nsupdate</command> and the name server. Currently,
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley the only supported encryption algorithm for TSIG is HMAC-MD5,
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley which is defined in RFC 2104. Once other algorithms are
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley defined for TSIG, applications will need to ensure they select
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley the appropriate algorithm as well as the key when authenticating
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley each other. For instance, suitable <type>key</type> and
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley <filename>/etc/named.conf</filename> so that the name server
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley can associate the appropriate secret key and algorithm with
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley the IP address of the client application that will be using
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley TSIG authentication. SIG(0) uses public key cryptography.
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley To use a SIG(0) key, the public key must be stored in a KEY
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley record in a zone served by the name server.
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley GSS-TSIG uses Kerberos credentials. Standard GSS-TSIG mode
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley is switched on with the <option>-g</option> flag. A
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley non-standards-compliant variant of GSS-TSIG used by Windows
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley 2000 can be switched on with the <option>-o</option> flag.
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley uses the <option>-y</option> or <option>-k</option> option
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley to provide the shared secret needed to generate a TSIG record
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley for authenticating Dynamic DNS update requests, default type
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley HMAC-MD5. These options are mutually exclusive.
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley When the <option>-y</option> option is used, a signature is
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley generated from
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley <optional><parameter>hmac:</parameter></optional><parameter>keyname:secret.</parameter>
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley <parameter>keyname</parameter> is the name of the key, and
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley <parameter>secret</parameter> is the base64 encoded shared secret.
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley Use of the <option>-y</option> option is discouraged because the
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley shared secret is supplied as a command line argument in clear text.
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley This may be visible in the output from
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley <citerefentry>
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley <refentrytitle>ps</refentrytitle><manvolnum>1</manvolnum>
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley </citerefentry>
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley or in a history file maintained by the user's shell.
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley <option>-k</option> option, <command>nsupdate</command> reads
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley the shared secret from the file <parameter>keyfile</parameter>.
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley Keyfiles may be in two formats: a single file containing
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley a <filename>named.conf</filename>-format <command>key</command>
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley statement, which may be generated automatically by
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley <command>ddns-confgen</command>, or a pair of files whose names are
808af432356c7592e80bd41416eca61e7bc8791dBob Halley of the format <filename>K{name}.+157.+{random}.key</filename> and
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley <filename>K{name}.+157.+{random}.private</filename>, which can be
808af432356c7592e80bd41416eca61e7bc8791dBob Halley The <option>-k</option> may also be used to specify a SIG(0) key used
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley to authenticate Dynamic DNS update requests. In this case, the key
808af432356c7592e80bd41416eca61e7bc8791dBob Halley specified is not an HMAC-MD5 key.
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley <command>nsupdate</command> can be run in a local-host only mode
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley using the <option>-l</option> flag. This sets the server address to
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley localhost (disabling the <command>server</command> so that the server
95b41befcb9e75df2b451ceeb9f8812ccedcc25fAndreas Gustafsson address cannot be overridden). Connections to the local server will
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley use a TSIG key found in <filename>/var/run/named/session.key</filename>,
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley which is automatically generated by <command>named</command> if any
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley local master zone has set <command>update-policy</command> to
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley <command>local</command>. The location of this key file can be
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley uses UDP to send update requests to the name server unless they are too
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley large to fit in a UDP request in which case TCP will be used.
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley option makes
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley use a TCP connection.
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley This may be preferable when a batch of update requests is made.
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley The <option>-p</option> sets the default port number to use for
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley connections to a name server. The default is 53.
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley The <option>-t</option> option sets the maximum time an update request
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley take before it is aborted. The default is 300 seconds. Zero can be
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley to disable the timeout.
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley The <option>-u</option> option sets the UDP retry interval. The default
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley 3 seconds. If zero, the interval will be computed from the timeout
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley and number of UDP retries.
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley The <option>-r</option> option sets the number of UDP retries. The
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley 3. If zero, only one update request will be made.
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley class="parameter">randomdev</replaceable></option> option
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley specifies a source of randomness. If the operating system
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley does not provide a <filename>/dev/random</filename> or
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley equivalent device, the default source of randomness is keyboard
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley input. <filename>randomdev</filename> specifies the name of
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley a character device or file containing random data to be used
738b9aa3ded1ef724922d6695cb04ec2e721bdd1Bob Halley instead of the default. The special value
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley <filename>keyboard</filename> indicates that keyboard input
bfa633fc0e5dea8f65676c5393993ba7053a9899Andreas Gustafsson should be used. This option may be specified multiple times.
4e21e54a0394d0f87798620a95c1f675c0b0d09cMichael Graff Other types can be entered using "TYPEXXXXX" where "XXXXX" is the
558ab0f6a8046499bfe3e39ea4789036313b72b3Michael Graff decimal value of the type with no leading zeros. The rdata,
558ab0f6a8046499bfe3e39ea4789036313b72b3Michael Graff if present, will be parsed using the UNKNOWN rdata format,
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley (<backslash> <hash> <space> <length>
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley <space> <hexstring>).
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley The <option>-T</option> and <option>-P</option> options print out
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley lists of non-meta types for which the type-specific presentation
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley formats are known. <option>-T</option> prints out the list of
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley IANA-assigned types. <option>-P</option> prints out the list of
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley private types specific to <command>named</command>. These options
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley may be combined. <command>nsupdate</command> will exit after the
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley lists are printed.
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence reads input from
7cbfebb762d0d9ba77699e2c15530278e0e4980eAndreas Gustafsson or standard input.
7cbfebb762d0d9ba77699e2c15530278e0e4980eAndreas Gustafsson Each command is supplied on exactly one line of input.
7cbfebb762d0d9ba77699e2c15530278e0e4980eAndreas Gustafsson Some commands are for administrative purposes.
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence The others are either update instructions or prerequisite checks on the
7cbfebb762d0d9ba77699e2c15530278e0e4980eAndreas Gustafsson contents of the zone.
7cbfebb762d0d9ba77699e2c15530278e0e4980eAndreas Gustafsson These checks set conditions that some name or set of
7cbfebb762d0d9ba77699e2c15530278e0e4980eAndreas Gustafsson resource records (RRset) either exists or is absent from the zone.
7cbfebb762d0d9ba77699e2c15530278e0e4980eAndreas Gustafsson These conditions must be met if the entire update request is to succeed.
7cbfebb762d0d9ba77699e2c15530278e0e4980eAndreas Gustafsson Updates will be rejected if the tests for the prerequisite conditions
7cbfebb762d0d9ba77699e2c15530278e0e4980eAndreas Gustafsson Every update request consists of zero or more prerequisites
7cbfebb762d0d9ba77699e2c15530278e0e4980eAndreas Gustafsson and zero or more updates.
7cbfebb762d0d9ba77699e2c15530278e0e4980eAndreas Gustafsson This allows a suitably authenticated update request to proceed if some
7cbfebb762d0d9ba77699e2c15530278e0e4980eAndreas Gustafsson specified resource records are present or missing from the zone.
7cbfebb762d0d9ba77699e2c15530278e0e4980eAndreas Gustafsson A blank input line (or the <command>send</command> command)
7cbfebb762d0d9ba77699e2c15530278e0e4980eAndreas Gustafsson accumulated commands to be sent as one Dynamic DNS update request to the
7cbfebb762d0d9ba77699e2c15530278e0e4980eAndreas Gustafsson The command formats and their meaning are as follows:
7cbfebb762d0d9ba77699e2c15530278e0e4980eAndreas Gustafsson <variablelist>
7cbfebb762d0d9ba77699e2c15530278e0e4980eAndreas Gustafsson <varlistentry>
95b41befcb9e75df2b451ceeb9f8812ccedcc25fAndreas Gustafsson Sends all dynamic update requests to the name server
95b41befcb9e75df2b451ceeb9f8812ccedcc25fAndreas Gustafsson When no server statement is provided,
bfa633fc0e5dea8f65676c5393993ba7053a9899Andreas Gustafsson will send updates to the master server of the correct zone.
7cbfebb762d0d9ba77699e2c15530278e0e4980eAndreas Gustafsson The MNAME field of that zone's SOA record will identify the
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence server for that zone.
95b41befcb9e75df2b451ceeb9f8812ccedcc25fAndreas Gustafsson is the port number on
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley where the dynamic update requests get sent.
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley If no port number is specified, the default DNS port number of
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley </varlistentry>
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley <varlistentry>
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley Sends all dynamic update requests using the local
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley When no local statement is provided,
6e49e91bd08778d7eae45a2229dcf41ed97cc636David Lawrence will send updates using an address and port chosen by the
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley can additionally be used to make requests come from a specific
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley If no port number is specified, the system will assign one.
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley </varlistentry>
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley <varlistentry>
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence Specifies that all updates are to be made to the zone
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley statement is provided,
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley will attempt determine the correct zone to update based on the
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley rest of the input.
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley </varlistentry>
99a9539ccde4a3769fd890bdae5bcce3a3492fbaBob Halley <varlistentry>
> update delete oldhost.example.com A
> update add newhost.example.com 86400 A 172.16.1.1
> prereq nxdomain nickname.example.com