nsupdate.docbook revision 351b62535d4c4f89883bfdba025999dd32490266
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa [<!ENTITY mdash "&#8212;">]>
7c7a19761235efff584ee65a1c6dc4aa1735ff64Eugen Kuksa<!--
7c7a19761235efff584ee65a1c6dc4aa1735ff64Eugen Kuksa - Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC")
7c7a19761235efff584ee65a1c6dc4aa1735ff64Eugen Kuksa - Copyright (C) 2000-2003 Internet Software Consortium.
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa -
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa - Permission to use, copy, modify, and/or distribute this software for any
23305f217b86a2ebf90a848af9036908e0070542Eugen Kuksa - purpose with or without fee is hereby granted, provided that the above
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa - copyright notice and this permission notice appear in all copies.
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa -
23305f217b86a2ebf90a848af9036908e0070542Eugen Kuksa - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa - AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
7ca38d75d045fade73b81bff6fdf34f4755d75fbEugen Kuksa - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
7ca38d75d045fade73b81bff6fdf34f4755d75fbEugen Kuksa - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
7ca38d75d045fade73b81bff6fdf34f4755d75fbEugen Kuksa - PERFORMANCE OF THIS SOFTWARE.
7ca38d75d045fade73b81bff6fdf34f4755d75fbEugen Kuksa-->
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa<!-- $Id: nsupdate.docbook,v 1.38 2009/06/10 00:27:21 each Exp $ -->
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa<refentry id="man.nsupdate">
23305f217b86a2ebf90a848af9036908e0070542Eugen Kuksa <refentryinfo>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <date>Jun 30, 2000</date>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa </refentryinfo>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <refmeta>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <refentrytitle><application>nsupdate</application></refentrytitle>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <manvolnum>1</manvolnum>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <refmiscinfo>BIND9</refmiscinfo>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa </refmeta>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <refnamediv>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <refname><application>nsupdate</application></refname>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <refpurpose>Dynamic DNS update utility</refpurpose>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa </refnamediv>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <docinfo>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <copyright>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <year>2004</year>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <year>2005</year>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <year>2006</year>
db149239590d2a39d399f12cd01609b190ea4763Eugen Kuksa <year>2007</year>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <year>2008</year>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <year>2009</year>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <holder>Internet Systems Consortium, Inc. ("ISC")</holder>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa </copyright>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <copyright>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <year>2000</year>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <year>2001</year>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <year>2002</year>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <year>2003</year>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <holder>Internet Software Consortium.</holder>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa </copyright>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa </docinfo>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <refsynopsisdiv>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <cmdsynopsis>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <command>nsupdate</command>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <arg><option>-d</option></arg>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <arg><option>-D</option></arg>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <group>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <arg><option>-g</option></arg>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <arg><option>-o</option></arg>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <arg><option>-y <replaceable class="parameter"><optional>hmac:</optional>keyname:secret</replaceable></option></arg>
db149239590d2a39d399f12cd01609b190ea4763Eugen Kuksa <arg><option>-k <replaceable class="parameter">keyfile</replaceable></option></arg>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa </group>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <arg><option>-t <replaceable class="parameter">timeout</replaceable></option></arg>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <arg><option>-u <replaceable class="parameter">udptimeout</replaceable></option></arg>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <arg><option>-r <replaceable class="parameter">udpretries</replaceable></option></arg>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <arg><option>-R <replaceable class="parameter">randomdev</replaceable></option></arg>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <arg><option>-v</option></arg>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <arg>filename</arg>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa </cmdsynopsis>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa </refsynopsisdiv>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <refsect1>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <title>DESCRIPTION</title>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <para><command>nsupdate</command>
23305f217b86a2ebf90a848af9036908e0070542Eugen Kuksa is used to submit Dynamic DNS Update requests as defined in RFC2136
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa to a name server.
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa This allows resource records to be added or removed from a zone
db149239590d2a39d399f12cd01609b190ea4763Eugen Kuksa without manually editing the zone file.
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa A single update request can contain requests to add or remove more than
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa one
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa resource record.
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa </para>
23305f217b86a2ebf90a848af9036908e0070542Eugen Kuksa <para>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa Zones that are under dynamic control via
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <command>nsupdate</command>
7ca38d75d045fade73b81bff6fdf34f4755d75fbEugen Kuksa or a DHCP server should not be edited by hand.
7ca38d75d045fade73b81bff6fdf34f4755d75fbEugen Kuksa Manual edits could
7ca38d75d045fade73b81bff6fdf34f4755d75fbEugen Kuksa conflict with dynamic updates and cause data to be lost.
7ca38d75d045fade73b81bff6fdf34f4755d75fbEugen Kuksa </para>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <para>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa The resource records that are dynamically added or removed with
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <command>nsupdate</command>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa have to be in the same zone.
7c7a19761235efff584ee65a1c6dc4aa1735ff64Eugen Kuksa Requests are sent to the zone's master server.
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa This is identified by the MNAME field of the zone's SOA record.
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa </para>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <para>
23305f217b86a2ebf90a848af9036908e0070542Eugen Kuksa The
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <option>-d</option>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa option makes
7ca38d75d045fade73b81bff6fdf34f4755d75fbEugen Kuksa <command>nsupdate</command>
7ca38d75d045fade73b81bff6fdf34f4755d75fbEugen Kuksa operate in debug mode.
7ca38d75d045fade73b81bff6fdf34f4755d75fbEugen Kuksa This provides tracing information about the update requests that are
7ca38d75d045fade73b81bff6fdf34f4755d75fbEugen Kuksa made and the replies received from the name server.
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa </para>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <para>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa The <option>-D</option> option makes <command>nsupdate</command>
23305f217b86a2ebf90a848af9036908e0070542Eugen Kuksa report additional debugging information to <option>-d</option>.
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa </para>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <para>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa The <option>-L</option> option with an integer argument of zero or
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa higher sets the logging debug level. If zero, logging is disabled.
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa </para>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <para>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa Transaction signatures can be used to authenticate the Dynamic
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa DNS updates. These use the TSIG resource record type described
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa in RFC2845 or the SIG(0) record described in RFC3535 and
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa RFC2931 or GSS-TSIG as described in RFC3645. TSIG relies on
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa a shared secret that should only be known to
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <command>nsupdate</command> and the name server. Currently,
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa the only supported encryption algorithm for TSIG is HMAC-MD5,
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa which is defined in RFC 2104. Once other algorithms are
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa defined for TSIG, applications will need to ensure they select
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa the appropriate algorithm as well as the key when authenticating
db149239590d2a39d399f12cd01609b190ea4763Eugen Kuksa each other. For instance, suitable <type>key</type> and
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <type>server</type> statements would be added to
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <filename>/etc/named.conf</filename> so that the name server
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa can associate the appropriate secret key and algorithm with
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa the IP address of the client application that will be using
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa TSIG authentication. SIG(0) uses public key cryptography.
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa To use a SIG(0) key, the public key must be stored in a KEY
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa record in a zone served by the name server.
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <command>nsupdate</command> does not read
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <filename>/etc/named.conf</filename>.
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa GSS-TSIG uses Kerberos credentials.
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa </para>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <para><command>nsupdate</command>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa uses the <option>-y</option> or <option>-k</option> option
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa to provide the shared secret needed to generate a TSIG record
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa for authenticating Dynamic DNS update requests, default type
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa HMAC-MD5. These options are mutually exclusive.
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa </para>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <para>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa When the <option>-y</option> option is used, a signature is
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa generated from
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <optional><parameter>hmac:</parameter></optional><parameter>keyname:secret.</parameter>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <parameter>keyname</parameter> is the name of the key, and
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <parameter>secret</parameter> is the base64 encoded shared secret.
db149239590d2a39d399f12cd01609b190ea4763Eugen Kuksa Use of the <option>-y</option> option is discouraged because the
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa shared secret is supplied as a command line argument in clear text.
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa This may be visible in the output from
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <citerefentry>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <refentrytitle>ps</refentrytitle><manvolnum>1</manvolnum>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa </citerefentry>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa or in a history file maintained by the user's shell.
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa </para>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <para>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa With the
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <option>-k</option> option, <command>nsupdate</command> reads
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa the shared secret from the file <parameter>keyfile</parameter>.
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa Keyfiles may be in two formats: a single file containing
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa a <filename>named.conf</filename>-format <command>key</command>
23305f217b86a2ebf90a848af9036908e0070542Eugen Kuksa statement, which may be generated automatically by
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <command>ddns-confgen</command>, or a pair of files whose names are
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa of the format <filename>K{name}.+157.+{random}.key</filename> and
db149239590d2a39d399f12cd01609b190ea4763Eugen Kuksa <filename>K{name}.+157.+{random}.private</filename>, which can be
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa generated by <command>dnssec-keygen</command>.
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa The <option>-k</option> may also be used to specify a SIG(0) key used
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa to authenticate Dynamic DNS update requests. In this case, the key
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa specified is not an HMAC-MD5 key.
23305f217b86a2ebf90a848af9036908e0070542Eugen Kuksa </para>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <para>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <command>nsupdate</command> can be run in a local-host only mode
7ca38d75d045fade73b81bff6fdf34f4755d75fbEugen Kuksa using the <option>-l</option> flag. This sets the server address to
7ca38d75d045fade73b81bff6fdf34f4755d75fbEugen Kuksa localhost (disabling the <command>server</command> so that the server
7ca38d75d045fade73b81bff6fdf34f4755d75fbEugen Kuksa address cannot be overridden). Connections to the local server will
7ca38d75d045fade73b81bff6fdf34f4755d75fbEugen Kuksa use a TSIG key found in <filename>/var/run/named/ddns.key</filename>,
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa which is automatically generated by <command>named</command> if any
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa local master zone has the <command>dynamic</command> zone option set
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa to yes. The location of this key file can be overridden with
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa the <option>-k</option> option.
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa </para>
23305f217b86a2ebf90a848af9036908e0070542Eugen Kuksa <para>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa By default, <command>nsupdate</command>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa uses UDP to send update requests to the name server unless they are too
7ca38d75d045fade73b81bff6fdf34f4755d75fbEugen Kuksa large to fit in a UDP request in which case TCP will be used.
7ca38d75d045fade73b81bff6fdf34f4755d75fbEugen Kuksa The
7ca38d75d045fade73b81bff6fdf34f4755d75fbEugen Kuksa <option>-v</option>
7ca38d75d045fade73b81bff6fdf34f4755d75fbEugen Kuksa option makes
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <command>nsupdate</command>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa use a TCP connection.
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa This may be preferable when a batch of update requests is made.
23305f217b86a2ebf90a848af9036908e0070542Eugen Kuksa </para>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <para>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa The <option>-p</option> sets the default port number to use for
7ca38d75d045fade73b81bff6fdf34f4755d75fbEugen Kuksa connections to a name server. The default is 53.
7ca38d75d045fade73b81bff6fdf34f4755d75fbEugen Kuksa </para>
7ca38d75d045fade73b81bff6fdf34f4755d75fbEugen Kuksa <para>
7ca38d75d045fade73b81bff6fdf34f4755d75fbEugen Kuksa The <option>-t</option> option sets the maximum time an update request
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa can
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa take before it is aborted. The default is 300 seconds. Zero can be
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa used
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa to disable the timeout.
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa </para>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <para>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa The <option>-u</option> option sets the UDP retry interval. The default
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa is
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa 3 seconds. If zero, the interval will be computed from the timeout
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa interval
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa and number of UDP retries.
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa </para>
db149239590d2a39d399f12cd01609b190ea4763Eugen Kuksa <para>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa The <option>-r</option> option sets the number of UDP retries. The
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa default is
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa 3. If zero, only one update request will be made.
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa </para>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <para>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa The <option>-R <replaceable
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa class="parameter">randomdev</replaceable></option> option
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa specifies a source of randomness. If the operating system
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa does not provide a <filename>/dev/random</filename> or
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa equivalent device, the default source of randomness is keyboard
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa input. <filename>randomdev</filename> specifies the name of
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa a character device or file containing random data to be used
db149239590d2a39d399f12cd01609b190ea4763Eugen Kuksa instead of the default. The special value
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <filename>keyboard</filename> indicates that keyboard input
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa should be used. This option may be specified multiple times.
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa </para>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa </refsect1>
23305f217b86a2ebf90a848af9036908e0070542Eugen Kuksa
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <refsect1>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <title>INPUT FORMAT</title>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <para><command>nsupdate</command>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa reads input from
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa <parameter>filename</parameter>
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa or standard input.
bdc69d2e103b81dfabf3965a968cad610feecfffEugen Kuksa 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.
</para>
<para>
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 <command>send</command> command)
causes the
accumulated commands to be sent as one Dynamic DNS update request to the
name server.
</para>
<para>
The command formats and their meaning are as follows:
<variablelist>
<varlistentry>
<term>
<command>server</command>
<arg choice="req">servername</arg>
<arg choice="opt">port</arg>
</term>
<listitem>
<para>
Sends all dynamic update requests to the name server
<parameter>servername</parameter>.
When no server statement is provided,
<command>nsupdate</command>
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.
<parameter>port</parameter>
is the port number on
<parameter>servername</parameter>
where the dynamic update requests get sent.
If no port number is specified, the default DNS port number of
53 is
used.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<command>local</command>
<arg choice="req">address</arg>
<arg choice="opt">port</arg>
</term>
<listitem>
<para>
Sends all dynamic update requests using the local
<parameter>address</parameter>.
When no local statement is provided,
<command>nsupdate</command>
will send updates using an address and port chosen by the
system.
<parameter>port</parameter>
can additionally be used to make requests come from a specific
port.
If no port number is specified, the system will assign one.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<command>zone</command>
<arg choice="req">zonename</arg>
</term>
<listitem>
<para>
Specifies that all updates are to be made to the zone
<parameter>zonename</parameter>.
If no
<parameter>zone</parameter>
statement is provided,
<command>nsupdate</command>
will attempt determine the correct zone to update based on the
rest of the input.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<command>class</command>
<arg choice="req">classname</arg>
</term>
<listitem>
<para>
Specify the default class.
If no <parameter>class</parameter> is specified, the
default class is
<parameter>IN</parameter>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<command>ttl</command>
<arg choice="req">seconds</arg>
</term>
<listitem>
<para>
Specify the default time to live for records to be added.
The value <parameter>none</parameter> will clear the default
ttl.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<command>key</command>
<arg choice="req">name</arg>
<arg choice="req">secret</arg>
</term>
<listitem>
<para>
Specifies that all updates are to be TSIG-signed using the
<parameter>keyname</parameter> <parameter>keysecret</parameter> pair.
The <command>key</command> command
overrides any key specified on the command line via
<option>-y</option> or <option>-k</option>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<command>prereq nxdomain</command>
<arg choice="req">domain-name</arg>
</term>
<listitem>
<para>
Requires that no resource record of any type exists with name
<parameter>domain-name</parameter>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<command>prereq yxdomain</command>
<arg choice="req">domain-name</arg>
</term>
<listitem>
<para>
Requires that
<parameter>domain-name</parameter>
exists (has as at least one resource record, of any type).
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<command>prereq nxrrset</command>
<arg choice="req">domain-name</arg>
<arg choice="opt">class</arg>
<arg choice="req">type</arg>
</term>
<listitem>
<para>
Requires that no resource record exists of the specified
<parameter>type</parameter>,
<parameter>class</parameter>
and
<parameter>domain-name</parameter>.
If
<parameter>class</parameter>
is omitted, IN (internet) is assumed.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<command>prereq yxrrset</command>
<arg choice="req">domain-name</arg>
<arg choice="opt">class</arg>
<arg choice="req">type</arg>
</term>
<listitem>
<para>
This requires that a resource record of the specified
<parameter>type</parameter>,
<parameter>class</parameter>
and
<parameter>domain-name</parameter>
must exist.
If
<parameter>class</parameter>
is omitted, IN (internet) is assumed.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<command>prereq yxrrset</command>
<arg choice="req">domain-name</arg>
<arg choice="opt">class</arg>
<arg choice="req">type</arg>
<arg choice="req" rep="repeat">data</arg>
</term>
<listitem>
<para>
The
<parameter>data</parameter>
from each set of prerequisites of this form
sharing a common
<parameter>type</parameter>,
<parameter>class</parameter>,
and
<parameter>domain-name</parameter>
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
<parameter>type</parameter>,
<parameter>class</parameter>,
and
<parameter>domain-name</parameter>.
The
<parameter>data</parameter>
are written in the standard text representation of the resource
record's
RDATA.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<command>update delete</command>
<arg choice="req">domain-name</arg>
<arg choice="opt">ttl</arg>
<arg choice="opt">class</arg>
<arg choice="opt">type <arg choice="opt" rep="repeat">data</arg></arg>
</term>
<listitem>
<para>
Deletes any resource records named
<parameter>domain-name</parameter>.
If
<parameter>type</parameter>
and
<parameter>data</parameter>
is provided, only matching resource records will be removed.
The internet class is assumed if
<parameter>class</parameter>
is not supplied. The
<parameter>ttl</parameter>
is ignored, and is only allowed for compatibility.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<command>update add</command>
<arg choice="req">domain-name</arg>
<arg choice="req">ttl</arg>
<arg choice="opt">class</arg>
<arg choice="req">type</arg>
<arg choice="req" rep="repeat">data</arg>
</term>
<listitem>
<para>
Adds a new resource record with the specified
<parameter>ttl</parameter>,
<parameter>class</parameter>
and
<parameter>data</parameter>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<command>show</command>
</term>
<listitem>
<para>
Displays the current message, containing all of the
prerequisites and
updates specified since the last send.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<command>send</command>
</term>
<listitem>
<para>
Sends the current message. This is equivalent to entering a
blank line.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<command>answer</command>
</term>
<listitem>
<para>
Displays the answer.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<command>debug</command>
</term>
<listitem>
<para>
Turn on debugging.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
<para>
Lines beginning with a semicolon are comments and are ignored.
</para>
</refsect1>
<refsect1>
<title>EXAMPLES</title>
<para>
The examples below show how
<command>nsupdate</command>
could be used to insert and delete resource records from the
<type>example.com</type>
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
<type>example.com</type>.
<programlisting>
# nsupdate
&gt; update delete oldhost.example.com A
&gt; update add newhost.example.com 86400 A 172.16.1.1
&gt; send
</programlisting>
</para>
<para>
Any A records for
<type>oldhost.example.com</type>
are deleted.
And an A record for
<type>newhost.example.com</type>
with IP address 172.16.1.1 is added.
The newly-added record has a 1 day TTL (86400 seconds).
<programlisting>
# nsupdate
&gt; prereq nxdomain nickname.example.com
&gt; update add nickname.example.com 86400 CNAME somehost.example.com
&gt; send
</programlisting>
</para>
<para>
The prerequisite condition gets the name server to check that there
are no resource records of any type for
<type>nickname.example.com</type>.
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.)
</para>
</refsect1>
<refsect1>
<title>FILES</title>
<variablelist>
<varlistentry>
<term><constant>/etc/resolv.conf</constant></term>
<listitem>
<para>
used to identify default name server
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>/var/run/named/ddns.key</constant></term>
<listitem>
<para>
sets the default TSIG key for use in local-only mode
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>K{name}.+157.+{random}.key</constant></term>
<listitem>
<para>
base-64 encoding of HMAC-MD5 key created by
<citerefentry>
<refentrytitle>dnssec-keygen</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><constant>K{name}.+157.+{random}.private</constant></term>
<listitem>
<para>
base-64 encoding of HMAC-MD5 key created by
<citerefentry>
<refentrytitle>dnssec-keygen</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para><citerefentry>
<refentrytitle>RFC2136</refentrytitle>
</citerefentry>,
<citerefentry>
<refentrytitle>RFC3007</refentrytitle>
</citerefentry>,
<citerefentry>
<refentrytitle>RFC2104</refentrytitle>
</citerefentry>,
<citerefentry>
<refentrytitle>RFC2845</refentrytitle>
</citerefentry>,
<citerefentry>
<refentrytitle>RFC1034</refentrytitle>
</citerefentry>,
<citerefentry>
<refentrytitle>RFC2535</refentrytitle>
</citerefentry>,
<citerefentry>
<refentrytitle>RFC2931</refentrytitle>
</citerefentry>,
<citerefentry>
<refentrytitle>named</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>ddns-confgen</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>,
<citerefentry>
<refentrytitle>dnssec-keygen</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>.
</para>
</refsect1>
<refsect1>
<title>BUGS</title>
<para>
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.
</para>
</refsect1>
</refentry><!--
- Local variables:
- mode: sgml
- End:
-->