nsupdate.docbook revision 072440df4f65033eb058c06f2cc72be450606720
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt [<!ENTITY mdash "—">]>
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt - Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC")
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt - Copyright (C) 2000-2003 Internet Software Consortium.
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt - Permission to use, copy, modify, and/or distribute this software for any
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt - purpose with or without fee is hereby granted, provided that the above
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt - copyright notice and this permission notice appear in all copies.
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt - PERFORMANCE OF THIS SOFTWARE.
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt<!-- $Id: nsupdate.docbook,v 1.30 2008/06/17 20:59:25 jreed Exp $ -->
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt <refentryinfo>
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt </refentryinfo>
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt <refentrytitle><application>nsupdate</application></refentrytitle>
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt <refnamediv>
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt <refname><application>nsupdate</application></refname>
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt <refpurpose>Dynamic DNS update utility</refpurpose>
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt </refnamediv>
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt </copyright>
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt </copyright>
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt <refsynopsisdiv>
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt <cmdsynopsis>
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt <arg><option>-y <replaceable class="parameter"><optional>hmac:</optional>keyname:secret</replaceable></option></arg>
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt <arg><option>-k <replaceable class="parameter">keyfile</replaceable></option></arg>
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt <arg><option>-t <replaceable class="parameter">timeout</replaceable></option></arg>
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt <arg><option>-u <replaceable class="parameter">udptimeout</replaceable></option></arg>
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt <arg><option>-r <replaceable class="parameter">udpretries</replaceable></option></arg>
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt <arg><option>-R <replaceable class="parameter">randomdev</replaceable></option></arg>
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt </cmdsynopsis>
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt </refsynopsisdiv>
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt is used to submit Dynamic DNS Update requests as defined in RFC2136
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt to a name server.
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt This allows resource records to be added or removed from a zone
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt without manually editing the zone file.
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt A single update request can contain requests to add or remove more than
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt resource record.
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt Zones that are under dynamic control via
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt or a DHCP server should not be edited by hand.
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt Manual edits could
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt conflict with dynamic updates and cause data to be lost.
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt The resource records that are dynamically added or removed with
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt have to be in the same zone.
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt Requests are sent to the zone's master server.
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt This is identified by the MNAME field of the zone's SOA record.
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt option makes
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt operate in debug mode.
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt This provides tracing information about the update requests that are
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt made and the replies received from the name server.
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt Transaction signatures can be used to authenticate the Dynamic DNS
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt These use the TSIG resource record type described in RFC2845 or the
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt SIG(0) record described in RFC3535 and RFC2931.
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt TSIG relies on a shared secret that should only be known to
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt Currently, the only supported encryption algorithm for TSIG is
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt HMAC-MD5, which is defined in RFC 2104.
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt Once other algorithms are defined for TSIG, applications will need to
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt ensure they select the appropriate algorithm as well as the key when
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt authenticating each other.
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt For instance, suitable
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt statements would be added to
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt so that the name server can associate the appropriate secret key
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt and algorithm with the IP address of the
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt client application that will be using TSIG authentication.
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt SIG(0) uses public key cryptography. To use a SIG(0) key, the public
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt key must be stored in a KEY record in a zone served by the name server.
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt does not read
8b78c993cb475cc94e88560941b28c37684789d9Francis Dupont uses the <option>-y</option> or <option>-k</option> option
8b78c993cb475cc94e88560941b28c37684789d9Francis Dupont to provide the shared secret needed to generate a TSIG record
8b78c993cb475cc94e88560941b28c37684789d9Francis Dupont for authenticating Dynamic DNS update requests, default type
8b78c993cb475cc94e88560941b28c37684789d9Francis Dupont HMAC-MD5. These options are mutually exclusive. With the
8b78c993cb475cc94e88560941b28c37684789d9Francis Dupont <option>-k</option> option, <command>nsupdate</command> reads
8b78c993cb475cc94e88560941b28c37684789d9Francis Dupont the shared secret from the file <parameter>keyfile</parameter>,
8b78c993cb475cc94e88560941b28c37684789d9Francis Dupont whose name is of the form
8b78c993cb475cc94e88560941b28c37684789d9Francis Dupont <filename>K{name}.+157.+{random}.private</filename>. For
8b78c993cb475cc94e88560941b28c37684789d9Francis Dupont historical reasons, the file
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt <filename>K{name}.+157.+{random}.key</filename> must also be
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt present. When the <option>-y</option> option is used, a
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt signature is generated from
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt <optional><parameter>hmac:</parameter></optional><parameter>keyname:secret.</parameter>
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt <parameter>keyname</parameter> is the name of the key, and
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt <parameter>secret</parameter> is the base64 encoded shared
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt secret. Use of the <option>-y</option> option is discouraged
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt because the shared secret is supplied as a command line
eab9975bcf5830a73f18ed8f320ae18ea32775eeEvan Hunt argument in clear text. This may be visible in the output
eab9975bcf5830a73f18ed8f320ae18ea32775eeEvan Hunt <citerefentry>
eab9975bcf5830a73f18ed8f320ae18ea32775eeEvan Hunt <refentrytitle>ps</refentrytitle><manvolnum>1</manvolnum>
eab9975bcf5830a73f18ed8f320ae18ea32775eeEvan Hunt </citerefentry> or in a history file maintained by the user's
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt The <option>-k</option> may also be used to specify a SIG(0) key used
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt to authenticate Dynamic DNS update requests. In this case, the key
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt specified is not an HMAC-MD5 key.
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt uses UDP to send update requests to the name server unless they are too
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt large to fit in a UDP request in which case TCP will be used.
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt option makes
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt use a TCP connection.
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt This may be preferable when a batch of update requests is made.
eec29cfd40361662b25bad50e1b94f7738a8fea0Jeremy Reed The <option>-t</option> option sets the maximum time an update request
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt take before it is aborted. The default is 300 seconds. Zero can be
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt to disable the timeout.
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt The <option>-u</option> option sets the UDP retry interval. The default
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt 3 seconds. If zero, the interval will be computed from the timeout
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt and number of UDP retries.
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt The <option>-r</option> option sets the number of UDP retries. The
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt 3. If zero, only one update request will be made.
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt class="parameter">randomdev</replaceable></option> option
b843f577bbcd6660fbaa506d9e55b156c689a5a8Evan Hunt specifies a source of randomness. If the operating system
b843f577bbcd6660fbaa506d9e55b156c689a5a8Evan Hunt does not provide a <filename>/dev/random</filename> or
b843f577bbcd6660fbaa506d9e55b156c689a5a8Evan Hunt equivalent device, the default source of randomness is keyboard
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt input. <filename>randomdev</filename> specifies the name of
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt a character device or file containing random data to be used
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt instead of the default. The special value
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt <filename>keyboard</filename> indicates that keyboard input
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt should be used. This option may be specified multiple times.
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt reads input from
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt or standard input.
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt Each command is supplied on exactly one line of input.
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt Some commands are for administrative purposes.
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt The others are either update instructions or prerequisite checks on the
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt contents of the zone.
eab9975bcf5830a73f18ed8f320ae18ea32775eeEvan Hunt These checks set conditions that some name or set of
eab9975bcf5830a73f18ed8f320ae18ea32775eeEvan Hunt resource records (RRset) either exists or is absent from the zone.
eab9975bcf5830a73f18ed8f320ae18ea32775eeEvan Hunt These conditions must be met if the entire update request is to succeed.
eab9975bcf5830a73f18ed8f320ae18ea32775eeEvan Hunt Updates will be rejected if the tests for the prerequisite conditions
eab9975bcf5830a73f18ed8f320ae18ea32775eeEvan Hunt Every update request consists of zero or more prerequisites
eab9975bcf5830a73f18ed8f320ae18ea32775eeEvan Hunt and zero or more updates.
eab9975bcf5830a73f18ed8f320ae18ea32775eeEvan Hunt This allows a suitably authenticated update request to proceed if some
eab9975bcf5830a73f18ed8f320ae18ea32775eeEvan Hunt specified resource records are present or missing from the zone.
eab9975bcf5830a73f18ed8f320ae18ea32775eeEvan Hunt A blank input line (or the <command>send</command> command)
eab9975bcf5830a73f18ed8f320ae18ea32775eeEvan Hunt accumulated commands to be sent as one Dynamic DNS update request to the
eab9975bcf5830a73f18ed8f320ae18ea32775eeEvan Hunt name server.
eab9975bcf5830a73f18ed8f320ae18ea32775eeEvan Hunt The command formats and their meaning are as follows:
eab9975bcf5830a73f18ed8f320ae18ea32775eeEvan Hunt <variablelist>
eab9975bcf5830a73f18ed8f320ae18ea32775eeEvan Hunt <varlistentry>
eab9975bcf5830a73f18ed8f320ae18ea32775eeEvan Hunt Sends all dynamic update requests to the name server
eab9975bcf5830a73f18ed8f320ae18ea32775eeEvan Hunt When no server statement is provided,
eab9975bcf5830a73f18ed8f320ae18ea32775eeEvan Hunt will send updates to the master server of the correct zone.
eab9975bcf5830a73f18ed8f320ae18ea32775eeEvan Hunt The MNAME field of that zone's SOA record will identify the
eab9975bcf5830a73f18ed8f320ae18ea32775eeEvan Hunt server for that zone.
eab9975bcf5830a73f18ed8f320ae18ea32775eeEvan Hunt is the port number on
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt where the dynamic update requests get sent.
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt If no port number is specified, the default DNS port number of
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt </varlistentry>
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt <varlistentry>
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt Sends all dynamic update requests using the local
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt When no local statement is provided,
553ead32ff5b00284e574dcabc39115d4d74ec66Evan Hunt will send updates using an address and port chosen by the
> update delete oldhost.example.com A
> update add newhost.example.com 86400 A 172.16.1.1
> prereq nxdomain nickname.example.com