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