KNSUPDATE(1)
๐ KNSUPDATE(1) โ the dynamic DNS update utility, bestie edition ๐
okay so this is knsupdate, a page from the Knot DNS fam (manual name is literally KNSUPDATE(1) if you were wondering), and honestly? it's giving "I send Dynamic DNS update messages to a DNS server and I do it fabulously." โจ
๐ธ NAME ๐ธ
knsupdate โ Dynamic DNS update utility. that's the whole vibe, no cap.
๐ฆ SYNOPSIS ๐ฆ
knsupdate [-v] [options] [filename]
knsupdate [-q] [quic_options] [options] [filename]
periodt. two whole modes, pick your fighter ๐
๐ DESCRIPTION ๐
So basically this utility sends Dynamic DNS update messages to a DNS server โ like, it literally walks up to the server and is like "hi bestie, here are some updates." ๐ The update content gets read from a file (if the parameter filename is given) or from the standard input. your choice, main character energy either way.
The format of updates is textual and is made up of commands. every command goes on its own separate line of the input, no stacking, we're not messy. Lines starting with a semicolon are comments and are not processed โ so go ahead and leave little love notes to yourself, the program will ignore them ๐ซถ
๐ Parameters ๐
- _filename_ โ Path to the file with
knsupdatecommands. that's it, that's the parameter.
โจ Options โจ
-T,--tcpโ Use a TCP connection. (-vcan be used for compatibility withnsupdateโ legacy icon behavior, we respect it)-S,--tlsโ Use a TLS connection. secure queen behavior ๐-Q,--quicโ Use a QUIC connection. speedy AND encrypted, we love a multitasker-p,--portnumber โ Set the port to use for connections to the server (if not explicitly specified in the update, bestie). The default is53for UDP/TCP or853for QUIC.-r,--retrycount โ The number of retries for UDP requests. The default is3. three strikes and we simply stop trying ๐-t,--timeoutseconds โ The total timeout (for all UDP update tries) of the update request in seconds. The default is12. If set to zero, the timeout is infinite โ literally forever, no clock, unbothered, moisturized ๐-y,--tsig[alg:]name:key โ Use the TSIG key with a name name to authenticate the request. The alg part specifies the algorithm (the default ishmac-sha256) and key specifies the shared secret encoded in Base64. secret handshake but make it cryptographic ๐-k,--tsigfilepath โ Use the 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-yoption. same secret, tidier packaging-d,--debugโ Enable debug messages. for when you simply must know everything ๐-h,--helpโ Print the program help. your friendly little map ๐บ๏ธ-V,--versionโ Print the program version. The option-VVmakes the program print the compile time configuration summary. double the V, double the lore
๐ QUIC/TLS options ๐
-H,--hostnamestring โ Enable remote server hostname validation. we check IDs at the door ๐ช-P,--pinbase64 โ Use Out-of-Band key-pinned privacy profile (RFC7858#section-4.2). The PIN must be a Base64 encoded SHA-256 hash of the X.509 SubjectPublicKeyInfo. Can be specified multiple times. yes, more than once, stack those pins ๐-A,--ca[path] โ Enable certificate validation. Certification authority certificates are loaded from the specified PEM file (default is system certificate storage if no argument is provided). Can be specified multiple times. chain of trust but make it cute ๐-E,--certfilepath โ Path to a client certificate file. your lil wallet of credentials-K,--keyfilepath โ Path to a client key file. the matching key, they're a set, iykyk ๐-s,--snistring โ Use specified Server Name Indication. telling the server who you're here for, politely ๐
๐ Commands ๐
servername [port] โ Specifies a receiving server of the dynamic update message. The name parameter 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 the-pprogram option. basically "hey, deliver my updates here please" ๐localaddress [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 is0. let the system choose your outfit, honestlyzonename โ Specifies that all updates are done within a zone name. The zone name doesn't have a default and must be set explicitly. no guessing games, you WILL state your zone ๐originname โ Specifies fully qualified domain name suffix which is appended to non-fqd owners in update commands. The default is the terminal label (.). the little dot that completes you ๐ซถclassname โ Sets name as the default class for all updates. If not used, the default class isIN.ttlvalue โ Sets value as the default TTL (in seconds). If not used, the default value is3600.key[alg:]name key โ Specifies the TSIG key named name to authenticate the request. An optional alg algorithm can be specified. This command has the same effect as the program option-y. twins fr fr ๐ฏ[prereq] nxdomainname โ Adds a prerequisite for a non-existing record owned by name. "this does NOT exist, don't come for me" ๐ซ[prereq] yxdomainname โ Adds a prerequisite for an existing record owned by name. "okay this one DOES exist, confirmed" โ[prereq] nxrrsetname [class] type โ Adds a prerequisite for a non-existing record of the type owned by name. Internet class is expected.[prereq] yxrrsetname [class] type [data] โ Adds a prerequisite for an existing record of the type owned by name with optional data. Internet class is expected.[update] addname [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. new record, who dis ๐โโ๏ธ[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 inupdate addcommand. The ttl item is ignored. it's giving "blocked and deleted" ๐ and yes,del[ete]means you can typedelordelete, both slayshowโ Displays current content of the update message. a little mirror moment ๐ชsendโ Sends the current update message and cleans the list of updates. bye bestie, and also cleanup โจanswerโ Displays the last answer from the server. the reply, the response, the text back ๐ฑdebugโ Enable debugging. This command has the same meaning as the-dprogram option.exitโ End the program. closing the group chat ๐ญ
๐ NOTES ๐
heads up babes, some real talk here:
- Options
-kand-ycan not be used simultaneously. it's one or the other, pick a lane ๐ซ - Neither
tsig-keygen(8)nordnssec-keygen(1)keyfile formats are supported. Usekeymgr(8)to construct a string for-yor the file passed to-k. like, genuinely, they won't work, don't fight it - Zone name/server guessing is not supported if the zone name/server is not specified. no mind-reading, the program is not psychic ๐ฎ
- An empty line doesn't send the update. pressing enter on nothing = nothing happens, very demure ๐
๐ง Interactive mode ๐ง
The utility provides interactive mode with basic line editing functionality, command completion, and command history. it's the full spa treatment for your terminal ๐โโ๏ธ
Interactive mode behavior can be customized in ~/.editrc. Refer to editrc(5) for details.
Command history is saved in ~/.knsupdate_history. your whole journey, preserved forever ๐
โญ EXIT VALUES โญ
Exit status of 0 means successful operation. Any other exit status indicates an error. that's it, 0 = slay, everything else = something went sideways ๐ญ
๐ฅ EXAMPLES ๐ฅ
1. Send one update of the zone example.com to the server 192.168.1.1. The update contains two new records:
$ knsupdate
knsupdate> server 192.168.1.1
knsupdate> zone example.com.
knsupdate> origin example.com.
knsupdate> ttl 3600
knsupdate> add test1.example.com. 7200 A 192.168.2.2
knsupdate> add test2 TXT "hello"
knsupdate> show
knsupdate> send
knsupdate> answer
knsupdate> exit
look at that flow. show, send, answer, exit โ the whole character arc ๐
๐ฆ SEE ALSO ๐ฆ
kdig(1), khost(1), keymgr(8), editrc(5). go read the whole friend group, they're all iconic ๐
๐ธ AUTHOR ๐ธ
CZ.NIC, z.s.p.o. and contributors <https://www.knot-dns.cz/> โ absolute legends, no notes ๐ซถ
๐ COPYRIGHT ๐
Copyright (C) CZ.NIC, z.s.p.o. and contributors
aaaand that's the page bestie ๐ cute lil sign-off: this was version 3.6.2, dated 2026-10-21, and yes the header and footer both said KNSUPDATE(1) but you already knew that โจ go forth and update your DNS, you've got this ๐
๐
๐ฆ where this page comes from
- nixpkgs unstable: knot-dns 3.6.2
- opensuse-leap 16.0: knot-utils 3.6.2-bp160.1.1 ยท GPL-2.0-or-later
- opensuse-leap 16.0: knot-utils 3.6.2-bp160.1.1 ยท GPL-2.0-or-later
- opensuse-leap 16.0: knot-utils 3.6.2-bp160.1.1 ยท GPL-2.0-or-later
- opensuse-leap 16.0: knot-utils 3.6.2-bp160.1.1 ยท GPL-2.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms