man_knsupdate.rst 4.83 KB
Newer Older
1
2
.. highlight:: console

3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
knsupdate -- Dynamic DNS update utility
=======================================

Synopsis
--------

:program:`knsupdate` [*options*] [*filename*]

Description
-----------

This utility sends Dynamic DNS update messages to a DNS server. Update content
is read from a file (if the parameter *filename* is given) or from the standard
input.

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

Options
.......

**-d**
  Enable debug messages.

**-h**, **--help**
  Print help and usage.

**-k** *keyfile*
32
33
34
  Use TSIG key stored in a file *keyfile* to authenticate the request. The
  file should contain the key in the same format, which is accepted by the
  **-y** option.
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132

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

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

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

**-v**, **--version**
  Print program version.

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

Commands
........

**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,
  the 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. The default port number
  is 0.

**zone** *name*
  Specifies that all updates are done within a zone *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 the default class for all updates. If not used, the default
  class is IN.

**ttl** *value*
  Sets *value* as the default TTL (in seconds). If not used, the default value
  is 0.

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

[**prereq**] **nxdomain** *name*
  Adds a prerequisite for a non-existing record owned by *name*.

[**prereq**] **yxdomain** *name*
  Adds a prerequisite for an existing record owned by *name*.

[**prereq**] **nxrrset** *name* [*class*] *type*
  Adds a prerequisite for a non-existing record of the *type* owned by *name*.
  Internet *class* is expected.

[**prereq**] **yxrrset** *name* [*class*] *type* [*data*]
  Adds a prerequisite for an existing record of the *type* owned by *name*
  with optional *data*. Internet *class* is expected.

[**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, the
  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* or *data*)
  resource records from the zone. There is the same requirement for the *name*
  parameter as in **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**.

Notes
-----

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

Missing features with regard to ISC nsupdate:

133
134
  Authentication using GSS-TSIG or SIG(0).

135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
  Options **-D**, **-g**, **-o**, **-l**, **-L**, **-R** and **-u**.

  Commands: **gsstsig**, **oldgsstsig** and **realm**.

Differences with regard to ISC nsupdate:

  Zone name/server guessing, if the zone name/server is not specified.

  Empty line doesn't send the update.

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

Examples
--------

1. Send one update of zone example.com to server 192.168.1.1. The update
   contains two new records::

     $ 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

See Also
--------

:manpage:`kdig(1)`, :manpage:`khost(1)`.