CLI Commands¶
Unbound provides various command line utilities to manage the DNS Cache server. The following control commands are currently not available in the webGUI but can be executed from the command line.
Note
Unbound does not use the default conf file location; Use the -c
flag to
tell Unbound the configuration file location:
unbound-control -c /var/unbound/unbound.conf <unbound-command-to-run>
Remove <name>
from the cache, all record types which include A, AAAA, NS
SOA, CNAME, DNAME, MX, PTR, SRV and NAPTR records:
unbound-control -c /var/unbound/unbound.conf flush <name>
Remove the <name>
and <type>
from the cache where <type>
is a
particular record type:
unbound-control -c /var/unbound/unbound.conf flush_type <name> <type>
Remove all information at or below the <name>
from cache. For example,
.com
will remove all entries below .com
. Note this process is slow as
the entire cache must be inspected:
unbound-control -c /var/unbound/unbound.conf flush_zone <name>
Reload Unbound and clear the entire cache:
unbound-control -c /var/unbound/unbound.conf reload
Determine the name servers Unbound will Query to lookup a zone:
unbound-control -c /var/unbound/unbound.conf lookup <name>