1238106Sdes
2238106SdesSpecification for the unbound-control protocol.
3238106Sdes
4238106SdesServer listens on 8953 TCP (localhost by default). Client connects,
5238106SdesSSLv3 or TLSv1 connection setup (server selfsigned certificate, 
6238106Sdesclient has cert signed by server certificate).
7238106Sdes
8238106SdesPort 8953 is registered with IANA as:
9238106Sdesub-dns-control  8953/tcp    unbound dns nameserver control
10238106Sdes# Wouter Wijngaards <wouter&nlnetlabs.nl> 10 May 2011
11238106SdesOn may 11 2011, ticket [IANA #442315].
12238106Sdes
13238106SdesQuery and Response
14238106Sdes------------------
15238106SdesClient sends 
16238106Sdes	UBCT[version] [commandline] \n
17238106Sdes	fixed string UBCT1 (for version 1), then an ascii text line,
18238106Sdes	with a command, some whitespace allowed. Line ends with '\n'.
19238106Sdes
20238106SdesServer executes command. And sends reply in ascii text over channel, 
21238106Sdescloses the channel when done.
22238106Sdes	in case of error the first line of the response is:
23238106Sdes		error <descriptive text possible> \n
24238106Sdes	or the remainder is data of the response, for many commands the 
25238106Sdes	response is 'ok\n'.
26238106Sdes
27238106SdesQueries and responses
28238106Sdes---------------------
29238106Sdesstop
30238106Sdes	stops the server.
31238106Sdesreload
32238106Sdes	reloads the config file, and flushes the cache.
33238106Sdesverbosity <new value>
34238106Sdes	Change logging verbosity to new value.
35238106Sdesstats
36238106Sdes	output is a list of [name]=[value] lines.
37238106Sdes	clears the counters.
38238106Sdesdump_cache
39238106Sdes	output is a text representation of the cache contents.
40238106Sdes	data ends with a line 'EOF' before connection close.
41238106Sdesload_cache
42238106Sdes	client sends cache contents (like from dump_cache), which is stored 
43238106Sdes	in the cache. end of data indicated with a line with 'EOF' on it.
44238106Sdes	The data is sent after the query line.
45238106Sdesflush <name>
46238106Sdes	flushes some information regarding the name from the cache.
47238106Sdes	removes the A, AAAA, NS, SOA, CNAME, DNAME, MX, PTR, SRV, NAPTR types.
48238106Sdes	Does not remove other types.
49238106Sdesflush_type <name> <RR type>
50238106Sdes	removes rrtype entry from the cache.
51238106Sdesflush_zone <name>
52238106Sdes	removes name and everything below that name from the cache.
53238106Sdes	has to search through the cache item by item, so this is slow.
54238106Sdeslookup <name>
55238106Sdes	see what servers would be queried for a lookup of the given name.
56238106Sdeslocal_zone_remove <name of local-zone entry>
57238106Sdes	the local-zone entry is removed.
58238106Sdes	All data from the local zone is also deleted.
59238106Sdes	If it did not exist, nothing happens.
60238106Sdeslocal_zone <name of local zone> <type>
61238106Sdes	As the config file entry. Adds new local zone or updates
62238106Sdes	existing zone type.
63238106Sdeslocal_data_remove <name>
64238106Sdes	Removes local-data (all types) name.
65238106Sdeslocal_data <resource record string>
66238106Sdes	Add new local data record (on the rest of the line).
67238106Sdes	local_data_add www.example.com. IN A 192.0.2.2
68238106Sdes	if no local_zone exists for it; a transparent zone with the same
69238106Sdes	name as the data is created.
70238106SdesOther commands in the unbound-control manual page.
71