xref: /freebsd/contrib/unbound/doc/unbound-control.rst (revision b2efd602aea8b3cbc3fb215b9611946d04fceb10)
1*b2efd602SCy Schubert..
2*b2efd602SCy Schubert    WHEN EDITING MAKE SURE EACH SENTENCE STARTS ON A NEW LINE
3*b2efd602SCy Schubert
4*b2efd602SCy Schubert..
5*b2efd602SCy Schubert    IT HELPS RENDERERS TO DO THE RIGHT THING WRT SPACE
6*b2efd602SCy Schubert
7*b2efd602SCy Schubert..
8*b2efd602SCy Schubert    IT HELPS PEOPLE DIFFING THE CHANGES
9*b2efd602SCy Schubert
10*b2efd602SCy Schubert..
11*b2efd602SCy Schubert    WHEN EDITING MAKE SURE EACH SENTENCE STARTS ON A NEW LINE
12*b2efd602SCy Schubert
13*b2efd602SCy Schubert..
14*b2efd602SCy Schubert    IT HELPS RENDERERS TO DO THE RIGHT THING WRT SPACE
15*b2efd602SCy Schubert
16*b2efd602SCy Schubert..
17*b2efd602SCy Schubert    IT HELPS PEOPLE DIFFING THE CHANGES
18*b2efd602SCy Schubert
19*b2efd602SCy Schubert..
20*b2efd602SCy Schubert    WHEN EDITING MAKE SURE EACH SENTENCE STARTS ON A NEW LINE
21*b2efd602SCy Schubert
22*b2efd602SCy Schubert..
23*b2efd602SCy Schubert    IT HELPS RENDERERS TO DO THE RIGHT THING WRT SPACE
24*b2efd602SCy Schubert
25*b2efd602SCy Schubert..
26*b2efd602SCy Schubert    IT HELPS PEOPLE DIFFING THE CHANGES
27*b2efd602SCy Schubert
28*b2efd602SCy Schubert..
29*b2efd602SCy Schubert    WHEN EDITING MAKE SURE EACH SENTENCE STARTS ON A NEW LINE
30*b2efd602SCy Schubert
31*b2efd602SCy Schubert..
32*b2efd602SCy Schubert    IT HELPS RENDERERS TO DO THE RIGHT THING WRT SPACE
33*b2efd602SCy Schubert
34*b2efd602SCy Schubert..
35*b2efd602SCy Schubert    IT HELPS PEOPLE DIFFING THE CHANGES
36*b2efd602SCy Schubert
37*b2efd602SCy Schubert.. program:: unbound-control
38*b2efd602SCy Schubert
39*b2efd602SCy Schubertunbound-control(8)
40*b2efd602SCy Schubert==================
41*b2efd602SCy Schubert
42*b2efd602SCy SchubertSynopsis
43*b2efd602SCy Schubert--------
44*b2efd602SCy Schubert
45*b2efd602SCy Schubert**unbound-control** [``-hq``] [``-c cfgfile``] [``-s server``] command
46*b2efd602SCy Schubert
47*b2efd602SCy SchubertDescription
48*b2efd602SCy Schubert-----------
49*b2efd602SCy Schubert
50*b2efd602SCy Schubert``unbound-control`` performs remote administration on the
51*b2efd602SCy Schubert:doc:`unbound(8)</manpages/unbound>` DNS server.
52*b2efd602SCy SchubertIt reads the configuration file, contacts the Unbound server over TLS sends the
53*b2efd602SCy Schubertcommand and displays the result.
54*b2efd602SCy Schubert
55*b2efd602SCy SchubertThe available options are:
56*b2efd602SCy Schubert
57*b2efd602SCy Schubert.. option:: -h
58*b2efd602SCy Schubert
59*b2efd602SCy Schubert    Show the version and commandline option help.
60*b2efd602SCy Schubert
61*b2efd602SCy Schubert.. option:: -c <cfgfile>
62*b2efd602SCy Schubert
63*b2efd602SCy Schubert    The config file to read with settings.
64*b2efd602SCy Schubert    If not given the default config file
65*b2efd602SCy Schubert    :file:`@ub_conf_file@` is used.
66*b2efd602SCy Schubert
67*b2efd602SCy Schubert.. option:: -s <server[@port]>
68*b2efd602SCy Schubert
69*b2efd602SCy Schubert    IPv4 or IPv6 address of the server to contact.
70*b2efd602SCy Schubert    If not given, the address is read from the config file.
71*b2efd602SCy Schubert
72*b2efd602SCy Schubert.. option:: -q
73*b2efd602SCy Schubert
74*b2efd602SCy Schubert    Quiet, if the option is given it does not print anything if it works ok.
75*b2efd602SCy Schubert
76*b2efd602SCy SchubertCommands
77*b2efd602SCy Schubert--------
78*b2efd602SCy Schubert
79*b2efd602SCy SchubertThere are several commands that the server understands.
80*b2efd602SCy Schubert
81*b2efd602SCy Schubert
82*b2efd602SCy Schubert@@UAHL@unbound-control.commands@start@@
83*b2efd602SCy Schubert    Start the server.
84*b2efd602SCy Schubert    Simply execs :doc:`unbound(8)</manpages/unbound>`.
85*b2efd602SCy Schubert    The ``unbound`` executable is searched for in the **PATH** set in the
86*b2efd602SCy Schubert    environment.
87*b2efd602SCy Schubert    It is started with the config file specified using :option:`-c` or the
88*b2efd602SCy Schubert    default config file.
89*b2efd602SCy Schubert
90*b2efd602SCy Schubert
91*b2efd602SCy Schubert@@UAHL@unbound-control.commands@stop@@
92*b2efd602SCy Schubert    Stop the server.
93*b2efd602SCy Schubert    The server daemon exits.
94*b2efd602SCy Schubert
95*b2efd602SCy Schubert
96*b2efd602SCy Schubert@@UAHL@unbound-control.commands@reload@@
97*b2efd602SCy Schubert    Reload the server.
98*b2efd602SCy Schubert    This flushes the cache and reads the config file fresh.
99*b2efd602SCy Schubert
100*b2efd602SCy Schubert
101*b2efd602SCy Schubert@@UAHL@unbound-control.commands@reload_keep_cache@@
102*b2efd602SCy Schubert    Reload the server but try to keep the RRset and message cache if
103*b2efd602SCy Schubert    (re)configuration allows for it.
104*b2efd602SCy Schubert    That means the caches sizes and the number of threads must not change
105*b2efd602SCy Schubert    between reloads.
106*b2efd602SCy Schubert
107*b2efd602SCy Schubert
108*b2efd602SCy Schubert@@UAHL@unbound-control.commands@fast_reload@@ [``+dpv``]
109*b2efd602SCy Schubert    Reload the server, but keep downtime to a minimum, so that user queries
110*b2efd602SCy Schubert    keep seeing service.
111*b2efd602SCy Schubert    This needs the code compiled with threads.
112*b2efd602SCy Schubert    The config is loaded in a thread, and prepared, then it briefly pauses the
113*b2efd602SCy Schubert    existing server and updates config options.
114*b2efd602SCy Schubert    The intent is that the pause does not impact the service of user queries.
115*b2efd602SCy Schubert    The cache is kept.
116*b2efd602SCy Schubert    Also user queries worked on are kept and continue, but with the new config
117*b2efd602SCy Schubert    options.
118*b2efd602SCy Schubert
119*b2efd602SCy Schubert    .. note::
120*b2efd602SCy Schubert        This command is experimental at this time.
121*b2efd602SCy Schubert
122*b2efd602SCy Schubert    The amount of temporal memory needed during a fast_reload is twice the
123*b2efd602SCy Schubert    amount needed for configuration.
124*b2efd602SCy Schubert    This is because Unbound temporarily needs to store both current
125*b2efd602SCy Schubert    configuration values and new ones while trying to fast_reload.
126*b2efd602SCy Schubert    Zones loaded from disk (authority zones and RPZ zones) are included in such
127*b2efd602SCy Schubert    memory needs.
128*b2efd602SCy Schubert
129*b2efd602SCy Schubert    Options that can be changed are for
130*b2efd602SCy Schubert    :ref:`forwards<unbound.conf.forward>`,
131*b2efd602SCy Schubert    :ref:`stubs<unbound.conf.stub>`,
132*b2efd602SCy Schubert    :ref:`views<unbound.conf.view>`,
133*b2efd602SCy Schubert    :ref:`authority zones<unbound.conf.auth>`,
134*b2efd602SCy Schubert    :ref:`RPZ zones<unbound.conf.rpz>` and
135*b2efd602SCy Schubert    :ref:`local zones<unbound.conf.local-zone>`.
136*b2efd602SCy Schubert
137*b2efd602SCy Schubert    Also
138*b2efd602SCy Schubert    :ref:`access-control<unbound.conf.access-control>` and similar options,
139*b2efd602SCy Schubert    :ref:`interface-action<unbound.conf.interface-action>` and similar
140*b2efd602SCy Schubert    options and
141*b2efd602SCy Schubert    :ref:`tcp-connection-limit<unbound.conf.tcp-connection-limit>`.
142*b2efd602SCy Schubert    It can reload some
143*b2efd602SCy Schubert    :ref:`define-tag<unbound.conf.define-tag>`
144*b2efd602SCy Schubert    changes, more on that below.
145*b2efd602SCy Schubert    Further options include
146*b2efd602SCy Schubert    :ref:`insecure-lan-zones<unbound.conf.insecure-lan-zones>`,
147*b2efd602SCy Schubert    :ref:`domain-insecure<unbound.conf.domain-insecure>`,
148*b2efd602SCy Schubert    :ref:`trust-anchor-file<unbound.conf.trust-anchor-file>`,
149*b2efd602SCy Schubert    :ref:`trust-anchor<unbound.conf.trust-anchor>`,
150*b2efd602SCy Schubert    :ref:`trusted-keys-file<unbound.conf.trusted-keys-file>`,
151*b2efd602SCy Schubert    :ref:`auto-trust-anchor-file<unbound.conf.auto-trust-anchor-file>`,
152*b2efd602SCy Schubert    :ref:`edns-client-string<unbound.conf.edns-client-string>`,
153*b2efd602SCy Schubert    ipset,
154*b2efd602SCy Schubert    :ref:`log-identity<unbound.conf.log-identity>`,
155*b2efd602SCy Schubert    :ref:`infra-cache-numhosts<unbound.conf.infra-cache-numhosts>`,
156*b2efd602SCy Schubert    :ref:`msg-cache-size<unbound.conf.msg-cache-size>`,
157*b2efd602SCy Schubert    :ref:`rrset-cache-size<unbound.conf.rrset-cache-size>`,
158*b2efd602SCy Schubert    :ref:`key-cache-size<unbound.conf.key-cache-size>`,
159*b2efd602SCy Schubert    :ref:`ratelimit-size<unbound.conf.ratelimit-size>`,
160*b2efd602SCy Schubert    :ref:`neg-cache-size<unbound.conf.neg-cache-size>`,
161*b2efd602SCy Schubert    :ref:`num-queries-per-thread<unbound.conf.num-queries-per-thread>`,
162*b2efd602SCy Schubert    :ref:`jostle-timeout<unbound.conf.jostle-timeout>`,
163*b2efd602SCy Schubert    :ref:`use-caps-for-id<unbound.conf.use-caps-for-id>`,
164*b2efd602SCy Schubert    :ref:`unwanted-reply-threshold<unbound.conf.unwanted-reply-threshold>`,
165*b2efd602SCy Schubert    :ref:`tls-use-sni<unbound.conf.tls-use-sni>`,
166*b2efd602SCy Schubert    :ref:`outgoing-tcp-mss<unbound.conf.outgoing-tcp-mss>`,
167*b2efd602SCy Schubert    :ref:`ip-dscp<unbound.conf.ip-dscp>`,
168*b2efd602SCy Schubert    :ref:`max-reuse-tcp-queries<unbound.conf.max-reuse-tcp-queries>`,
169*b2efd602SCy Schubert    :ref:`tcp-reuse-timeout<unbound.conf.tcp-reuse-timeout>`,
170*b2efd602SCy Schubert    :ref:`tcp-auth-query-timeout<unbound.conf.tcp-auth-query-timeout>`,
171*b2efd602SCy Schubert    :ref:`delay-close<unbound.conf.delay-close>`.
172*b2efd602SCy Schubert
173*b2efd602SCy Schubert    It does not work with
174*b2efd602SCy Schubert    :ref:`interface<unbound.conf.interface>` and
175*b2efd602SCy Schubert    :ref:`outgoing-interface<unbound.conf.outgoing-interface>` changes,
176*b2efd602SCy Schubert    also not with
177*b2efd602SCy Schubert    :ref:`remote control<unbound.conf.remote>`,
178*b2efd602SCy Schubert    :ref:`outgoing-port-permit<unbound.conf.outgoing-port-permit>`,
179*b2efd602SCy Schubert    :ref:`outgoing-port-avoid<unbound.conf.outgoing-port-avoid>`,
180*b2efd602SCy Schubert    :ref:`msg-buffer-size<unbound.conf.msg-buffer-size>`,
181*b2efd602SCy Schubert    any **\*-slabs** options and
182*b2efd602SCy Schubert    :ref:`statistics-interval<unbound.conf.statistics-interval>` changes.
183*b2efd602SCy Schubert
184*b2efd602SCy Schubert    For :ref:`dnstap<unbound.conf.dnstap>` these options can be changed:
185*b2efd602SCy Schubert    :ref:`dnstap-log-resolver-query-messages<unbound.conf.dnstap.dnstap-log-resolver-query-messages>`,
186*b2efd602SCy Schubert    :ref:`dnstap-log-resolver-response-messages<unbound.conf.dnstap.dnstap-log-resolver-response-messages>`,
187*b2efd602SCy Schubert    :ref:`dnstap-log-client-query-messages<unbound.conf.dnstap.dnstap-log-client-query-messages>`,
188*b2efd602SCy Schubert    :ref:`dnstap-log-client-response-messages<unbound.conf.dnstap.dnstap-log-client-response-messages>`,
189*b2efd602SCy Schubert    :ref:`dnstap-log-forwarder-query-messages<unbound.conf.dnstap.dnstap-log-forwarder-query-messages>` and
190*b2efd602SCy Schubert    :ref:`dnstap-log-forwarder-response-messages<unbound.conf.dnstap.dnstap-log-forwarder-response-messages>`.
191*b2efd602SCy Schubert
192*b2efd602SCy Schubert    It does not work with these options:
193*b2efd602SCy Schubert    :ref:`dnstap-enable<unbound.conf.dnstap.dnstap-enable>`,
194*b2efd602SCy Schubert    :ref:`dnstap-bidirectional<unbound.conf.dnstap.dnstap-bidirectional>`,
195*b2efd602SCy Schubert    :ref:`dnstap-socket-path<unbound.conf.dnstap.dnstap-socket-path>`,
196*b2efd602SCy Schubert    :ref:`dnstap-ip<unbound.conf.dnstap.dnstap-ip>`,
197*b2efd602SCy Schubert    :ref:`dnstap-tls<unbound.conf.dnstap.dnstap-tls>`,
198*b2efd602SCy Schubert    :ref:`dnstap-tls-server-name<unbound.conf.dnstap.dnstap-tls-server-name>`,
199*b2efd602SCy Schubert    :ref:`dnstap-tls-cert-bundle<unbound.conf.dnstap.dnstap-tls-cert-bundle>`,
200*b2efd602SCy Schubert    :ref:`dnstap-tls-client-key-file<unbound.conf.dnstap.dnstap-tls-client-key-file>` and
201*b2efd602SCy Schubert    :ref:`dnstap-tls-client-cert-file<unbound.conf.dnstap.dnstap-tls-client-cert-file>`.
202*b2efd602SCy Schubert
203*b2efd602SCy Schubert    The options
204*b2efd602SCy Schubert    :ref:`dnstap-send-identity<unbound.conf.dnstap.dnstap-send-identity>`,
205*b2efd602SCy Schubert    :ref:`dnstap-send-version<unbound.conf.dnstap.dnstap-send-version>`,
206*b2efd602SCy Schubert    :ref:`dnstap-identity<unbound.conf.dnstap.dnstap-identity>`, and
207*b2efd602SCy Schubert    :ref:`dnstap-version<unbound.conf.dnstap.dnstap-version>` can be loaded
208*b2efd602SCy Schubert    when ``+p`` is not used.
209*b2efd602SCy Schubert
210*b2efd602SCy Schubert    The ``+v`` option makes the output verbose which includes the time it took
211*b2efd602SCy Schubert    to do the reload.
212*b2efd602SCy Schubert    With ``+vv`` it is more verbose which includes the amount of memory that
213*b2efd602SCy Schubert    was allocated temporarily to perform the reload; this amount of memory can
214*b2efd602SCy Schubert    be big if the config has large contents.
215*b2efd602SCy Schubert    In the timing output the 'reload' time is the time during which the server
216*b2efd602SCy Schubert    was paused.
217*b2efd602SCy Schubert
218*b2efd602SCy Schubert    The ``+p`` option makes the reload not pause threads, they keep running.
219*b2efd602SCy Schubert    Locks are acquired, but items are updated in sequence, so it is possible
220*b2efd602SCy Schubert    for threads to see an inconsistent state with some options from the old
221*b2efd602SCy Schubert    and some options from the new config, such as cache TTL parameters from the
222*b2efd602SCy Schubert    old config and forwards from the new config.
223*b2efd602SCy Schubert    The stubs and forwards are updated at the same time, so that they are
224*b2efd602SCy Schubert    viewed consistently, either old or new values together.
225*b2efd602SCy Schubert    The option makes the reload time take eg. 3 microseconds instead of 0.3
226*b2efd602SCy Schubert    milliseconds during which the worker threads are interrupted.
227*b2efd602SCy Schubert    So, the interruption is much shorter, at the expense of some inconsistency.
228*b2efd602SCy Schubert    After the reload itself, every worker thread is briefly contacted to make
229*b2efd602SCy Schubert    them release resources, this makes the delete timing a little longer, and
230*b2efd602SCy Schubert    takes up time from the remote control servicing worker thread.
231*b2efd602SCy Schubert
232*b2efd602SCy Schubert    With the nopause option (``+p``), the reload does not work to reload some
233*b2efd602SCy Schubert    options, that fast reload works on without the nopause option:
234*b2efd602SCy Schubert    :ref:`val-bogus-ttl<unbound.conf.val-bogus-ttl>`,
235*b2efd602SCy Schubert    :ref:`val-override-date<unbound.conf.val-override-date>`,
236*b2efd602SCy Schubert    :ref:`val-sig-skew-min<unbound.conf.val-sig-skew-min>`,
237*b2efd602SCy Schubert    :ref:`val-sig-skew-max<unbound.conf.val-sig-skew-max>`,
238*b2efd602SCy Schubert    :ref:`val-max-restart<unbound.conf.val-max-restart>`,
239*b2efd602SCy Schubert    :ref:`val-nsec3-keysize-iterations<unbound.conf.val-nsec3-keysize-iterations>`,
240*b2efd602SCy Schubert    :ref:`target-fetch-policy<unbound.conf.target-fetch-policy>`,
241*b2efd602SCy Schubert    :ref:`outbound-msg-retry<unbound.conf.outbound-msg-retry>`,
242*b2efd602SCy Schubert    :ref:`max-sent-count<unbound.conf.max-sent-count>`,
243*b2efd602SCy Schubert    :ref:`max-query-restarts<unbound.conf.max-query-restarts>`,
244*b2efd602SCy Schubert    :ref:`do-not-query-address<unbound.conf.do-not-query-address>`,
245*b2efd602SCy Schubert    :ref:`do-not-query-localhost<unbound.conf.do-not-query-localhost>`,
246*b2efd602SCy Schubert    :ref:`private-address<unbound.conf.private-address>`,
247*b2efd602SCy Schubert    :ref:`private-domain<unbound.conf.private-domain>`,
248*b2efd602SCy Schubert    :ref:`caps-exempt<unbound.conf.caps-exempt>`,
249*b2efd602SCy Schubert    :ref:`nat64-prefix<unbound.conf.nat64.nat64-prefix>`,
250*b2efd602SCy Schubert    :ref:`do-nat64<unbound.conf.nat64.do-nat64>`,
251*b2efd602SCy Schubert    :ref:`infra-host-ttl<unbound.conf.infra-host-ttl>`,
252*b2efd602SCy Schubert    :ref:`infra-keep-probing<unbound.conf.infra-keep-probing>`,
253*b2efd602SCy Schubert    :ref:`ratelimit<unbound.conf.ratelimit>`,
254*b2efd602SCy Schubert    :ref:`ip-ratelimit<unbound.conf.ip-ratelimit>`,
255*b2efd602SCy Schubert    :ref:`ip-ratelimit-cookie<unbound.conf.ip-ratelimit-cookie>`,
256*b2efd602SCy Schubert    :ref:`wait-limit-netblock<unbound.conf.wait-limit-netblock>`,
257*b2efd602SCy Schubert    :ref:`wait-limit-cookie-netblock<unbound.conf.wait-limit-cookie-netblock>`,
258*b2efd602SCy Schubert    :ref:`ratelimit-below-domain<unbound.conf.ratelimit-below-domain>`,
259*b2efd602SCy Schubert    :ref:`ratelimit-for-domain<unbound.conf.ratelimit-for-domain>`.
260*b2efd602SCy Schubert
261*b2efd602SCy Schubert    The ``+d`` option makes the reload drop queries that the worker threads are
262*b2efd602SCy Schubert    working on.
263*b2efd602SCy Schubert    This is like
264*b2efd602SCy Schubert    :ref:`flush_requestlist<unbound-control.commands.flush_requestlist>`.
265*b2efd602SCy Schubert    Without it the queries are kept so that users keep getting answers for
266*b2efd602SCy Schubert    those queries that are currently processed.
267*b2efd602SCy Schubert    The drop makes it so that queries during the life time of the
268*b2efd602SCy Schubert    query processing see only old, or only new config options.
269*b2efd602SCy Schubert
270*b2efd602SCy Schubert    When there are changes to the config tags, from the
271*b2efd602SCy Schubert    :ref:`define-tag<unbound.conf.define-tag>` option,
272*b2efd602SCy Schubert    then the ``+d`` option is implicitly turned on with a warning printout, and
273*b2efd602SCy Schubert    queries are dropped.
274*b2efd602SCy Schubert    This is to stop references to the old tag information, by the old
275*b2efd602SCy Schubert    queries.
276*b2efd602SCy Schubert    If the number of tags is increased in the newly loaded config, by
277*b2efd602SCy Schubert    adding tags at the end, then the implicit ``+d`` option is not needed.
278*b2efd602SCy Schubert
279*b2efd602SCy Schubert    For response ip, that is actions associated with IP addresses, and perhaps
280*b2efd602SCy Schubert    intersected with access control tag and action information, those settings
281*b2efd602SCy Schubert    are stored with a query when it comes in based on its source IP address.
282*b2efd602SCy Schubert    The old information is kept with the query until the queries are done.
283*b2efd602SCy Schubert    This is gone when those queries are resolved and finished, or it is
284*b2efd602SCy Schubert    possible to flush the requestlist with ``+d``.
285*b2efd602SCy Schubert
286*b2efd602SCy Schubert
287*b2efd602SCy Schubert@@UAHL@unbound-control.commands@verbosity@@ *number*
288*b2efd602SCy Schubert    Change verbosity value for logging.
289*b2efd602SCy Schubert    Same values as the **verbosity:** keyword in
290*b2efd602SCy Schubert    :doc:`unbound.conf(5)</manpages/unbound.conf>`.
291*b2efd602SCy Schubert    This new setting lasts until the server is issued a reload (taken from
292*b2efd602SCy Schubert    config file again), or the next verbosity control command.
293*b2efd602SCy Schubert
294*b2efd602SCy Schubert
295*b2efd602SCy Schubert@@UAHL@unbound-control.commands@log_reopen@@
296*b2efd602SCy Schubert    Reopen the logfile, close and open it.
297*b2efd602SCy Schubert    Useful for logrotation to make the daemon release the file it is logging
298*b2efd602SCy Schubert    to.
299*b2efd602SCy Schubert    If you are using syslog it will attempt to close and open the syslog (which
300*b2efd602SCy Schubert    may not work if chrooted).
301*b2efd602SCy Schubert
302*b2efd602SCy Schubert
303*b2efd602SCy Schubert@@UAHL@unbound-control.commands@stats@@
304*b2efd602SCy Schubert    Print statistics.
305*b2efd602SCy Schubert    Resets the internal counters to zero, this can be controlled using the
306*b2efd602SCy Schubert    **statistics-cumulative:** config statement.
307*b2efd602SCy Schubert    Statistics are printed with one ``[name]: [value]`` per line.
308*b2efd602SCy Schubert
309*b2efd602SCy Schubert
310*b2efd602SCy Schubert@@UAHL@unbound-control.commands@stats_noreset@@
311*b2efd602SCy Schubert    Peek at statistics.
312*b2efd602SCy Schubert    Prints them like the stats command does, but does not reset the internal
313*b2efd602SCy Schubert    counters to zero.
314*b2efd602SCy Schubert
315*b2efd602SCy Schubert
316*b2efd602SCy Schubert@@UAHL@unbound-control.commands@status@@
317*b2efd602SCy Schubert    Display server status.
318*b2efd602SCy Schubert    Exit code 3 if not running (the connection to the port is refused), 1 on
319*b2efd602SCy Schubert    error, 0 if running.
320*b2efd602SCy Schubert
321*b2efd602SCy Schubert
322*b2efd602SCy Schubert@@UAHL@unbound-control.commands@local_zone@@ *name type*
323*b2efd602SCy Schubert    Add new local zone with name and type.
324*b2efd602SCy Schubert    Like local-zone config statement.
325*b2efd602SCy Schubert    If the zone already exists, the type is changed to the given argument.
326*b2efd602SCy Schubert
327*b2efd602SCy Schubert
328*b2efd602SCy Schubert@@UAHL@unbound-control.commands@local_zone_remove@@ *name*
329*b2efd602SCy Schubert    Remove the local zone with the given name.
330*b2efd602SCy Schubert    Removes all local data inside it.
331*b2efd602SCy Schubert    If the zone does not exist, the command succeeds.
332*b2efd602SCy Schubert
333*b2efd602SCy Schubert
334*b2efd602SCy Schubert@@UAHL@unbound-control.commands@local_data@@ *RR data...*
335*b2efd602SCy Schubert    Add new local data, the given resource record.
336*b2efd602SCy Schubert    Like **local-data:** keyword, except for when no covering zone exists.
337*b2efd602SCy Schubert    In that case this remote control command creates a transparent zone with
338*b2efd602SCy Schubert    the same name as this record.
339*b2efd602SCy Schubert
340*b2efd602SCy Schubert
341*b2efd602SCy Schubert@@UAHL@unbound-control.commands@local_data_remove@@ *name*
342*b2efd602SCy Schubert    Remove all RR data from local name.
343*b2efd602SCy Schubert    If the name already has no items, nothing happens.
344*b2efd602SCy Schubert    Often results in NXDOMAIN for the name (in a static zone), but if the name
345*b2efd602SCy Schubert    has become an empty nonterminal (there is still data in domain names below
346*b2efd602SCy Schubert    the removed name), NOERROR nodata answers are the result for that name.
347*b2efd602SCy Schubert
348*b2efd602SCy Schubert
349*b2efd602SCy Schubert@@UAHL@unbound-control.commands@local_zones@@
350*b2efd602SCy Schubert    Add local zones read from stdin of unbound-control.
351*b2efd602SCy Schubert    Input is read per line, with name space type on a line.
352*b2efd602SCy Schubert    For bulk additions.
353*b2efd602SCy Schubert
354*b2efd602SCy Schubert
355*b2efd602SCy Schubert@@UAHL@unbound-control.commands@local_zones_remove@@
356*b2efd602SCy Schubert    Remove local zones read from stdin of unbound-control.
357*b2efd602SCy Schubert    Input is one name per line.
358*b2efd602SCy Schubert    For bulk removals.
359*b2efd602SCy Schubert
360*b2efd602SCy Schubert
361*b2efd602SCy Schubert@@UAHL@unbound-control.commands@local_datas@@
362*b2efd602SCy Schubert    Add local data RRs read from stdin of unbound-control.
363*b2efd602SCy Schubert    Input is one RR per line.
364*b2efd602SCy Schubert    For bulk additions.
365*b2efd602SCy Schubert
366*b2efd602SCy Schubert
367*b2efd602SCy Schubert@@UAHL@unbound-control.commands@local_datas_remove@@
368*b2efd602SCy Schubert    Remove local data RRs read from stdin of unbound-control.
369*b2efd602SCy Schubert    Input is one name per line.
370*b2efd602SCy Schubert    For bulk removals.
371*b2efd602SCy Schubert
372*b2efd602SCy Schubert
373*b2efd602SCy Schubert@@UAHL@unbound-control.commands@dump_cache@@
374*b2efd602SCy Schubert    The contents of the cache is printed in a text format to stdout.
375*b2efd602SCy Schubert    You can redirect it to a file to store the cache in a file.
376*b2efd602SCy Schubert    Not supported in remote Unbounds in multi-process operation.
377*b2efd602SCy Schubert
378*b2efd602SCy Schubert
379*b2efd602SCy Schubert@@UAHL@unbound-control.commands@load_cache@@
380*b2efd602SCy Schubert    The contents of the cache is loaded from stdin.
381*b2efd602SCy Schubert    Uses the same format as dump_cache uses.
382*b2efd602SCy Schubert    Loading the cache with old, or wrong data can result in old or wrong data
383*b2efd602SCy Schubert    returned to clients.
384*b2efd602SCy Schubert    Loading data into the cache in this way is supported in order to aid with
385*b2efd602SCy Schubert    debugging.
386*b2efd602SCy Schubert    Not supported in remote Unbounds in multi-process operation.
387*b2efd602SCy Schubert
388*b2efd602SCy Schubert
389*b2efd602SCy Schubert@@UAHL@unbound-control.commands@cache_lookup@@ [``+t``] *names*
390*b2efd602SCy Schubert    Print to stdout the RRsets and messages that are in the cache.
391*b2efd602SCy Schubert    For every name listed the content at or under the name is printed.
392*b2efd602SCy Schubert    Several names separated by spaces can be given, each is printed.
393*b2efd602SCy Schubert    When subnetcache is enabled, also matching entries from the subnet
394*b2efd602SCy Schubert    cache are printed.
395*b2efd602SCy Schubert
396*b2efd602SCy Schubert    The ``+t`` option allows tld and root names.
397*b2efd602SCy Schubert    With it names like 'com' and '.' can be used, but it takes a lot of
398*b2efd602SCy Schubert    effort to look up in the cache.
399*b2efd602SCy Schubert
400*b2efd602SCy Schubert
401*b2efd602SCy Schubert@@UAHL@unbound-control.commands@lookup@@ *name*
402*b2efd602SCy Schubert    Print to stdout the name servers that would be used to look up the name
403*b2efd602SCy Schubert    specified.
404*b2efd602SCy Schubert
405*b2efd602SCy Schubert
406*b2efd602SCy Schubert@@UAHL@unbound-control.commands@flush@@ [``+c``] *name*
407*b2efd602SCy Schubert    Remove the name from the cache.
408*b2efd602SCy Schubert    Removes the types A, AAAA, NS, SOA, CNAME, DNAME, MX, PTR, SRV, NAPTR,
409*b2efd602SCy Schubert    SVCB and HTTPS.
410*b2efd602SCy Schubert    Because that is fast to do.
411*b2efd602SCy Schubert    Other record types can be removed using **flush_type** or **flush_zone**.
412*b2efd602SCy Schubert
413*b2efd602SCy Schubert    The ``+c`` option removes the items also from the cachedb cache.
414*b2efd602SCy Schubert    If cachedb is in use.
415*b2efd602SCy Schubert
416*b2efd602SCy Schubert
417*b2efd602SCy Schubert@@UAHL@unbound-control.commands@flush_type@@ [``+c``] *name type*
418*b2efd602SCy Schubert    Remove the name, type information from the cache.
419*b2efd602SCy Schubert
420*b2efd602SCy Schubert    The ``+c`` option removes the items also from the cachedb cache.
421*b2efd602SCy Schubert    If cachedb is in use.
422*b2efd602SCy Schubert
423*b2efd602SCy Schubert
424*b2efd602SCy Schubert@@UAHL@unbound-control.commands@flush_zone@@ [``+c``] name
425*b2efd602SCy Schubert    Remove all information at or below the name from the cache.
426*b2efd602SCy Schubert    The rrsets and key entries are removed so that new lookups will be
427*b2efd602SCy Schubert    performed.
428*b2efd602SCy Schubert    This needs to walk and inspect the entire cache, and is a slow operation.
429*b2efd602SCy Schubert    The entries are set to expired in the implementation of this command (so,
430*b2efd602SCy Schubert    with serve-expired enabled, it'll serve that information but schedule a
431*b2efd602SCy Schubert    prefetch for new information).
432*b2efd602SCy Schubert
433*b2efd602SCy Schubert    The ``+c`` option removes the items also from the cachedb cache.
434*b2efd602SCy Schubert    If cachedb is in use.
435*b2efd602SCy Schubert
436*b2efd602SCy Schubert
437*b2efd602SCy Schubert@@UAHL@unbound-control.commands@flush_bogus@@ [``+c``]
438*b2efd602SCy Schubert    Remove all bogus data from the cache.
439*b2efd602SCy Schubert
440*b2efd602SCy Schubert    The ``+c`` option removes the items also from the cachedb cache.
441*b2efd602SCy Schubert    If cachedb is in use.
442*b2efd602SCy Schubert
443*b2efd602SCy Schubert
444*b2efd602SCy Schubert@@UAHL@unbound-control.commands@flush_negative@@ [``+c``]
445*b2efd602SCy Schubert    Remove all negative data from the cache.
446*b2efd602SCy Schubert    This is nxdomain answers, nodata answers and servfail answers.
447*b2efd602SCy Schubert    Also removes bad key entries (which could be due to failed lookups) from
448*b2efd602SCy Schubert    the dnssec key cache, and iterator last-resort lookup failures from the
449*b2efd602SCy Schubert    rrset cache.
450*b2efd602SCy Schubert
451*b2efd602SCy Schubert    The ``+c`` option removes the items also from the cachedb cache.
452*b2efd602SCy Schubert    If cachedb is in use.
453*b2efd602SCy Schubert
454*b2efd602SCy Schubert
455*b2efd602SCy Schubert@@UAHL@unbound-control.commands@flush_stats@@
456*b2efd602SCy Schubert    Reset statistics to zero.
457*b2efd602SCy Schubert
458*b2efd602SCy Schubert
459*b2efd602SCy Schubert@@UAHL@unbound-control.commands@flush_requestlist@@
460*b2efd602SCy Schubert    Drop the queries that are worked on.
461*b2efd602SCy Schubert    Stops working on the queries that the server is working on now.
462*b2efd602SCy Schubert    The cache is unaffected.
463*b2efd602SCy Schubert    No reply is sent for those queries, probably making those users request
464*b2efd602SCy Schubert    again later.
465*b2efd602SCy Schubert    Useful to make the server restart working on queries with new settings,
466*b2efd602SCy Schubert    such as a higher verbosity level.
467*b2efd602SCy Schubert
468*b2efd602SCy Schubert
469*b2efd602SCy Schubert@@UAHL@unbound-control.commands@dump_requestlist@@
470*b2efd602SCy Schubert    Show what is worked on.
471*b2efd602SCy Schubert    Prints all queries that the server is currently working on.
472*b2efd602SCy Schubert    Prints the time that users have been waiting.
473*b2efd602SCy Schubert    For internal requests, no time is printed.
474*b2efd602SCy Schubert    And then prints out the module status.
475*b2efd602SCy Schubert    This prints the queries from the first thread, and not queries that are
476*b2efd602SCy Schubert    being serviced from other threads.
477*b2efd602SCy Schubert
478*b2efd602SCy Schubert
479*b2efd602SCy Schubert@@UAHL@unbound-control.commands@flush_infra@@ *all|IP*
480*b2efd602SCy Schubert    If all then entire infra cache is emptied.
481*b2efd602SCy Schubert    If a specific IP address, the entry for that address is removed from the
482*b2efd602SCy Schubert    cache.
483*b2efd602SCy Schubert    It contains EDNS, ping and lameness data.
484*b2efd602SCy Schubert
485*b2efd602SCy Schubert
486*b2efd602SCy Schubert@@UAHL@unbound-control.commands@dump_infra@@
487*b2efd602SCy Schubert    Show the contents of the infra cache.
488*b2efd602SCy Schubert
489*b2efd602SCy Schubert
490*b2efd602SCy Schubert@@UAHL@unbound-control.commands@set_option@@ *opt: val*
491*b2efd602SCy Schubert    Set the option to the given value without a reload.
492*b2efd602SCy Schubert    The cache is therefore not flushed.
493*b2efd602SCy Schubert    The option must end with a ``':'`` and whitespace must be between the
494*b2efd602SCy Schubert    option and the value.
495*b2efd602SCy Schubert    Some values may not have an effect if set this way, the new values are not
496*b2efd602SCy Schubert    written to the config file, not all options are supported.
497*b2efd602SCy Schubert    This is different from the set_option call in libunbound, where all values
498*b2efd602SCy Schubert    work because Unbound has not been initialized.
499*b2efd602SCy Schubert
500*b2efd602SCy Schubert    The values that work are: statistics-interval, statistics-cumulative,
501*b2efd602SCy Schubert    do-not-query-localhost,  harden-short-bufsize, harden-large-queries,
502*b2efd602SCy Schubert    harden-glue, harden-dnssec-stripped, harden-below-nxdomain,
503*b2efd602SCy Schubert    harden-referral-path,  prefetch, prefetch-key, log-queries, hide-identity,
504*b2efd602SCy Schubert    hide-version, identity, version, val-log-level, val-log-squelch,
505*b2efd602SCy Schubert    ignore-cd-flag, add-holddown, del-holddown, keep-missing, tcp-upstream,
506*b2efd602SCy Schubert    ssl-upstream, max-udp-size, ratelimit, ip-ratelimit, cache-max-ttl,
507*b2efd602SCy Schubert    cache-min-ttl, cache-max-negative-ttl.
508*b2efd602SCy Schubert
509*b2efd602SCy Schubert
510*b2efd602SCy Schubert@@UAHL@unbound-control.commands@get_option@@ *opt*
511*b2efd602SCy Schubert    Get the value of the option.
512*b2efd602SCy Schubert    Give the option name without a trailing ``':'``.
513*b2efd602SCy Schubert    The value is printed.
514*b2efd602SCy Schubert    If the value is ``""``, nothing is printed and the connection closes.
515*b2efd602SCy Schubert    On error ``'error ...'`` is printed (it gives a syntax error on unknown
516*b2efd602SCy Schubert    option).
517*b2efd602SCy Schubert    For some options a list of values, one on each line, is printed.
518*b2efd602SCy Schubert    The options are shown from the config file as modified with set_option.
519*b2efd602SCy Schubert    For some options an override may have been taken that does not show up with
520*b2efd602SCy Schubert    this command, not results from e.g. the verbosity and forward control
521*b2efd602SCy Schubert    commands.
522*b2efd602SCy Schubert    Not all options work, see list_stubs, list_forwards, list_local_zones and
523*b2efd602SCy Schubert    list_local_data for those.
524*b2efd602SCy Schubert
525*b2efd602SCy Schubert
526*b2efd602SCy Schubert@@UAHL@unbound-control.commands@list_stubs@@
527*b2efd602SCy Schubert    List the stub zones in use.
528*b2efd602SCy Schubert    These are printed one by one to the output.
529*b2efd602SCy Schubert    This includes the root hints in use.
530*b2efd602SCy Schubert
531*b2efd602SCy Schubert
532*b2efd602SCy Schubert@@UAHL@unbound-control.commands@list_forwards@@
533*b2efd602SCy Schubert    List the forward zones in use.
534*b2efd602SCy Schubert    These are printed zone by zone to the output.
535*b2efd602SCy Schubert
536*b2efd602SCy Schubert
537*b2efd602SCy Schubert@@UAHL@unbound-control.commands@list_insecure@@
538*b2efd602SCy Schubert    List the zones with domain-insecure.
539*b2efd602SCy Schubert
540*b2efd602SCy Schubert
541*b2efd602SCy Schubert@@UAHL@unbound-control.commands@list_local_zones@@
542*b2efd602SCy Schubert    List the local zones in use.
543*b2efd602SCy Schubert    These are printed one per line with zone type.
544*b2efd602SCy Schubert
545*b2efd602SCy Schubert
546*b2efd602SCy Schubert@@UAHL@unbound-control.commands@list_local_data@@
547*b2efd602SCy Schubert    List the local data RRs in use.
548*b2efd602SCy Schubert    The resource records are printed.
549*b2efd602SCy Schubert
550*b2efd602SCy Schubert
551*b2efd602SCy Schubert@@UAHL@unbound-control.commands@insecure_add@@ *zone*
552*b2efd602SCy Schubert    Add a domain-insecure for the given zone, like the statement in
553*b2efd602SCy Schubert    unbound.conf.
554*b2efd602SCy Schubert    Adds to the running Unbound without affecting the cache
555*b2efd602SCy Schubert    contents (which may still be bogus, use flush_zone to remove it), does not
556*b2efd602SCy Schubert    affect the config file.
557*b2efd602SCy Schubert
558*b2efd602SCy Schubert
559*b2efd602SCy Schubert@@UAHL@unbound-control.commands@insecure_remove@@ *zone*
560*b2efd602SCy Schubert    Removes domain-insecure for the given zone.
561*b2efd602SCy Schubert
562*b2efd602SCy Schubert
563*b2efd602SCy Schubert@@UAHL@unbound-control.commands@forward_add@@ [``+it``] *zone addr ...*
564*b2efd602SCy Schubert    Add a new forward zone to running Unbound.
565*b2efd602SCy Schubert    With ``+i`` option also adds a domain-insecure for the zone (so it can
566*b2efd602SCy Schubert    resolve insecurely if you have a DNSSEC root trust anchor configured for
567*b2efd602SCy Schubert    other names).
568*b2efd602SCy Schubert    The addr can be IP4, IP6 or nameserver names, like forward-zone config in
569*b2efd602SCy Schubert    unbound.conf.
570*b2efd602SCy Schubert    The ``+t`` option sets it to use TLS upstream, like
571*b2efd602SCy Schubert    :ref:`forward-tls-upstream: yes<unbound.conf.forward.forward-tls-upstream>`.
572*b2efd602SCy Schubert
573*b2efd602SCy Schubert
574*b2efd602SCy Schubert@@UAHL@unbound-control.commands@forward_remove@@ [``+i``] *zone*
575*b2efd602SCy Schubert    Remove a forward zone from running Unbound.
576*b2efd602SCy Schubert    The ``+i`` also removes a domain-insecure for the zone.
577*b2efd602SCy Schubert
578*b2efd602SCy Schubert
579*b2efd602SCy Schubert@@UAHL@unbound-control.commands@stub_add@@ [``+ipt``] *zone addr ...*
580*b2efd602SCy Schubert    Add a new stub zone to running Unbound.
581*b2efd602SCy Schubert    With ``+i`` option also adds a domain-insecure for the zone.
582*b2efd602SCy Schubert    With ``+p`` the stub zone is set to prime, without it it is set to
583*b2efd602SCy Schubert    notprime.
584*b2efd602SCy Schubert    The addr can be IP4, IP6 or nameserver names, like the **stub-zone:**
585*b2efd602SCy Schubert    config in unbound.conf.
586*b2efd602SCy Schubert    The ``+t`` option sets it to use TLS upstream, like
587*b2efd602SCy Schubert    :ref:`stub-tls-upstream: yes<unbound.conf.stub.stub-tls-upstream>`.
588*b2efd602SCy Schubert
589*b2efd602SCy Schubert
590*b2efd602SCy Schubert@@UAHL@unbound-control.commands@stub_remove@@ [``+i``] *zone*
591*b2efd602SCy Schubert    Remove a stub zone from running Unbound.
592*b2efd602SCy Schubert    The ``+i`` also removes a domain-insecure for the zone.
593*b2efd602SCy Schubert
594*b2efd602SCy Schubert
595*b2efd602SCy Schubert@@UAHL@unbound-control.commands@forward@@ [*off* | *addr ...* ]
596*b2efd602SCy Schubert    Setup forwarding mode.
597*b2efd602SCy Schubert    Configures if the server should ask other upstream nameservers, should go
598*b2efd602SCy Schubert    to the internet root nameservers itself, or show the current config.
599*b2efd602SCy Schubert    You could pass the nameservers after a DHCP update.
600*b2efd602SCy Schubert
601*b2efd602SCy Schubert    Without arguments the current list of addresses used to forward all queries
602*b2efd602SCy Schubert    to is printed.
603*b2efd602SCy Schubert    On startup this is from the forward-zone ``"."`` configuration.
604*b2efd602SCy Schubert    Afterwards it shows the status.
605*b2efd602SCy Schubert    It prints off when no forwarding is used.
606*b2efd602SCy Schubert
607*b2efd602SCy Schubert    If off is passed, forwarding is disabled and the root nameservers are
608*b2efd602SCy Schubert    used.
609*b2efd602SCy Schubert    This can be used to avoid to avoid buggy or non-DNSSEC supporting
610*b2efd602SCy Schubert    nameservers returned from DHCP.
611*b2efd602SCy Schubert    But may not work in hotels or hotspots.
612*b2efd602SCy Schubert
613*b2efd602SCy Schubert    If one or more IPv4 or IPv6 addresses are given, those are then used to
614*b2efd602SCy Schubert    forward queries to.
615*b2efd602SCy Schubert    The addresses must be separated with spaces.
616*b2efd602SCy Schubert    With ``'@port'`` the port number can be set explicitly (default port is 53
617*b2efd602SCy Schubert    (DNS)).
618*b2efd602SCy Schubert
619*b2efd602SCy Schubert    By default the forwarder information from the config file for the root
620*b2efd602SCy Schubert    ``"."`` is used.
621*b2efd602SCy Schubert    The config file is not changed, so after a reload these changes are gone.
622*b2efd602SCy Schubert    Other forward zones from the config file are not affected by this command.
623*b2efd602SCy Schubert
624*b2efd602SCy Schubert
625*b2efd602SCy Schubert@@UAHL@unbound-control.commands@ratelimit_list@@ [``+a``]
626*b2efd602SCy Schubert    List the domains that are ratelimited.
627*b2efd602SCy Schubert    Printed one per line with current estimated qps and qps limit from config.
628*b2efd602SCy Schubert    With ``+a`` it prints all domains, not just the ratelimited domains, with
629*b2efd602SCy Schubert    their estimated qps.
630*b2efd602SCy Schubert    The ratelimited domains return an error for uncached (new) queries, but
631*b2efd602SCy Schubert    cached queries work as normal.
632*b2efd602SCy Schubert
633*b2efd602SCy Schubert
634*b2efd602SCy Schubert@@UAHL@unbound-control.commands@ip_ratelimit_list@@ [``+a``]
635*b2efd602SCy Schubert    List the ip addresses that are ratelimited.
636*b2efd602SCy Schubert    Printed one per line with current estimated qps and qps limit from config.
637*b2efd602SCy Schubert    With ``+a`` it prints all ips, not just the ratelimited ips, with their
638*b2efd602SCy Schubert    estimated qps.
639*b2efd602SCy Schubert    The ratelimited ips are dropped before checking the cache.
640*b2efd602SCy Schubert
641*b2efd602SCy Schubert
642*b2efd602SCy Schubert@@UAHL@unbound-control.commands@list_auth_zones@@
643*b2efd602SCy Schubert    List the auth zones that are configured.
644*b2efd602SCy Schubert    Printed one per line with a status, indicating if the zone is expired and
645*b2efd602SCy Schubert    current serial number.
646*b2efd602SCy Schubert    Configured RPZ zones are included.
647*b2efd602SCy Schubert
648*b2efd602SCy Schubert
649*b2efd602SCy Schubert@@UAHL@unbound-control.commands@auth_zone_reload@@ *zone*
650*b2efd602SCy Schubert    Reload the auth zone (or RPZ zone) from zonefile.
651*b2efd602SCy Schubert    The zonefile is read in overwriting the current contents of the zone in
652*b2efd602SCy Schubert    memory.
653*b2efd602SCy Schubert    This changes the auth zone contents itself, not the cache contents.
654*b2efd602SCy Schubert    Such cache contents exists if you set Unbound to validate with
655*b2efd602SCy Schubert    **for-upstream: yes** and that can be cleared with **flush_zone** *zone*.
656*b2efd602SCy Schubert
657*b2efd602SCy Schubert
658*b2efd602SCy Schubert@@UAHL@unbound-control.commands@auth_zone_transfer@@ *zone*
659*b2efd602SCy Schubert    Transfer the auth zone (or RPZ zone) from master.
660*b2efd602SCy Schubert    The auth zone probe sequence is started, where the masters are probed to
661*b2efd602SCy Schubert    see if they have an updated zone (with the SOA serial check).
662*b2efd602SCy Schubert    And then the zone is transferred for a newer zone version.
663*b2efd602SCy Schubert
664*b2efd602SCy Schubert
665*b2efd602SCy Schubert@@UAHL@unbound-control.commands@rpz_enable@@ *zone*
666*b2efd602SCy Schubert    Enable the RPZ zone if it had previously been disabled.
667*b2efd602SCy Schubert
668*b2efd602SCy Schubert
669*b2efd602SCy Schubert@@UAHL@unbound-control.commands@rpz_disable@@ *zone*
670*b2efd602SCy Schubert    Disable the RPZ zone.
671*b2efd602SCy Schubert
672*b2efd602SCy Schubert
673*b2efd602SCy Schubert@@UAHL@unbound-control.commands@view_list_local_zones@@ *view*
674*b2efd602SCy Schubert    *list_local_zones* for given view.
675*b2efd602SCy Schubert
676*b2efd602SCy Schubert
677*b2efd602SCy Schubert@@UAHL@unbound-control.commands@view_local_zone@@ *view name type*
678*b2efd602SCy Schubert    *local_zone* for given view.
679*b2efd602SCy Schubert
680*b2efd602SCy Schubert
681*b2efd602SCy Schubert@@UAHL@unbound-control.commands@view_local_zone_remove@@ *view name*
682*b2efd602SCy Schubert    *local_zone_remove* for given view.
683*b2efd602SCy Schubert
684*b2efd602SCy Schubert
685*b2efd602SCy Schubert@@UAHL@unbound-control.commands@view_list_local_data@@ *view*
686*b2efd602SCy Schubert    *list_local_data* for given view.
687*b2efd602SCy Schubert
688*b2efd602SCy Schubert
689*b2efd602SCy Schubert@@UAHL@unbound-control.commands@view_local_data@@ *view RR data...*
690*b2efd602SCy Schubert    *local_data* for given view.
691*b2efd602SCy Schubert
692*b2efd602SCy Schubert
693*b2efd602SCy Schubert@@UAHL@unbound-control.commands@view_local_data_remove@@ *view name*
694*b2efd602SCy Schubert    *local_data_remove* for given view.
695*b2efd602SCy Schubert
696*b2efd602SCy Schubert
697*b2efd602SCy Schubert@@UAHL@unbound-control.commands@view_local_datas_remove@@ *view*
698*b2efd602SCy Schubert    Remove a list of *local_data* for given view from stdin.
699*b2efd602SCy Schubert    Like *local_datas_remove*.
700*b2efd602SCy Schubert
701*b2efd602SCy Schubert
702*b2efd602SCy Schubert@@UAHL@unbound-control.commands@view_local_datas@@ *view*
703*b2efd602SCy Schubert    Add a list of *local_data* for given view from stdin.
704*b2efd602SCy Schubert    Like *local_datas*.
705*b2efd602SCy Schubert
706*b2efd602SCy Schubert
707*b2efd602SCy Schubert@@UAHL@unbound-control.commands@add_cookie_secret@@ *secret*
708*b2efd602SCy Schubert    Add or replace a cookie secret persistently.
709*b2efd602SCy Schubert    *secret* needs to be an 128 bit hex string.
710*b2efd602SCy Schubert
711*b2efd602SCy Schubert    Cookie secrets can be either **active** or **staging**.
712*b2efd602SCy Schubert    **Active** cookie secrets are used to create DNS Cookies, but verification
713*b2efd602SCy Schubert    of a DNS Cookie succeeds with any of the **active** or **staging** cookie
714*b2efd602SCy Schubert    secrets.
715*b2efd602SCy Schubert    The state of the current cookie secrets can be printed with the
716*b2efd602SCy Schubert    :ref:`print_cookie_secrets<unbound-control.commands.print_cookie_secrets>`
717*b2efd602SCy Schubert    command.
718*b2efd602SCy Schubert
719*b2efd602SCy Schubert    When there are no cookie secrets configured yet, the *secret* is added as
720*b2efd602SCy Schubert    **active**.
721*b2efd602SCy Schubert    If there is already an **active** cookie secret, the *secret* is added as
722*b2efd602SCy Schubert    **staging** or replacing an existing **staging** secret.
723*b2efd602SCy Schubert
724*b2efd602SCy Schubert    To "roll" a cookie secret used in an anycast set.
725*b2efd602SCy Schubert    The new secret has to be added as **staging** secret to **all** nodes in
726*b2efd602SCy Schubert    the anycast set.
727*b2efd602SCy Schubert    When **all** nodes can verify DNS Cookies with the new secret, the new
728*b2efd602SCy Schubert    secret can be activated with the
729*b2efd602SCy Schubert    :ref:`activate_cookie_secret<unbound-control.commands.activate_cookie_secret>`
730*b2efd602SCy Schubert    command.
731*b2efd602SCy Schubert    After **all** nodes have the new secret **active** for at least one hour,
732*b2efd602SCy Schubert    the previous secret can be dropped with the
733*b2efd602SCy Schubert    :ref:`drop_cookie_secret<unbound-control.commands.drop_cookie_secret>`
734*b2efd602SCy Schubert    command.
735*b2efd602SCy Schubert
736*b2efd602SCy Schubert    Persistence is accomplished by writing to a file which is configured with
737*b2efd602SCy Schubert    the
738*b2efd602SCy Schubert    :ref:`cookie-secret-file<unbound.conf.cookie-secret-file>`
739*b2efd602SCy Schubert    option in the server section of the config file.
740*b2efd602SCy Schubert    This is disabled by default, "".
741*b2efd602SCy Schubert
742*b2efd602SCy Schubert
743*b2efd602SCy Schubert@@UAHL@unbound-control.commands@drop_cookie_secret@@
744*b2efd602SCy Schubert    Drop the **staging** cookie secret.
745*b2efd602SCy Schubert
746*b2efd602SCy Schubert
747*b2efd602SCy Schubert@@UAHL@unbound-control.commands@activate_cookie_secret@@
748*b2efd602SCy Schubert    Make the current **staging** cookie secret **active**, and the current
749*b2efd602SCy Schubert    **active** cookie secret **staging**.
750*b2efd602SCy Schubert
751*b2efd602SCy Schubert
752*b2efd602SCy Schubert@@UAHL@unbound-control.commands@print_cookie_secrets@@
753*b2efd602SCy Schubert    Show the current configured cookie secrets with their status.
754*b2efd602SCy Schubert
755*b2efd602SCy SchubertExit Code
756*b2efd602SCy Schubert---------
757*b2efd602SCy Schubert
758*b2efd602SCy SchubertThe ``unbound-control`` program exits with status code 1 on error, 0 on
759*b2efd602SCy Schubertsuccess.
760*b2efd602SCy Schubert
761*b2efd602SCy SchubertSet Up
762*b2efd602SCy Schubert------
763*b2efd602SCy Schubert
764*b2efd602SCy SchubertThe setup requires a self-signed certificate and private keys for both the
765*b2efd602SCy Schubertserver and client.
766*b2efd602SCy SchubertThe script ``unbound-control-setup`` generates these in the default run
767*b2efd602SCy Schubertdirectory, or with ``-d`` in another directory.
768*b2efd602SCy SchubertIf you change the access control permissions on the key files you can decide
769*b2efd602SCy Schubertwho can use ``unbound-control``, by default owner and group but not all users.
770*b2efd602SCy SchubertRun the script under the same username as you have configured in
771*b2efd602SCy Schubert:file:`unbound.conf` or as root, so that the daemon is permitted to read the
772*b2efd602SCy Schubertfiles, for example with:
773*b2efd602SCy Schubert
774*b2efd602SCy Schubert.. code-block:: bash
775*b2efd602SCy Schubert
776*b2efd602SCy Schubert    sudo -u unbound unbound-control-setup
777*b2efd602SCy Schubert
778*b2efd602SCy SchubertIf you have not configured a username in :file:`unbound.conf`, the keys need
779*b2efd602SCy Schubertread permission for the user credentials under which the daemon is started.
780*b2efd602SCy SchubertThe script preserves private keys present in the directory.
781*b2efd602SCy SchubertAfter running the script as root, turn on
782*b2efd602SCy Schubert:ref:`control-enable<unbound.conf.remote.control-enable>` in
783*b2efd602SCy Schubert:file:`unbound.conf`.
784*b2efd602SCy Schubert
785*b2efd602SCy SchubertStatistic Counters
786*b2efd602SCy Schubert------------------
787*b2efd602SCy Schubert
788*b2efd602SCy SchubertThe :ref:`stats<unbound-control.commands.stats>` and
789*b2efd602SCy Schubert:ref:`stats_noreset<unbound-control.commands.stats_noreset>` commands show a
790*b2efd602SCy Schubertnumber of statistic counters:
791*b2efd602SCy Schubert
792*b2efd602SCy Schubert
793*b2efd602SCy Schubert@@UAHL@unbound-control.stats@threadX.num.queries@@
794*b2efd602SCy Schubert    number of queries received by thread
795*b2efd602SCy Schubert
796*b2efd602SCy Schubert
797*b2efd602SCy Schubert@@UAHL@unbound-control.stats@threadX.num.queries_ip_ratelimited@@
798*b2efd602SCy Schubert    number of queries rate limited by thread
799*b2efd602SCy Schubert
800*b2efd602SCy Schubert
801*b2efd602SCy Schubert@@UAHL@unbound-control.stats@threadX.num.queries_cookie_valid@@
802*b2efd602SCy Schubert    number of queries with a valid DNS Cookie by thread
803*b2efd602SCy Schubert
804*b2efd602SCy Schubert
805*b2efd602SCy Schubert@@UAHL@unbound-control.stats@threadX.num.queries_cookie_client@@
806*b2efd602SCy Schubert    number of queries with a client part only DNS Cookie by thread
807*b2efd602SCy Schubert
808*b2efd602SCy Schubert
809*b2efd602SCy Schubert@@UAHL@unbound-control.stats@threadX.num.queries_cookie_invalid@@
810*b2efd602SCy Schubert    number of queries with an invalid DNS Cookie by thread
811*b2efd602SCy Schubert
812*b2efd602SCy Schubert
813*b2efd602SCy Schubert@@UAHL@unbound-control.stats@threadX.num.queries_discard_timeout@@
814*b2efd602SCy Schubert    number of queries removed due to discard-timeout by thread
815*b2efd602SCy Schubert
816*b2efd602SCy Schubert
817*b2efd602SCy Schubert@@UAHL@unbound-control.stats@threadX.num.queries_wait_limit@@
818*b2efd602SCy Schubert    number of queries removed due to wait-limit by thread
819*b2efd602SCy Schubert
820*b2efd602SCy Schubert
821*b2efd602SCy Schubert@@UAHL@unbound-control.stats@threadX.num.cachehits@@
822*b2efd602SCy Schubert    number of queries that were successfully answered using a cache lookup
823*b2efd602SCy Schubert
824*b2efd602SCy Schubert
825*b2efd602SCy Schubert@@UAHL@unbound-control.stats@threadX.num.cachemiss@@
826*b2efd602SCy Schubert    number of queries that needed recursive processing
827*b2efd602SCy Schubert
828*b2efd602SCy Schubert
829*b2efd602SCy Schubert@@UAHL@unbound-control.stats@threadX.num.dnscrypt.crypted@@
830*b2efd602SCy Schubert    number of queries that were encrypted and successfully decapsulated by
831*b2efd602SCy Schubert    dnscrypt.
832*b2efd602SCy Schubert
833*b2efd602SCy Schubert
834*b2efd602SCy Schubert@@UAHL@unbound-control.stats@threadX.num.dnscrypt.cert@@
835*b2efd602SCy Schubert    number of queries that were requesting dnscrypt certificates.
836*b2efd602SCy Schubert
837*b2efd602SCy Schubert
838*b2efd602SCy Schubert@@UAHL@unbound-control.stats@threadX.num.dnscrypt.cleartext@@
839*b2efd602SCy Schubert    number of queries received on dnscrypt port that were cleartext and not a
840*b2efd602SCy Schubert    request for certificates.
841*b2efd602SCy Schubert
842*b2efd602SCy Schubert
843*b2efd602SCy Schubert@@UAHL@unbound-control.stats@threadX.num.dnscrypt.malformed@@
844*b2efd602SCy Schubert    number of request that were neither cleartext, not valid dnscrypt messages.
845*b2efd602SCy Schubert
846*b2efd602SCy Schubert
847*b2efd602SCy Schubert@@UAHL@unbound-control.stats@threadX.num.dns_error_reports@@
848*b2efd602SCy Schubert    number of DNS Error Reports generated by thread
849*b2efd602SCy Schubert
850*b2efd602SCy Schubert
851*b2efd602SCy Schubert@@UAHL@unbound-control.stats@threadX.num.prefetch@@
852*b2efd602SCy Schubert    number of cache prefetches performed.
853*b2efd602SCy Schubert    This number is included in cachehits, as the original query had the
854*b2efd602SCy Schubert    unprefetched answer from cache, and resulted in recursive processing,
855*b2efd602SCy Schubert    taking a slot in the requestlist.
856*b2efd602SCy Schubert    Not part of the recursivereplies (or the histogram thereof) or cachemiss,
857*b2efd602SCy Schubert    as a cache response was sent.
858*b2efd602SCy Schubert
859*b2efd602SCy Schubert
860*b2efd602SCy Schubert@@UAHL@unbound-control.stats@threadX.num.expired@@
861*b2efd602SCy Schubert    number of replies that served an expired cache entry.
862*b2efd602SCy Schubert
863*b2efd602SCy Schubert
864*b2efd602SCy Schubert@@UAHL@unbound-control.stats@threadX.num.queries_timed_out@@
865*b2efd602SCy Schubert    number of queries that are dropped because they waited in the UDP socket
866*b2efd602SCy Schubert    buffer for too long.
867*b2efd602SCy Schubert
868*b2efd602SCy Schubert
869*b2efd602SCy Schubert@@UAHL@unbound-control.stats@threadX.query.queue_time_us.max@@
870*b2efd602SCy Schubert    The maximum wait time for packets in the socket buffer, in microseconds.
871*b2efd602SCy Schubert    This is only reported when
872*b2efd602SCy Schubert    :ref:`sock-queue-timeout<unbound.conf.sock-queue-timeout>` is enabled.
873*b2efd602SCy Schubert
874*b2efd602SCy Schubert
875*b2efd602SCy Schubert@@UAHL@unbound-control.stats@threadX.num.recursivereplies@@
876*b2efd602SCy Schubert    The number of replies sent to queries that needed recursive processing.
877*b2efd602SCy Schubert    Could be smaller than threadX.num.cachemiss if due to timeouts no replies
878*b2efd602SCy Schubert    were sent for some queries.
879*b2efd602SCy Schubert
880*b2efd602SCy Schubert
881*b2efd602SCy Schubert@@UAHL@unbound-control.stats@threadX.requestlist.avg@@
882*b2efd602SCy Schubert    The average number of requests in the internal recursive processing request
883*b2efd602SCy Schubert    list on insert of a new incoming recursive processing query.
884*b2efd602SCy Schubert
885*b2efd602SCy Schubert
886*b2efd602SCy Schubert@@UAHL@unbound-control.stats@threadX.requestlist.max@@
887*b2efd602SCy Schubert    Maximum size attained by the internal recursive processing request list.
888*b2efd602SCy Schubert
889*b2efd602SCy Schubert
890*b2efd602SCy Schubert@@UAHL@unbound-control.stats@threadX.requestlist.overwritten@@
891*b2efd602SCy Schubert    Number of requests in the request list that were overwritten by newer
892*b2efd602SCy Schubert    entries.
893*b2efd602SCy Schubert    This happens if there is a flood of queries that recursive processing and
894*b2efd602SCy Schubert    the server has a hard time.
895*b2efd602SCy Schubert
896*b2efd602SCy Schubert
897*b2efd602SCy Schubert@@UAHL@unbound-control.stats@threadX.requestlist.exceeded@@
898*b2efd602SCy Schubert    Queries that were dropped because the request list was full.
899*b2efd602SCy Schubert    This happens if a flood of queries need recursive processing, and the
900*b2efd602SCy Schubert    server can not keep up.
901*b2efd602SCy Schubert
902*b2efd602SCy Schubert
903*b2efd602SCy Schubert@@UAHL@unbound-control.stats@threadX.requestlist.current.all@@
904*b2efd602SCy Schubert    Current size of the request list, includes internally generated queries
905*b2efd602SCy Schubert    (such as priming queries and glue lookups).
906*b2efd602SCy Schubert
907*b2efd602SCy Schubert
908*b2efd602SCy Schubert@@UAHL@unbound-control.stats@threadX.requestlist.current.user@@
909*b2efd602SCy Schubert    Current size of the request list, only the requests from client queries.
910*b2efd602SCy Schubert
911*b2efd602SCy Schubert
912*b2efd602SCy Schubert@@UAHL@unbound-control.stats@threadX.recursion.time.avg@@
913*b2efd602SCy Schubert    Average time it took to answer queries that needed recursive processing.
914*b2efd602SCy Schubert    Note that queries that were answered from the cache are not in this average.
915*b2efd602SCy Schubert
916*b2efd602SCy Schubert
917*b2efd602SCy Schubert@@UAHL@unbound-control.stats@threadX.recursion.time.median@@
918*b2efd602SCy Schubert    The median of the time it took to answer queries that needed recursive
919*b2efd602SCy Schubert    processing.
920*b2efd602SCy Schubert    The median means that 50% of the user queries were answered in less than
921*b2efd602SCy Schubert    this time.
922*b2efd602SCy Schubert    Because of big outliers (usually queries to non responsive servers), the
923*b2efd602SCy Schubert    average can be bigger than the median.
924*b2efd602SCy Schubert    This median has been calculated by interpolation from a histogram.
925*b2efd602SCy Schubert
926*b2efd602SCy Schubert
927*b2efd602SCy Schubert@@UAHL@unbound-control.stats@threadX.tcpusage@@
928*b2efd602SCy Schubert    The currently held tcp buffers for incoming connections.
929*b2efd602SCy Schubert    A spot value on the time of the request.
930*b2efd602SCy Schubert    This helps you spot if the incoming-num-tcp buffers are full.
931*b2efd602SCy Schubert
932*b2efd602SCy Schubert
933*b2efd602SCy Schubert@@UAHL@unbound-control.stats@total.num.queries@@
934*b2efd602SCy Schubert    summed over threads.
935*b2efd602SCy Schubert
936*b2efd602SCy Schubert
937*b2efd602SCy Schubert@@UAHL@unbound-control.stats@total.num.queries_ip_ratelimited@@
938*b2efd602SCy Schubert    summed over threads.
939*b2efd602SCy Schubert
940*b2efd602SCy Schubert
941*b2efd602SCy Schubert@@UAHL@unbound-control.stats@total.num.queries_cookie_valid@@
942*b2efd602SCy Schubert    summed over threads.
943*b2efd602SCy Schubert
944*b2efd602SCy Schubert
945*b2efd602SCy Schubert@@UAHL@unbound-control.stats@total.num.queries_cookie_client@@
946*b2efd602SCy Schubert    summed over threads.
947*b2efd602SCy Schubert
948*b2efd602SCy Schubert
949*b2efd602SCy Schubert@@UAHL@unbound-control.stats@total.num.queries_cookie_invalid@@
950*b2efd602SCy Schubert    summed over threads.
951*b2efd602SCy Schubert
952*b2efd602SCy Schubert
953*b2efd602SCy Schubert@@UAHL@unbound-control.stats@total.num.queries_discard_timeout@@
954*b2efd602SCy Schubert    summed over threads.
955*b2efd602SCy Schubert
956*b2efd602SCy Schubert
957*b2efd602SCy Schubert@@UAHL@unbound-control.stats@total.num.queries_wait_limit@@
958*b2efd602SCy Schubert    summed over threads.
959*b2efd602SCy Schubert
960*b2efd602SCy Schubert
961*b2efd602SCy Schubert@@UAHL@unbound-control.stats@total.num.cachehits@@
962*b2efd602SCy Schubert    summed over threads.
963*b2efd602SCy Schubert
964*b2efd602SCy Schubert
965*b2efd602SCy Schubert@@UAHL@unbound-control.stats@total.num.cachemiss@@
966*b2efd602SCy Schubert    summed over threads.
967*b2efd602SCy Schubert
968*b2efd602SCy Schubert
969*b2efd602SCy Schubert@@UAHL@unbound-control.stats@total.num.dnscrypt.crypted@@
970*b2efd602SCy Schubert    summed over threads.
971*b2efd602SCy Schubert
972*b2efd602SCy Schubert
973*b2efd602SCy Schubert@@UAHL@unbound-control.stats@total.num.dnscrypt.cert@@
974*b2efd602SCy Schubert    summed over threads.
975*b2efd602SCy Schubert
976*b2efd602SCy Schubert
977*b2efd602SCy Schubert@@UAHL@unbound-control.stats@total.num.dnscrypt.cleartext@@
978*b2efd602SCy Schubert    summed over threads.
979*b2efd602SCy Schubert
980*b2efd602SCy Schubert
981*b2efd602SCy Schubert@@UAHL@unbound-control.stats@total.num.dnscrypt.malformed@@
982*b2efd602SCy Schubert    summed over threads.
983*b2efd602SCy Schubert
984*b2efd602SCy Schubert
985*b2efd602SCy Schubert@@UAHL@unbound-control.stats@total.num.dns_error_reports@@
986*b2efd602SCy Schubert    summed over threads.
987*b2efd602SCy Schubert
988*b2efd602SCy Schubert
989*b2efd602SCy Schubert@@UAHL@unbound-control.stats@total.num.prefetch@@
990*b2efd602SCy Schubert    summed over threads.
991*b2efd602SCy Schubert
992*b2efd602SCy Schubert
993*b2efd602SCy Schubert@@UAHL@unbound-control.stats@total.num.expired@@
994*b2efd602SCy Schubert    summed over threads.
995*b2efd602SCy Schubert
996*b2efd602SCy Schubert
997*b2efd602SCy Schubert@@UAHL@unbound-control.stats@total.num.queries_timed_out@@
998*b2efd602SCy Schubert    summed over threads.
999*b2efd602SCy Schubert
1000*b2efd602SCy Schubert
1001*b2efd602SCy Schubert@@UAHL@unbound-control.stats@total.query.queue_time_us.max@@
1002*b2efd602SCy Schubert    the maximum of the thread values.
1003*b2efd602SCy Schubert
1004*b2efd602SCy Schubert
1005*b2efd602SCy Schubert@@UAHL@unbound-control.stats@total.num.recursivereplies@@
1006*b2efd602SCy Schubert    summed over threads.
1007*b2efd602SCy Schubert
1008*b2efd602SCy Schubert
1009*b2efd602SCy Schubert@@UAHL@unbound-control.stats@total.requestlist.avg@@
1010*b2efd602SCy Schubert    averaged over threads.
1011*b2efd602SCy Schubert
1012*b2efd602SCy Schubert
1013*b2efd602SCy Schubert@@UAHL@unbound-control.stats@total.requestlist.max@@
1014*b2efd602SCy Schubert    the maximum of the thread requestlist.max values.
1015*b2efd602SCy Schubert
1016*b2efd602SCy Schubert
1017*b2efd602SCy Schubert@@UAHL@unbound-control.stats@total.requestlist.overwritten@@
1018*b2efd602SCy Schubert    summed over threads.
1019*b2efd602SCy Schubert
1020*b2efd602SCy Schubert
1021*b2efd602SCy Schubert@@UAHL@unbound-control.stats@total.requestlist.exceeded@@
1022*b2efd602SCy Schubert    summed over threads.
1023*b2efd602SCy Schubert
1024*b2efd602SCy Schubert
1025*b2efd602SCy Schubert@@UAHL@unbound-control.stats@total.requestlist.current.all@@
1026*b2efd602SCy Schubert    summed over threads.
1027*b2efd602SCy Schubert
1028*b2efd602SCy Schubert
1029*b2efd602SCy Schubert@@UAHL@unbound-control.stats@total.recursion.time.median@@
1030*b2efd602SCy Schubert    averaged over threads.
1031*b2efd602SCy Schubert
1032*b2efd602SCy Schubert
1033*b2efd602SCy Schubert@@UAHL@unbound-control.stats@total.tcpusage@@
1034*b2efd602SCy Schubert    summed over threads.
1035*b2efd602SCy Schubert
1036*b2efd602SCy Schubert
1037*b2efd602SCy Schubert@@UAHL@unbound-control.stats@time.now@@
1038*b2efd602SCy Schubert    current time in seconds since 1970.
1039*b2efd602SCy Schubert
1040*b2efd602SCy Schubert
1041*b2efd602SCy Schubert@@UAHL@unbound-control.stats@time.up@@
1042*b2efd602SCy Schubert    uptime since server boot in seconds.
1043*b2efd602SCy Schubert
1044*b2efd602SCy Schubert
1045*b2efd602SCy Schubert@@UAHL@unbound-control.stats@time.elapsed@@
1046*b2efd602SCy Schubert    time since last statistics printout, in seconds.
1047*b2efd602SCy Schubert
1048*b2efd602SCy SchubertExtended Statistics
1049*b2efd602SCy Schubert-------------------
1050*b2efd602SCy Schubert
1051*b2efd602SCy Schubert
1052*b2efd602SCy Schubert@@UAHL@unbound-control.stats@mem.cache.rrset@@
1053*b2efd602SCy Schubert    Memory in bytes in use by the RRset cache.
1054*b2efd602SCy Schubert
1055*b2efd602SCy Schubert
1056*b2efd602SCy Schubert@@UAHL@unbound-control.stats@mem.cache.message@@
1057*b2efd602SCy Schubert    Memory in bytes in use by the message cache.
1058*b2efd602SCy Schubert
1059*b2efd602SCy Schubert
1060*b2efd602SCy Schubert@@UAHL@unbound-control.stats@mem.cache.dnscrypt_shared_secret@@
1061*b2efd602SCy Schubert    Memory in bytes in use by the dnscrypt shared secrets cache.
1062*b2efd602SCy Schubert
1063*b2efd602SCy Schubert
1064*b2efd602SCy Schubert@@UAHL@unbound-control.stats@mem.cache.dnscrypt_nonce@@
1065*b2efd602SCy Schubert    Memory in bytes in use by the dnscrypt nonce cache.
1066*b2efd602SCy Schubert
1067*b2efd602SCy Schubert
1068*b2efd602SCy Schubert@@UAHL@unbound-control.stats@mem.mod.iterator@@
1069*b2efd602SCy Schubert    Memory in bytes in use by the iterator module.
1070*b2efd602SCy Schubert
1071*b2efd602SCy Schubert
1072*b2efd602SCy Schubert@@UAHL@unbound-control.stats@mem.mod.validator@@
1073*b2efd602SCy Schubert    Memory in bytes in use by the validator module.
1074*b2efd602SCy Schubert    Includes the key cache and negative cache.
1075*b2efd602SCy Schubert
1076*b2efd602SCy Schubert
1077*b2efd602SCy Schubert@@UAHL@unbound-control.stats@mem.streamwait@@
1078*b2efd602SCy Schubert    Memory in bytes in used by the TCP and TLS stream wait buffers.
1079*b2efd602SCy Schubert    These are answers waiting to be written back to the clients.
1080*b2efd602SCy Schubert
1081*b2efd602SCy Schubert
1082*b2efd602SCy Schubert@@UAHL@unbound-control.stats@mem.http.query_buffer@@
1083*b2efd602SCy Schubert    Memory in bytes used by the HTTP/2 query buffers.
1084*b2efd602SCy Schubert    Containing (partial) DNS queries waiting for request stream completion.
1085*b2efd602SCy Schubert
1086*b2efd602SCy Schubert
1087*b2efd602SCy Schubert@@UAHL@unbound-control.stats@mem.http.response_buffer@@
1088*b2efd602SCy Schubert    Memory in bytes used by the HTTP/2 response buffers.
1089*b2efd602SCy Schubert    Containing DNS responses waiting to be written back to the clients.
1090*b2efd602SCy Schubert
1091*b2efd602SCy Schubert
1092*b2efd602SCy Schubert@@UAHL@unbound-control.stats@mem.quic@@
1093*b2efd602SCy Schubert    Memory in bytes used by QUIC.
1094*b2efd602SCy Schubert    Containing connection information, stream information, queries read and
1095*b2efd602SCy Schubert    responses written back to the clients.
1096*b2efd602SCy Schubert
1097*b2efd602SCy Schubert@@UAHL@unbound-control.stats@histogram@@.<sec>.<usec>.to.<sec>.<usec>
1098*b2efd602SCy Schubert    Shows a histogram, summed over all threads.
1099*b2efd602SCy Schubert    Every element counts the recursive queries whose reply time fit between the
1100*b2efd602SCy Schubert    lower and upper bound.
1101*b2efd602SCy Schubert    Times larger or equal to the lowerbound, and smaller than the upper bound.
1102*b2efd602SCy Schubert    There are 40 buckets, with bucket sizes doubling.
1103*b2efd602SCy Schubert
1104*b2efd602SCy Schubert
1105*b2efd602SCy Schubert@@UAHL@unbound-control.stats@num.query.type.A@@
1106*b2efd602SCy Schubert    The total number of queries over all threads with query type A.
1107*b2efd602SCy Schubert    Printed for the other query types as well, but only for the types for which
1108*b2efd602SCy Schubert    queries were received, thus =0 entries are omitted for brevity.
1109*b2efd602SCy Schubert
1110*b2efd602SCy Schubert
1111*b2efd602SCy Schubert@@UAHL@unbound-control.stats@num.query.type.other@@
1112*b2efd602SCy Schubert    Number of queries with query types 256-65535.
1113*b2efd602SCy Schubert
1114*b2efd602SCy Schubert
1115*b2efd602SCy Schubert@@UAHL@unbound-control.stats@num.query.class.IN@@
1116*b2efd602SCy Schubert    The total number of queries over all threads with query class IN
1117*b2efd602SCy Schubert    (internet).
1118*b2efd602SCy Schubert    Also printed for other classes (such as CH (CHAOS) sometimes used for
1119*b2efd602SCy Schubert    debugging), or NONE, ANY, used by dynamic update.
1120*b2efd602SCy Schubert    num.query.class.other is printed for classes 256-65535.
1121*b2efd602SCy Schubert
1122*b2efd602SCy Schubert
1123*b2efd602SCy Schubert@@UAHL@unbound-control.stats@num.query.opcode.QUERY@@
1124*b2efd602SCy Schubert    The total number of queries over all threads with query opcode QUERY.
1125*b2efd602SCy Schubert    Also printed for other opcodes, UPDATE, ...
1126*b2efd602SCy Schubert
1127*b2efd602SCy Schubert
1128*b2efd602SCy Schubert@@UAHL@unbound-control.stats@num.query.tcp@@
1129*b2efd602SCy Schubert    Number of queries that were made using TCP towards the Unbound server.
1130*b2efd602SCy Schubert
1131*b2efd602SCy Schubert
1132*b2efd602SCy Schubert@@UAHL@unbound-control.stats@num.query.tcpout@@
1133*b2efd602SCy Schubert    Number of queries that the Unbound server made using TCP outgoing towards
1134*b2efd602SCy Schubert    other servers.
1135*b2efd602SCy Schubert
1136*b2efd602SCy Schubert
1137*b2efd602SCy Schubert@@UAHL@unbound-control.stats@num.query.udpout@@
1138*b2efd602SCy Schubert    Number of queries that the Unbound server made using UDP outgoing towards
1139*b2efd602SCy Schubert    other servers.
1140*b2efd602SCy Schubert
1141*b2efd602SCy Schubert
1142*b2efd602SCy Schubert@@UAHL@unbound-control.stats@num.query.tls@@
1143*b2efd602SCy Schubert    Number of queries that were made using TLS towards the Unbound server.
1144*b2efd602SCy Schubert    These are also counted in num.query.tcp, because TLS uses TCP.
1145*b2efd602SCy Schubert
1146*b2efd602SCy Schubert
1147*b2efd602SCy Schubert@@UAHL@unbound-control.stats@num.query.tls.resume@@
1148*b2efd602SCy Schubert    Number of TLS session resumptions, these are queries over TLS towards the
1149*b2efd602SCy Schubert    Unbound server where the client negotiated a TLS session resumption key.
1150*b2efd602SCy Schubert
1151*b2efd602SCy Schubert
1152*b2efd602SCy Schubert@@UAHL@unbound-control.stats@num.query.https@@
1153*b2efd602SCy Schubert    Number of queries that were made using HTTPS towards the Unbound server.
1154*b2efd602SCy Schubert    These are also counted in num.query.tcp and num.query.tls, because HTTPS
1155*b2efd602SCy Schubert    uses TLS and TCP.
1156*b2efd602SCy Schubert
1157*b2efd602SCy Schubert
1158*b2efd602SCy Schubert@@UAHL@unbound-control.stats@num.query.quic@@
1159*b2efd602SCy Schubert    Number of queries that were made using QUIC towards the Unbound server.
1160*b2efd602SCy Schubert    These are also counted in num.query.tls, because TLS is used for these
1161*b2efd602SCy Schubert    queries.
1162*b2efd602SCy Schubert
1163*b2efd602SCy Schubert
1164*b2efd602SCy Schubert@@UAHL@unbound-control.stats@num.query.ipv6@@
1165*b2efd602SCy Schubert    Number of queries that were made using IPv6 towards the Unbound server.
1166*b2efd602SCy Schubert
1167*b2efd602SCy Schubert
1168*b2efd602SCy Schubert@@UAHL@unbound-control.stats@num.query.flags.RD@@
1169*b2efd602SCy Schubert    The number of queries that had the RD flag set in the header.
1170*b2efd602SCy Schubert    Also printed for flags QR, AA, TC, RA, Z, AD, CD.
1171*b2efd602SCy Schubert    Note that queries with flags QR, AA or TC may have been rejected because of
1172*b2efd602SCy Schubert    that.
1173*b2efd602SCy Schubert
1174*b2efd602SCy Schubert
1175*b2efd602SCy Schubert@@UAHL@unbound-control.stats@num.query.edns.present@@
1176*b2efd602SCy Schubert    number of queries that had an EDNS OPT record present.
1177*b2efd602SCy Schubert
1178*b2efd602SCy Schubert
1179*b2efd602SCy Schubert@@UAHL@unbound-control.stats@num.query.edns.DO@@
1180*b2efd602SCy Schubert    number of queries that had an EDNS OPT record with the DO (DNSSEC OK) bit
1181*b2efd602SCy Schubert    set.
1182*b2efd602SCy Schubert    These queries are also included in the num.query.edns.present number.
1183*b2efd602SCy Schubert
1184*b2efd602SCy Schubert
1185*b2efd602SCy Schubert@@UAHL@unbound-control.stats@num.query.ratelimited@@
1186*b2efd602SCy Schubert    The number of queries that are turned away from being send to nameserver
1187*b2efd602SCy Schubert    due to ratelimiting.
1188*b2efd602SCy Schubert
1189*b2efd602SCy Schubert
1190*b2efd602SCy Schubert@@UAHL@unbound-control.stats@num.query.dnscrypt.shared_secret.cachemiss@@
1191*b2efd602SCy Schubert    The number of dnscrypt queries that did not find a shared secret in the
1192*b2efd602SCy Schubert    cache.
1193*b2efd602SCy Schubert    This can be use to compute the shared secret hitrate.
1194*b2efd602SCy Schubert
1195*b2efd602SCy Schubert
1196*b2efd602SCy Schubert@@UAHL@unbound-control.stats@num.query.dnscrypt.replay@@
1197*b2efd602SCy Schubert    The number of dnscrypt queries that found a nonce hit in the nonce cache
1198*b2efd602SCy Schubert    and hence are considered a query replay.
1199*b2efd602SCy Schubert
1200*b2efd602SCy Schubert
1201*b2efd602SCy Schubert@@UAHL@unbound-control.stats@num.answer.rcode.NXDOMAIN@@
1202*b2efd602SCy Schubert    The number of answers to queries, from cache or from recursion, that had
1203*b2efd602SCy Schubert    the return code NXDOMAIN.
1204*b2efd602SCy Schubert    Also printed for the other return codes.
1205*b2efd602SCy Schubert
1206*b2efd602SCy Schubert
1207*b2efd602SCy Schubert@@UAHL@unbound-control.stats@num.answer.rcode.nodata@@
1208*b2efd602SCy Schubert    The number of answers to queries that had the pseudo return code nodata.
1209*b2efd602SCy Schubert    This means the actual return code was NOERROR, but additionally, no data
1210*b2efd602SCy Schubert    was carried in the answer (making what is called a NOERROR/NODATA answer).
1211*b2efd602SCy Schubert    These queries are also included in the num.answer.rcode.NOERROR number.
1212*b2efd602SCy Schubert    Common for AAAA lookups when an A record exists, and no AAAA.
1213*b2efd602SCy Schubert
1214*b2efd602SCy Schubert
1215*b2efd602SCy Schubert@@UAHL@unbound-control.stats@num.answer.secure@@
1216*b2efd602SCy Schubert    Number of answers that were secure.
1217*b2efd602SCy Schubert    The answer validated correctly.
1218*b2efd602SCy Schubert    The AD bit might have been set in some of these answers, where the client
1219*b2efd602SCy Schubert    signalled (with DO or AD bit in the query) that they were ready to accept
1220*b2efd602SCy Schubert    the AD bit in the answer.
1221*b2efd602SCy Schubert
1222*b2efd602SCy Schubert
1223*b2efd602SCy Schubert@@UAHL@unbound-control.stats@num.answer.bogus@@
1224*b2efd602SCy Schubert    Number of answers that were bogus.
1225*b2efd602SCy Schubert    These answers resulted in SERVFAIL to the client because the answer failed
1226*b2efd602SCy Schubert    validation.
1227*b2efd602SCy Schubert
1228*b2efd602SCy Schubert
1229*b2efd602SCy Schubert@@UAHL@unbound-control.stats@num.rrset.bogus@@
1230*b2efd602SCy Schubert    The number of rrsets marked bogus by the validator.
1231*b2efd602SCy Schubert    Increased for every RRset inspection that fails.
1232*b2efd602SCy Schubert
1233*b2efd602SCy Schubert
1234*b2efd602SCy Schubert@@UAHL@unbound-control.stats@num.valops@@
1235*b2efd602SCy Schubert    The number of validation operations performed by the validator.
1236*b2efd602SCy Schubert    Increased for every RRSIG verification operation regardless of the
1237*b2efd602SCy Schubert    validation result.
1238*b2efd602SCy Schubert    The RRSIG and key combination needs to first pass some sanity checks before
1239*b2efd602SCy Schubert    Unbound even performs the verification, e.g., length/protocol checks.
1240*b2efd602SCy Schubert
1241*b2efd602SCy Schubert
1242*b2efd602SCy Schubert@@UAHL@unbound-control.stats@unwanted.queries@@
1243*b2efd602SCy Schubert    Number of queries that were refused or dropped because they failed the
1244*b2efd602SCy Schubert    access control settings.
1245*b2efd602SCy Schubert
1246*b2efd602SCy Schubert
1247*b2efd602SCy Schubert@@UAHL@unbound-control.stats@unwanted.replies@@
1248*b2efd602SCy Schubert    Replies that were unwanted or unsolicited.
1249*b2efd602SCy Schubert    Could have been random traffic, delayed duplicates, very late answers, or
1250*b2efd602SCy Schubert    could be spoofing attempts.
1251*b2efd602SCy Schubert    Some low level of late answers and delayed duplicates are to be expected
1252*b2efd602SCy Schubert    with the UDP protocol.
1253*b2efd602SCy Schubert    Very high values could indicate a threat (spoofing).
1254*b2efd602SCy Schubert
1255*b2efd602SCy Schubert
1256*b2efd602SCy Schubert@@UAHL@unbound-control.stats@msg.cache.count@@
1257*b2efd602SCy Schubert    The number of items (DNS replies) in the message cache.
1258*b2efd602SCy Schubert
1259*b2efd602SCy Schubert
1260*b2efd602SCy Schubert@@UAHL@unbound-control.stats@rrset.cache.count@@
1261*b2efd602SCy Schubert    The number of RRsets in the rrset cache.
1262*b2efd602SCy Schubert    This includes rrsets used by the messages in the message cache, but also
1263*b2efd602SCy Schubert    delegation information.
1264*b2efd602SCy Schubert
1265*b2efd602SCy Schubert
1266*b2efd602SCy Schubert@@UAHL@unbound-control.stats@infra.cache.count@@
1267*b2efd602SCy Schubert    The number of items in the infra cache.
1268*b2efd602SCy Schubert    These are IP addresses with their timing and protocol support information.
1269*b2efd602SCy Schubert
1270*b2efd602SCy Schubert
1271*b2efd602SCy Schubert@@UAHL@unbound-control.stats@key.cache.count@@
1272*b2efd602SCy Schubert    The number of items in the key cache.
1273*b2efd602SCy Schubert    These are DNSSEC keys, one item per delegation point, and their validation
1274*b2efd602SCy Schubert    status.
1275*b2efd602SCy Schubert
1276*b2efd602SCy Schubert
1277*b2efd602SCy Schubert@@UAHL@unbound-control.stats@msg.cache.max_collisions@@
1278*b2efd602SCy Schubert    The maximum number of hash table collisions in the msg cache.
1279*b2efd602SCy Schubert    This is the number of hashes that are identical when a new element is
1280*b2efd602SCy Schubert    inserted in the hash table.
1281*b2efd602SCy Schubert    If the value is very large, like hundreds, something is wrong with the
1282*b2efd602SCy Schubert    performance of the hash table, hash values are incorrect or malicious.
1283*b2efd602SCy Schubert
1284*b2efd602SCy Schubert
1285*b2efd602SCy Schubert@@UAHL@unbound-control.stats@rrset.cache.max_collisions@@
1286*b2efd602SCy Schubert    The maximum number of hash table collisions in the rrset cache.
1287*b2efd602SCy Schubert    This is the number of hashes that are identical when a new element is
1288*b2efd602SCy Schubert    inserted in the hash table.
1289*b2efd602SCy Schubert    If the value is very large, like hundreds, something is wrong with the
1290*b2efd602SCy Schubert    performance of the hash table, hash values are incorrect or malicious.
1291*b2efd602SCy Schubert
1292*b2efd602SCy Schubert
1293*b2efd602SCy Schubert@@UAHL@unbound-control.stats@dnscrypt_shared_secret.cache.count@@
1294*b2efd602SCy Schubert    The number of items in the shared secret cache.
1295*b2efd602SCy Schubert    These are precomputed shared secrets for a given client public key/server
1296*b2efd602SCy Schubert    secret key pair.
1297*b2efd602SCy Schubert    Shared secrets are CPU intensive and this cache allows Unbound to avoid
1298*b2efd602SCy Schubert    recomputing the shared secret when multiple dnscrypt queries are sent from
1299*b2efd602SCy Schubert    the same client.
1300*b2efd602SCy Schubert
1301*b2efd602SCy Schubert
1302*b2efd602SCy Schubert@@UAHL@unbound-control.stats@dnscrypt_nonce.cache.count@@
1303*b2efd602SCy Schubert    The number of items in the client nonce cache.
1304*b2efd602SCy Schubert    This cache is used to prevent dnscrypt queries replay.
1305*b2efd602SCy Schubert    The client nonce must be unique for each client public key/server secret
1306*b2efd602SCy Schubert    key pair.
1307*b2efd602SCy Schubert    This cache should be able to host QPS * `replay window` interval keys to
1308*b2efd602SCy Schubert    prevent replay of a query during `replay window` seconds.
1309*b2efd602SCy Schubert
1310*b2efd602SCy Schubert
1311*b2efd602SCy Schubert@@UAHL@unbound-control.stats@num.query.authzone.up@@
1312*b2efd602SCy Schubert    The number of queries answered from auth-zone data, upstream queries.
1313*b2efd602SCy Schubert    These queries would otherwise have been sent (with fallback enabled) to the
1314*b2efd602SCy Schubert    internet, but are now answered from the auth zone.
1315*b2efd602SCy Schubert
1316*b2efd602SCy Schubert
1317*b2efd602SCy Schubert@@UAHL@unbound-control.stats@num.query.authzone.down@@
1318*b2efd602SCy Schubert    The number of queries for downstream answered from auth-zone data.
1319*b2efd602SCy Schubert    These queries are from downstream clients, and have had an answer from the
1320*b2efd602SCy Schubert    data in the auth zone.
1321*b2efd602SCy Schubert
1322*b2efd602SCy Schubert
1323*b2efd602SCy Schubert@@UAHL@unbound-control.stats@num.query.aggressive.NOERROR@@
1324*b2efd602SCy Schubert    The number of queries answered using cached NSEC records with NODATA RCODE.
1325*b2efd602SCy Schubert    These queries would otherwise have been sent to the internet, but are now
1326*b2efd602SCy Schubert    answered using cached data.
1327*b2efd602SCy Schubert
1328*b2efd602SCy Schubert
1329*b2efd602SCy Schubert@@UAHL@unbound-control.stats@num.query.aggressive.NXDOMAIN@@
1330*b2efd602SCy Schubert    The number of queries answered using cached NSEC records with NXDOMAIN
1331*b2efd602SCy Schubert    RCODE.
1332*b2efd602SCy Schubert    These queries would otherwise have been sent to the internet, but are now
1333*b2efd602SCy Schubert    answered using cached data.
1334*b2efd602SCy Schubert
1335*b2efd602SCy Schubert
1336*b2efd602SCy Schubert@@UAHL@unbound-control.stats@num.query.subnet@@
1337*b2efd602SCy Schubert    Number of queries that got an answer that contained EDNS client subnet
1338*b2efd602SCy Schubert    data.
1339*b2efd602SCy Schubert
1340*b2efd602SCy Schubert
1341*b2efd602SCy Schubert@@UAHL@unbound-control.stats@num.query.subnet_cache@@
1342*b2efd602SCy Schubert    Number of queries answered from the edns client subnet cache.
1343*b2efd602SCy Schubert    These are counted as cachemiss by the main counters, but hit the client
1344*b2efd602SCy Schubert    subnet specific cache after getting processed by the edns client subnet
1345*b2efd602SCy Schubert    module.
1346*b2efd602SCy Schubert
1347*b2efd602SCy Schubert
1348*b2efd602SCy Schubert@@UAHL@unbound-control.stats@num.query.cachedb@@
1349*b2efd602SCy Schubert    Number of queries answered from the external cache of cachedb.
1350*b2efd602SCy Schubert    These are counted as cachemiss by the main counters, but hit the cachedb
1351*b2efd602SCy Schubert    external cache after getting processed by the cachedb module.
1352*b2efd602SCy Schubert
1353*b2efd602SCy Schubert@@UAHL@unbound-control.stats@num.rpz.action@@.<rpz_action>
1354*b2efd602SCy Schubert    Number of queries answered using configured RPZ policy, per RPZ action
1355*b2efd602SCy Schubert    type.
1356*b2efd602SCy Schubert    Possible actions are: nxdomain, nodata, passthru, drop, tcp-only,
1357*b2efd602SCy Schubert    local-data, disabled, and cname-override.
1358*b2efd602SCy Schubert
1359*b2efd602SCy SchubertFiles
1360*b2efd602SCy Schubert-----
1361*b2efd602SCy Schubert
1362*b2efd602SCy Schubert@ub_conf_file@
1363*b2efd602SCy Schubert    Unbound configuration file.
1364*b2efd602SCy Schubert
1365*b2efd602SCy Schubert@UNBOUND_RUN_DIR@
1366*b2efd602SCy Schubert    directory with private keys (:file:`unbound_server.key` and
1367*b2efd602SCy Schubert    :file:`unbound_control.key`) and self-signed certificates
1368*b2efd602SCy Schubert    (:file:`unbound_server.pem` and :file:`unbound_control.pem`).
1369*b2efd602SCy Schubert
1370*b2efd602SCy SchubertSee Also
1371*b2efd602SCy Schubert--------
1372*b2efd602SCy Schubert
1373*b2efd602SCy Schubert:doc:`unbound.conf(5)</manpages/unbound.conf>`,
1374*b2efd602SCy Schubert:doc:`unbound(8)</manpages/unbound>`.
1375