1.. highlight:: console
2
3knsupdate – Dynamic DNS update utility
4======================================
5
6Synopsis
7--------
8
9:program:`knsupdate` [*options*] [*filename*]
10
11Description
12-----------
13
14This utility sends Dynamic DNS update messages to a DNS server. Update content
15is read from a file (if the parameter *filename* is given) or from the standard
16input.
17
18The format of updates is textual and is made up of commands. Every command is
19placed on the separate line of the input. Lines starting with a semicolon are
20comments and are not processed.
21
22Options
23.......
24
25**-d**
26  Enable debug messages.
27
28**-h**, **--help**
29  Print the program help.
30
31**-k** *keyfile*
32  Use the TSIG key stored in a file *keyfile* to authenticate the request. The
33  file should contain the key in the same format, which is accepted by the
34  **-y** option.
35
36**-p** *port*
37  Set the port to use for connections to the server (if not explicitly specified
38  in the update). The default is 53.
39
40**-r** *retries*
41  The number of retries for UDP requests. The default is 3.
42
43**-t** *timeout*
44  The total timeout (for all UDP update tries) of the update request in seconds.
45  The default is 12. If set to zero, the timeout is infinite.
46
47**-v**
48  Use a TCP connection.
49
50**-V**, **--version**
51  Print the program version.
52
53**-y** [*alg*:]\ *name*:*key*
54  Use the TSIG key with a name *name* to authenticate the request. The *alg*
55  part specifies the algorithm (the default is hmac-sha256) and *key* specifies
56  the shared secret encoded in Base64.
57
58Commands
59........
60
61**server** *name* [*port*]
62  Specifies a receiving server of the dynamic update message. The *name* parameter
63  can be either a host name or an IP address. If the *port* is not specified,
64  the default port is used. The default port value can be controlled using
65  the **-p** program option.
66
67**local** *address* [*port*]
68  Specifies outgoing *address* and *port*. If no local is specified, the
69  address and port are set by the system automatically. The default port number
70  is 0.
71
72**zone** *name*
73  Specifies that all updates are done within a zone *name*. If not specified,
74  the root zone (**.**) is considered.
75
76**origin** *name*
77  Specifies fully qualified domain name suffix which is appended to non-fqd
78  owners in update commands. The default origin is the root zone.
79
80**class** *name*
81  Sets *name* as the default class for all updates. If not used, the default
82  class is IN.
83
84**ttl** *value*
85  Sets *value* as the default TTL (in seconds). If not used, the default value
86  is 0.
87
88**key** [*alg*:]\ *name* *key*
89  Specifies the TSIG *key* named *name* to authenticate the request. An optional
90  *alg* algorithm can be specified. This command has the same effect as
91  the program option **-y**.
92
93[**prereq**] **nxdomain** *name*
94  Adds a prerequisite for a non-existing record owned by *name*.
95
96[**prereq**] **yxdomain** *name*
97  Adds a prerequisite for an existing record owned by *name*.
98
99[**prereq**] **nxrrset** *name* [*class*] *type*
100  Adds a prerequisite for a non-existing record of the *type* owned by *name*.
101  Internet *class* is expected.
102
103[**prereq**] **yxrrset** *name* [*class*] *type* [*data*]
104  Adds a prerequisite for an existing record of the *type* owned by *name*
105  with optional *data*. Internet *class* is expected.
106
107[**update**] **add** *name* [*ttl*] [*class*] *type* *data*
108  Adds a request to add a new resource record into the zone.
109  Please note that if the *name* is not fully qualified domain name, the
110  current origin name is appended to it.
111
112[**update**] **del**\[**ete**] *name* [*ttl*] [*class*] [*type*] [*data*]
113  Adds a request to remove all (or matching *class*, *type* or *data*)
114  resource records from the zone. There is the same requirement for the *name*
115  parameter as in **update add** command. The *ttl* item is ignored.
116
117**show**
118  Displays current content of the update message.
119
120**send**
121  Sends the current update message and cleans the list of updates.
122
123**answer**
124  Displays the last answer from the server.
125
126**debug**
127  Enable debugging. This command has the same meaning as the **-d** program option.
128
129**quit**
130  Quit the program.
131
132Notes
133-----
134
135Options **-k** and **-y** can not be used simultaneously.
136
137Dnssec-keygen keyfile format is not supported. Use :manpage:`keymgr(8)` instead.
138
139Zone name/server guessing is not supported if the zone name/server is not specified.
140
141Empty line doesn't send the update.
142
143Exit values
144-----------
145
146Exit status of 0 means successful operation. Any other exit status indicates
147an error.
148
149Examples
150--------
151
1521. Send one update of the zone example.com to the server 192.168.1.1. The update
153   contains two new records::
154
155     $ knsupdate
156     > server 192.168.1.1
157     > zone example.com.
158     > origin example.com.
159     > ttl 3600
160     > add test1.example.com. 7200 A 192.168.2.2
161     > add test2 TXT "hello"
162     > show
163     > send
164     > answer
165     > quit
166
167See Also
168--------
169
170:manpage:`kdig(1)`, :manpage:`khost(1)`, :manpage:`keymgr(8)`.
171