knsupdate(1)

NAME

knsupdate
    - Dynamic DNS update utility (libknot equivalent of ISC nsupdate)

SYNOPSIS
knsupdate [options] [filename]

DESCRIPTION
The utility sends Dynamic DNS update message to DNS server. Update content is read from a file (if the parameter filename is given) or from standard input. The format of the update is described in INPUT FORMAT section.

OPTIONS

-d  Enable debugging messages.

-v  Use TCP protocol instead of the default UDP.

-p port
    Set the port to use for connections to a server (if not explicitly specified in the update). The default is 53.

-t timeout
    The total timeout (all UDP update tries) of the update request in seconds. The default is 12. If set to zero, the timeout is infinite.

-r retries
    The number of retries for UDP requests. The default is 3.

-k keyfile
    Use TSIG or SIG-0 key stored in file to authenticate the request. The tool supports keys generated by ISC dnssec-keygen. The key comprises of public (.key extension) and private part (.private extension). Either of these file names or a name without the extension can be specified as keyfile parameter.

-y [hmac:]name:key
    Use TSIG key to authenticate the request. The hmac part specifies the algorithm (the default is hmac-md5), name specifies the key name, and key specifies the shared secret encoded in Base64.

-h, --help
    Print help.

-V, --version
    Print program version.

NOTE
Options -k and -y cannot be used mutually.

INPUT FORMAT
The input format is textual and is made up of commands. Every command is placed on a separate line of the input. Lines starting with a semicolon are comments and are not processed.

List of commands format and their description:

server name [port]
    Specifies a receiving server of the dynamic update message. Parameter name can be either a host name or an IP address. If the port is not specified, default port is used. The default port value can be controlled using program option -p.

local address [port]
    Specifies outgoing address and port. If no local is specified, the address and port are set by the system automatically. Default port number is 0.

zone name
    Specifies that all updates are done within a zone named name. If not used, the default zone is the root zone.

origin name
    Specifies fully qualified domain name suffix which is appended to non-fqd owners in update commands. The default origin is the root zone.

class name
    Sets name as a default class for all updates. If not used, the default class is IN.

ttl value
    Sets value as a default TTL (time to live) in seconds. If not used, the default value is 0.

key name key
    Specifies TSIG key to authenticate the request. This command has the same semantics as the program option -y, except that the MAC algorithm cannot be set.

[update] add name [ttl] [class] type data
    Adds a request to add a new resource record into the zone. Please note that if the name is not fully qualified domain name, current origin name is appended to it.

[update] del[ete] name [ttl] [class] [type] [data]
    Adds a request to remove all (or matching class, type, data) resource records from the zone. There is the same requirement for the name parameter as in the update add command. The ttl item is ignored.

show
    Displays current content of the update message.

send
    Sends the current update message and cleans the list of updates.

answer
    Displays the last answer from the server.

debug
    Enable debugging. This command has the same meaning as program option -d.

NOTE

  Missing features with regard to ISC nsupdate
Options -D, -g, -o, -l, -L, -R, -u.

Commands: gsstsig, oldgsstsig, realm, prereq (nxdomain, yxdomain, nxrrset, yxrrset).

  Differences with regard to ISC nsupdate
Zone name/server guessing, if the zone name/server is not specified.

Empty line doesn't send an update.

Bind-like key format (ddns-confgen output) is not supported.

Command add doesn't require ttl item to be set. In such case,
    the default ttl value is used.

EXAMPLES
Example 1. Add two records to the zone example.com.:

knsupdate
    server 192.168.1.1
    zone example.com.
    origin example.com.
    ttl 3600
    add test1.example.com. 7200 A 192.168.2.2
    add test2 TXT "hello"
    show
    send
    answer

AUTHOR
Marek Vavruša, Daniel Salzman, Jan Včelák (www.knot-dns.cz)

Please send any bug reports or comments to knot-dns@labs.nic.cz

SEE ALSO
kdig(1), khost(1).