1
2Specification for the unbound-control protocol.
3
4Server listens on 8953 TCP (localhost by default). Client connects,
5SSLv3 or TLSv1 connection setup (server selfsigned certificate, 
6client has cert signed by server certificate).
7
8Port 8953 is registered with IANA as:
9ub-dns-control  8953/tcp    unbound dns nameserver control
10# Wouter Wijngaards <wouter&nlnetlabs.nl> 10 May 2011
11On may 11 2011, ticket [IANA #442315].
12
13Query and Response
14------------------
15Client sends 
16	UBCT[version] [commandline] \n
17	fixed string UBCT1 (for version 1), then an ascii text line,
18	with a command, some whitespace allowed. Line ends with '\n'.
19
20Server executes command. And sends reply in ascii text over channel, 
21closes the channel when done.
22	in case of error the first line of the response is:
23		error <descriptive text possible> \n
24	or the remainder is data of the response, for many commands the 
25	response is 'ok\n'.
26
27Queries and responses
28---------------------
29stop
30	stops the server.
31reload
32	reloads the config file, and flushes the cache.
33verbosity <new value>
34	Change logging verbosity to new value.
35stats
36	output is a list of [name]=[value] lines.
37	clears the counters.
38dump_cache
39	output is a text representation of the cache contents.
40	data ends with a line 'EOF' before connection close.
41load_cache
42	client sends cache contents (like from dump_cache), which is stored 
43	in the cache. end of data indicated with a line with 'EOF' on it.
44	The data is sent after the query line.
45flush <name>
46	flushes some information regarding the name from the cache.
47	removes the A, AAAA, NS, SOA, CNAME, DNAME, MX, PTR, SRV, NAPTR types.
48	Does not remove other types.
49flush_type <name> <RR type>
50	removes rrtype entry from the cache.
51flush_zone <name>
52	removes name and everything below that name from the cache.
53	has to search through the cache item by item, so this is slow.
54lookup <name>
55	see what servers would be queried for a lookup of the given name.
56local_zone_remove <name of local-zone entry>
57	the local-zone entry is removed.
58	All data from the local zone is also deleted.
59	If it did not exist, nothing happens.
60local_zone <name of local zone> <type>
61	As the config file entry. Adds new local zone or updates
62	existing zone type.
63local_data_remove <name>
64	Removes local-data (all types) name.
65local_data <resource record string>
66	Add new local data record (on the rest of the line).
67	local_data_add www.example.com. IN A 192.0.2.2
68	if no local_zone exists for it; a transparent zone with the same
69	name as the data is created.
70Other commands in the unbound-control manual page.
71