RNDC(8) | BIND 9 | RNDC(8) |
rndc - name server control utility
rndc [-b source-address] [-c config-file] [-k key-file] [-s server] [-p port] [-q] [-r] [-V] [-y key_id] [[-4] | [-6]] {command}
rndc controls the operation of a name server; it supersedes the ndc utility. If rndc is invoked with no command line options or arguments, it prints a short summary of the supported commands and the available options and their arguments.
rndc communicates with the name server over a TCP connection, sending commands authenticated with digital signatures. In the current versions of rndc and named, the only supported authentication algorithms are HMAC-MD5 (for compatibility), HMAC-SHA1, HMAC-SHA224, HMAC-SHA256 (default), HMAC-SHA384, and HMAC-SHA512. They use a shared secret on each end of the connection, which provides TSIG-style authentication for the command request and the name server's response. All commands sent over the channel must be signed by a key_id known to the server.
rndc reads a configuration file to determine how to contact the name server and decide what algorithm and key it should use.
A list of commands supported by rndc can be seen by running rndc without arguments.
Currently supported commands are:
The configuration is saved in a file called viewname.nzf (or, if named is compiled with liblmdb, an LMDB database file called viewname.nzd). viewname is the name of the view, unless the view name contains characters that are incompatible with use as a file name, in which case a cryptographic hash of the view name is used instead. When named is restarted, the file is loaded into the view configuration so that zones that were added can persist after a restart.
This sample addzone command adds the zone example.com to the default view:
rndc addzone example.com '{ type master; file "example.com.db"; };'
(Note the brackets around and semi-colon after the zone configuration text.)
See also rndc delzone and rndc modzone.
If the -clean argument is specified, the zone's master file (and journal file, if any) are deleted along with the zone. Without the -clean option, zone files must be deleted manually. (If the zone is of type secondary or stub, the files needing to be removed are reported in the output of the rndc delzone command.)
If the zone was originally added via rndc addzone, then it is removed permanently. However, if it was originally configured in named.conf, then that original configuration remains in place; when the server is restarted or reconfigured, the zone is recreated. To remove it permanently, it must also be removed from named.conf.
See also rndc addzone and rndc modzone.
rndc dnssec -status show the DNSSEC signing state for the specified zone.
rndc dnssec -rollover allows you to schedule key rollover for a specific key (overriding the original key lifetime).
rndc dnssec -checkds informs named that the DS for a specified zone's key-signing key has been confirmed to be published in, or withdrawn from, the parent zone. This is required in order to complete a KSK rollover. The -key id and -alg algorithm arguments can be used to specify a particular KSK, if necessary; if there is only one key acting as a KSK for the zone, these arguments can be omitted. The time of publication or withdrawal for the DS is set to the current time by default, but can be overridden to a specific time with the argument -when time, where time is expressed in YYYYMMDDHHMMSS notation.
rndc dnstap -reopen allows the output file to be renamed externally, so that named can truncate and re-open it.
rndc dnstap -roll causes the output file to be rolled automatically, similar to log files. The most recent output file has ".0" appended to its name; the previous most recent output file is moved to ".1", and so on. If number is specified, then the number of backup log files is limited to that number.
See also rndc thaw.
See also rndc stop.
This command requires that the zone be configured with a dnssec-policy, or that the auto-dnssec zone option be set to maintain, and also requires the zone to be configured to allow dynamic DNS. (See "Dynamic Update Policies" in the Administrator Reference Manual for more details.)
Existing keys that are already trusted are not deleted from memory; DNSSEC validation can continue after this command is used. However, key maintenance operations cease until named is restarted or reconfigured, and all existing key maintenance states are deleted.
Running rndc reconfig or restarting named immediately after this command causes key maintenance to be reinitialized from scratch, just as if the server were being started for the first time. This is primarily intended for testing, but it may also be used, for example, to jumpstart the acquisition of new keys in the event of a trust anchor rollover, or as a brute-force repair for key maintenance problems.
If the zone was originally added via rndc addzone, the configuration changes are recorded permanently and are still in effect after the server is restarted or reconfigured. However, if it was originally configured in named.conf, then that original configuration remains in place; when the server is restarted or reconfigured, the zone reverts to its original configuration. To make the changes permanent, it must also be modified in named.conf.
See also rndc addzone and rndc delzone.
See also rndc trace.
A negative trust anchor selectively disables DNSSEC validation for zones that are known to be failing because of misconfiguration rather than an attack. When data to be validated is at or below an active NTA (and above any other configured trust anchors), named aborts the DNSSEC validation process and treats the data as insecure rather than bogus. This continues until the NTA's lifetime has elapsed.
NTAs persist across restarts of the named server. The NTAs for a view are saved in a file called name.nta, where name is the name of the view; if it contains characters that are incompatible with use as a file name, a cryptographic hash is generated from the name of the view.
An existing NTA can be removed by using the -remove option.
An NTA's lifetime can be specified with the -lifetime option. TTL-style suffixes can be used to specify the lifetime in seconds, minutes, or hours. If the specified NTA already exists, its lifetime is updated to the new value. Setting lifetime to zero is equivalent to -remove.
If -dump is used, any other arguments are ignored and a list of existing NTAs is printed. Note that this may include NTAs that are expired but have not yet been cleaned up.
Normally, named periodically tests to see whether data below an NTA can now be validated (see the nta-recheck option in the Administrator Reference Manual for details). If data can be validated, then the NTA is regarded as no longer necessary and is allowed to expire early. The -force parameter overrides this behavior and forces an NTA to persist for its entire lifetime, regardless of whether data could be validated if the NTA were not present.
The view class can be specified with -class. The default is class IN, which is the only class for which DNSSEC is currently supported.
All of these options can be shortened, i.e., to -l, -r, -d, -f, and -c.
Unrecognized options are treated as errors. To refer to a domain or view name that begins with a hyphen, use a double-hyphen (--) on the command line to indicate the end of options.
Query logging can also be enabled by explicitly directing the queries category to a channel in the logging section of named.conf, or by specifying querylog yes; in the options section of named.conf.
The first list includes all unique clients that are waiting for recursion to complete, including the query that is awaiting a response and the timestamp (seconds since the Unix epoch) of when named started processing this client query.
The second list comprises of domains for which there are active (or recently active) fetches in progress. It reports the number of active fetches for each domain and the number of queries that have been passed (allowed) or dropped (spilled) as a result of the fetches-per-zone limit. (Note: these counters are not cumulative over time; whenever the number of active fetches for a domain drops to zero, the counter for that domain is deleted, and the next time a fetch is sent to that domain, it is recreated with the counters set to zero).
If the zone is configured to use inline-signing, the signed version of the zone is discarded; after the retransfer of the unsigned version is complete, the signed version is regenerated with new signatures.
If the first argument is -, then the output is returned via the rndc response channel and printed to the standard output. Otherwise, it is written to the secroots dump file, which defaults to named.secroots, but can be overridden via the secroots-file option in named.conf.
See also rndc managed-keys.
If serving of stale answers is disabled by rndc-serve-stale off, then it remains disabled even if named is reloaded or reconfigured. rndc serve-stale reset restores the setting as configured in named.conf.
rndc serve-stale status reports whether serving of stale answers is currently enabled, disabled by the configuration, or disabled by rndc. It also reports the values of stale-answer-ttl and max-stale-ttl.
See also rndc zonestatus.
This command requires that the zone be configured with a dnssec-policy, or that the auto-dnssec zone option be set to allow or maintain, and also requires the zone to be configured to allow dynamic DNS. (See "Dynamic Update Policies" in the BIND 9 Administrator Reference Manual for more details.)
See also rndc loadkeys.
rndc signing -clear can remove a single key (specified in the same format that rndc signing -list uses to display it), or all keys. In either case, only completed keys are removed; any record indicating that a key has not yet finished signing the zone is retained.
rndc signing -nsec3param sets the NSEC3 parameters for a zone. This is the only supported mechanism for using NSEC3 with inline-signing zones. Parameters are specified in the same format as an NSEC3PARAM resource record: hash algorithm, flags, iterations, and salt, in that order.
Currently, the only defined value for hash algorithm is 1, representing SHA-1. The flags may be set to 0 or 1, depending on whether the opt-out bit in the NSEC3 chain should be set. iterations defines the number of additional times to apply the algorithm when generating an NSEC3 hash. The salt is a string of data expressed in hexadecimal, a hyphen (-) if no salt is to be used, or the keyword auto, which causes named to generate a random 64-bit salt.
The only recommended configuration is rndc signing -nsec3param 1 0 0 - zone, i.e. no salt, no additional iterations, no opt-out.
WARNING:
rndc signing -nsec3param none removes an existing NSEC3 chain and replaces it with NSEC.
rndc signing -serial value sets the serial number of the zone to value. If the value would cause the serial number to go backwards, it is rejected. The primary use of this parameter is to set the serial number on inline signed zones.
See also rndc halt.
See also rndc freeze.
See also rndc notrace.
The cache is flushed when validation is turned on or off to avoid using data that might differ between states.
See also rndc showzone.
rndc commands that specify zone names, such as reload, retransfer, or zonestatus, can be ambiguous when applied to zones of type redirect. Redirect zones are always called ., and can be confused with zones of type hint or with secondary copies of the root zone. To specify a redirect zone, use the special zone name -redirect, without a trailing period. (With a trailing period, this would specify a zone called "-redirect".)
There is currently no way to provide the shared secret for a key_id without using the configuration file.
Several error messages could be clearer.
rndc.conf(5), rndc-confgen(8), named(8), named.conf(5), ndc(8), BIND 9 Administrator Reference Manual.
Internet Systems Consortium
2023, Internet Systems Consortium
2023-09-08 | 9.16.44-Debian |