$linuxjunkies
>

unbound-control(8)

Control and monitor the Unbound DNS resolver daemon remotely.

UbuntuDebianFedoraArch

Synopsis

unbound-control [-c config] [-s server] command [arg...]

Description

unbound-control is a utility to remotely manage and query a running Unbound DNS resolver. It communicates with unbound(8) via a control socket using TLS, allowing administrators to reload configuration, flush caches, view statistics, and manage the daemon without restarting it.

The control socket location and authentication credentials are configured in unbound.conf(5). By default, unbound-control uses the control certificate and key files to authenticate with the daemon.

Common options

FlagWhat it does
-c configRead configuration from the specified file (default: /etc/unbound/unbound.conf)
-s serverConnect to the specified server address:port (e.g., 127.0.0.1:8953) instead of the one in config
-qQuiet mode; suppress informational messages
-hDisplay help information and exit

Examples

Check if unbound is running and display daemon status information

unbound-control status

Reload the unbound configuration file without restarting the daemon

unbound-control reload

Flush the DNS cache for the example.com zone

unbound-control flush_zone example.com

Remove a specific hostname and its associated data from the cache

unbound-control flush_name www.example.com

Display resolver statistics including queries, cache hits, and response times

unbound-control stats

Show statistics without resetting counters to zero

unbound-control stats_noreset

Output the entire contents of the DNS cache for debugging

unbound-control dump_cache

Query the status of an unbound daemon running on a remote machine

unbound-control -s 192.168.1.10:8953 status

Related commands