Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
nsupdate(8)
Edit
PageHistory
Diff
Info
LikePages
NSUPDATE !!!NSUPDATE NAME SYNOPSIS DESCRIPTION INPUT FORMAT EXAMPLES FILES SEE ALSO BUGS ---- !!NAME nsupdate - Dynamic DNS update utility !!SYNOPSIS __nsupdate__ [[ __-d__ ] [[ __[[ -y__ ''keyname:secret'' __] [[ -k__ ''keyfile'' __]__ ] [[ __-v__ ] [[ __filename__ ] !!DESCRIPTION __nsupdate__ is used to submit Dynamic DNS Update requests as defined in RFC2136 to a name server. This allows resource records to be added or removed from a zone without manually editing the zone file. A single update request can contain requests to add or remove more than one resource record. Zones that are under dynamic control via __nsupdate__ or a DHCP server should not be edited by hand. Manual edits could conflict with dynamic updates and cause data to be lost. The resource records that are dynamically added or removed with __nsupdate__ have to be in the same zone. Requests are sent to the zone's master server. This is identified by the MNAME field of the zone's SOA record. The __-d__ option makes __nsupdate__ operate in debug mode. This provides tracing information about the update requests that are made and the replies received from the name server. Transaction signatures can be used to authenticate the Dynamic DNS updates. These use the TSIG resource record type described in RFC2845. The signatures rely on a shared secret that should only be known to __nsupdate__ and the name server. Currently, the only supported encryption algorithm for TSIG is HMAC-MD5, which is defined in RFC 2104. Once other algorithms are defined for TSIG, applications will need to ensure they select the appropriate algorithm as well as the key when authenticating each other. For instance suitable __key__ and __server__ statements would be added to ''/etc/named.conf'' so that the name server can associate the appropriate secret key and algorithm with the IP address of the client application that will be using TSIG authentication. __nsupdate__ does not read ''/etc/named.conf''. __nsupdate__ uses the __-y__ or __-k__ option to provide the shared secret needed to generate a TSIG record for authenticating Dynamic DNS update requests. These options are mutually exclusive. With the __-k__ option, __nsupdate__ reads the shared secret from the file ''keyfile'', whose name is of the form ''K{name}.+157.+{random}.private''. For historical reasons, the file ''K{name}.+157.+{random}.key'' must also be present. When the __-y__ option is used, a signature is generated from ''keyname:secret. keyname'' is the name of the key, and ''secret'' is the base64 encoded shared secret. Use of the __-y__ option is discouraged because the shared secret is supplied as a command line argument in clear text. This may be visible in the output from ps(1) or in a history file maintained by the user's shell. By default __nsupdate__ uses UDP to send update requests to the name server. The __-v__ option makes __nsupdate__ use a TCP connection. This may be preferable when a batch of update requests is made. !!INPUT FORMAT __nsupdate__ reads input from ''filename'' or standard input. 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. 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 __send__ command) causes the accumulated commands to be sent as one Dynamic DNS update request to the name server. The command formats and their meaning are as follows: __server servername [[ port ]__ Sends all dynamic update requests to the name server ''servername''. When no server statement is provided, __nsupdate__ 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. ''port'' is the port number on ''servername'' where the dynamic update requests get sent. If no port number is specified, the default DNS port number of 53 is used. __local address [[ port ]__ Sends all dynamic update requests using the local ''address''. When no local statement is provided, __nsupdate__ will send updates using an address and port choosen by the system. ''port'' can additionally be used to make requests come from a specific port. If no port number is specified, the system will assign one. __zone zonename__ Specifies that all updates are to be made to the zone ''zonename''. If no ''zone'' statement is provided, __nsupdate__ will attempt determine the correct zone to update based on the rest of the input. __key name secret__ Specifies that all updates are to be TSIG signed using the ''keyname keysecret'' pair. The __key__ command overrides any key specified on the command line via __-y__ or __-k__. __prereq nxdomain domain-name__ Requires that no resource record of any type exists with name ''domain-name''. __prereq yxdomain domain-name__ Requires that ''domain-name'' exists (has as at least one resource record, of any type). __prereq nxrrset domain-name [[ class ] type__ Requires that no resource record exists of the specified ''type'', ''class'' and ''domain-name''. If ''class'' is omitted, IN (internet) is assumed. __prereq yxrrset domain-name [[ class ] type__ This requires that a resource record of the specified ''type'', ''class'' and ''domain-name'' must exist. If ''class'' is omitted, IN (internet) is assumed. __prereq yxrrset domain-name [[ class ] type data__''...'' The ''data'' from each set of prerequisites of this form sharing a common ''type'', ''class'', and ''domain-name'' 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 ''type'', ''class'', and ''domain-name''. The ''data'' are written in the standard text representation of the resource record's RDATA. __update delete domain-name [[ ttl ] [[ class ] [[ type [[ data__''...'' __] ]__ Deletes any resource records named ''domain-name''. If ''type'' and ''data'' is provided, only matching resource records will be removed. The internet class is assumed if ''class'' is not supplied. The ''ttl'' is ignored, and is only allowed for compatibility. __update add domain-name ttl [[ class ] type data__''...'' Adds a new resource record with the specified ''ttl'', ''class'' and ''data''. __show__ Displays the current message, containing all of the prerequisites and updates specified since the last send. __send__ Sends the current message. This is equivalent to entering a blank line. Lines beginning with a semicolon are comments, and are ignored. !!EXAMPLES The examples below show how __nsupdate__ could be used to insert and delete resource records from the __example.com__ 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 __example.com__. # nsupdate Any A records for __oldhost.example.com__ are deleted. and an A record for __newhost.example.com__ it IP address 172.16.1.1 is added. The newly-added record has a 1 day TTL (86400 seconds) # nsupdate The prerequisite condition gets the name server to check that there are no resource records of any type for __nickname.example.com__. 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 SIG, KEY and NXT records.) !!FILES __/etc/resolv.conf__ used to identify default name server __K{name}.+157.+{random}.key__ base-64 encoding of HMAC-MD5 key created by dnssec-keygen(8). __K{name}.+157.+{random}.private__ base-64 encoding of HMAC-MD5 key created by dnssec-keygen(8). !!SEE ALSO __RFC2136__, __RFC3007__, __RFC2104__, __RFC2845__, __RFC1034__, __RFC2535__, named(8), dnssec-keygen(8). !!BUGS 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. ----
One page links to
nsupdate(8)
:
Man8n
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.