1KNSUPDATE(1)                       Knot DNS                       KNSUPDATE(1)
2
3
4

NAME

6       knsupdate - Dynamic DNS update utility
7

SYNOPSIS

9       knsupdate [options] [filename]
10

DESCRIPTION

12       This  utility sends Dynamic DNS update messages to a DNS server. Update
13       content is read from a file (if the parameter  filename  is  given)  or
14       from the standard input.
15
16       The format of updates is textual and is made up of commands. Every com‐
17       mand is placed on the separate line of the input. Lines starting with a
18       semicolon are comments and are not processed.
19
20   Parameters
21       filename
22              Path to the file with knsupdate commands.
23
24   Options
25       -d     Enable debug messages.
26
27       -h, --help
28              Print the program help.
29
30       -k keyfile
31              Use  the  TSIG  key stored in a file keyfile to authenticate the
32              request. The file should contain the key  in  the  same  format,
33              which is accepted by the -y option.
34
35       -p port
36              Set  the  port  to use for connections to the server (if not ex‐
37              plicitly specified in the update). The default is 53.
38
39       -r retries
40              The number of retries for UDP requests. The default is 3.
41
42       -t timeout
43              The total timeout (for all UDP update tries) of the  update  re‐
44              quest  in seconds.  The default is 12. If set to zero, the time‐
45              out is infinite.
46
47       -v     Use a TCP connection.
48
49       -V, --version
50              Print the program version.
51
52       -y [alg:]name:key
53              Use the TSIG key with a name name to authenticate  the  request.
54              The   alg   part   specifies   the  algorithm  (the  default  is
55              hmac-sha256) and key specifies  the  shared  secret  encoded  in
56              Base64.
57
58   Commands
59       server name [port]
60              Specifies  a receiving server of the dynamic update message. The
61              name parameter can be either a host name or an  IP  address.  If
62              the port is not specified, the default port is used. The default
63              port value can be controlled using the -p program option.
64
65       local address [port]
66              Specifies outgoing address and port. If no local  is  specified,
67              the  address  and  port are set by the system automatically. The
68              default port number is 0.
69
70       zone name
71              Specifies that all updates are done within a zone name. The zone
72              name doesn't have a default and must be set explicitly.
73
74       origin name
75              Specifies  fully  qualified domain name suffix which is appended
76              to non-fqd owners in update commands. The default is the  termi‐
77              nal label (.).
78
79       class name
80              Sets name as the default class for all updates. If not used, the
81              default class is IN.
82
83       ttl value
84              Sets value as the default TTL (in seconds). If not used, the de‐
85              fault value is 3600.
86
87       key [alg:]name key
88              Specifies  the  TSIG key named name to authenticate the request.
89              An optional alg algorithm can be specified. This command has the
90              same effect as the program option -y.
91
92       [prereq] nxdomain name
93              Adds a prerequisite for a non-existing record owned by name.
94
95       [prereq] yxdomain name
96              Adds a prerequisite for an existing record owned by name.
97
98       [prereq] nxrrset name [class] type
99              Adds  a prerequisite for a non-existing record of the type owned
100              by name.  Internet class is expected.
101
102       [prereq] yxrrset name [class] type [data]
103              Adds a prerequisite for an existing record of the type owned  by
104              name with optional data. Internet class is expected.
105
106       [update] add name [ttl] [class] type data
107              Adds  a  request  to  add  a  new resource record into the zone.
108              Please note that if the name is not fully qualified domain name,
109              the current origin name is appended to it.
110
111       [update] del[ete] name [ttl] [class] [type] [data]
112              Adds  a  request to remove all (or matching class, type or data)
113              resource records from the zone. There is  the  same  requirement
114              for the name parameter as in update add command. The ttl item is
115              ignored.
116
117       show   Displays current content of the update message.
118
119       send   Sends the current update message and cleans the list of updates.
120
121       answer Displays the last answer from the server.
122
123       debug  Enable debugging. This command has the same meaning  as  the  -d
124              program option.
125
126       exit   End the program.
127

NOTES

129       Options -k and -y can not be used simultaneously.
130
131       Neither  tsig-keygen(8)  nor  dnssec-keygen(1) keyfile formats are sup‐
132       ported.  Use keymgr(8) to construct a string for -y or the file  passed
133       to -k.
134
135       Zone  name/server  guessing is not supported if the zone name/server is
136       not specified.
137
138       An empty line doesn't send the update.
139
140   Interactive mode
141       The utility provides interactive mode with basic line editing function‐
142       ality, command completion, and command history.
143
144       Interactive  mode behavior can be customized in ~/.editrc. Refer to ed‐
145       itrc(5) for details.
146
147       Command history is saved in ~/.knsupdate_history.
148

EXIT VALUES

150       Exit status of 0 means successful operation. Any other exit status  in‐
151       dicates an error.
152

EXAMPLES

154       1. Send  one  update of the zone example.com to the server 192.168.1.1.
155          The update contains two new records:
156
157             $ knsupdate
158             knsupdate> server 192.168.1.1
159             knsupdate> zone example.com.
160             knsupdate> origin example.com.
161             knsupdate> ttl 3600
162             knsupdate> add test1.example.com. 7200 A 192.168.2.2
163             knsupdate> add test2 TXT "hello"
164             knsupdate> show
165             knsupdate> send
166             knsupdate> answer
167             knsupdate> exit
168

SEE ALSO

170       kdig(1), khost(1), keymgr(8), editrc(5).
171

AUTHOR

173       CZ.NIC Labs <https://www.knot-dns.cz>
174
176       Copyright 2010–2023, CZ.NIC, z.s.p.o.
177
178
179
180
1813.3.2                             2023-10-20                      KNSUPDATE(1)
Impressum