1unbound-anchor(8) unbound 1.6.6 unbound-anchor(8)
2
3
4
6 unbound-anchor - Unbound anchor utility.
7
9 unbound-anchor [opts]
10
12 Unbound-anchor performs setup or update of the root trust anchor for
13 DNSSEC validation. The program fetches the trust anchor with the
14 method from RFC7958 when regular RFC5011 update fails to bring it up to
15 date. It can be run (as root) from the commandline, or run as part of
16 startup scripts. Before you start the unbound(8) DNS server.
17
18 Suggested usage:
19
20 # in the init scripts.
21 # provide or update the root anchor (if necessary)
22 unbound-anchor -a "/var/lib/unbound/root.key"
23 # Please note usage of this root anchor is at your own risk
24 # and under the terms of our LICENSE (see source).
25 #
26 # start validating resolver
27 # the unbound.conf contains:
28 # auto-trust-anchor-file: "/var/lib/unbound/root.key"
29 unbound -c unbound.conf
30
31 This tool provides builtin default contents for the root anchor and
32 root update certificate files.
33
34 It tests if the root anchor file works, and if not, and an update is
35 possible, attempts to update the root anchor using the root update cer‐
36 tificate. It performs a https fetch of root-anchors.xml and checks the
37 results (RFC7958), if all checks are successful, it updates the root
38 anchor file. Otherwise the root anchor file is unchanged. It performs
39 RFC5011 tracking if the DNSSEC information available via the DNS makes
40 that possible.
41
42 It does not perform an update if the certificate is expired, if the
43 network is down or other errors occur.
44
45 The available options are:
46
47 -a file
48 The root anchor key file, that is read in and written out.
49 Default is /var/lib/unbound/root.key. If the file does not
50 exist, or is empty, a builtin root key is written to it.
51
52 -c file
53 The root update certificate file, that is read in. Default is
54 /etc/unbound/icannbundle.pem. If the file does not exist, or is
55 empty, a builtin certificate is used.
56
57 -l List the builtin root key and builtin root update certificate on
58 stdout.
59
60 -u name
61 The server name, it connects to https://name. Specify without
62 https:// prefix. The default is "data.iana.org". It connects
63 to the port specified with -P. You can pass an IPv4 address or
64 IPv6 address (no brackets) if you want.
65
66 -x path
67 The pathname to the root-anchors.xml file on the server. (forms
68 URL with -u). The default is /root-anchors/root-anchors.xml.
69
70 -s path
71 The pathname to the root-anchors.p7s file on the server. (forms
72 URL with -u). The default is /root-anchors/root-anchors.p7s.
73 This file has to be a PKCS7 signature over the xml file, using
74 the pem file (-c) as trust anchor.
75
76 -n name
77 The emailAddress for the Subject of the signer's certificate
78 from the p7s signature file. Only signatures from this name are
79 allowed. default is dnssec@iana.org. If you pass "" then the
80 emailAddress is not checked.
81
82 -4 Use IPv4 for domain resolution and contacting the server on
83 https. Default is to use IPv4 and IPv6 where appropriate.
84
85 -6 Use IPv6 for domain resolution and contacting the server on
86 https. Default is to use IPv4 and IPv6 where appropriate.
87
88 -f resolv.conf
89 Use the given resolv.conf file. Not enabled by default, but you
90 could try to pass /etc/resolv.conf on some systems. It contains
91 the IP addresses of the recursive nameservers to use. However,
92 since this tool could be used to bootstrap that very recursive
93 nameserver, it would not be useful (since that server is not up
94 yet, since we are bootstrapping it). It could be useful in a
95 situation where you know an upstream cache is deployed (and run‐
96 ning) and in captive portal situations.
97
98 -r root.hints
99 Use the given root.hints file (same syntax as the BIND and
100 Unbound root hints file) to bootstrap domain resolution. By
101 default a list of builtin root hints is used. Unbound-anchor
102 goes to the network itself for these roots, to resolve the
103 server (-u option) and to check the root DNSKEY records. It
104 does so, because the tool when used for bootstrapping the recur‐
105 sive resolver, cannot use that recursive resolver itself because
106 it is bootstrapping that server.
107
108 -v More verbose. Once prints informational messages, multiple times
109 may enable large debug amounts (such as full certificates or
110 byte-dumps of downloaded files). By default it prints almost
111 nothing. It also prints nothing on errors by default; in that
112 case the original root anchor file is simply left undisturbed,
113 so that a recursive server can start right after it.
114
115 -C unbound.conf
116 Debug option to read unbound.conf into the resolver process
117 used.
118
119 -P port
120 Set the port number to use for the https connection. The
121 default is 443.
122
123 -F Debug option to force update of the root anchor through down‐
124 loading the xml file and verifying it with the certificate. By
125 default it first tries to update by contacting the DNS, which
126 uses much less bandwidth, is much faster (200 msec not 2 sec),
127 and is nicer to the deployed infrastructure. With this option,
128 it still attempts to do so (and may verbosely tell you), but
129 then ignores the result and goes on to use the xml fallback
130 method.
131
132 -h Show the version and commandline option help.
133
135 This tool exits with value 1 if the root anchor was updated using the
136 certificate or if the builtin root-anchor was used. It exits with code
137 0 if no update was necessary, if the update was possible with RFC5011
138 tracking, or if an error occurred.
139
140 You can check the exit value in this manner:
141 unbound-anchor -a "root.key" || logger "Please check root.key"
142 Or something more suitable for your operational environment.
143
145 The root keys and update certificate included in this tool are provided
146 for convenience and under the terms of our license (see the LICENSE
147 file in the source distribution or http://unbound.nlnet‐
148 labs.nl/svn/trunk/LICENSE) and might be stale or not suitable to your
149 purpose.
150
151 By running "unbound-anchor -l" the keys and certificate that are con‐
152 figured in the code are printed for your convenience.
153
154 The build-in configuration can be overridden by providing a root-cert
155 file and a rootkey file.
156
158 /var/lib/unbound/root.key
159 The root anchor file, updated with 5011 tracking, and read and
160 written to. The file is created if it does not exist.
161
162 /etc/unbound/icannbundle.pem
163 The trusted self-signed certificate that is used to verify the
164 downloaded DNSSEC root trust anchor. You can update it by
165 fetching it from https://data.iana.org/root-anchors/icannbun‐
166 dle.pem (and validate it). If the file does not exist or is
167 empty, a builtin version is used.
168
169 https://data.iana.org/root-anchors/root-anchors.xml
170 Source for the root key information.
171
172 https://data.iana.org/root-anchors/root-anchors.p7s
173 Signature on the root key information.
174
176 unbound.conf(5), unbound(8).
177
178
179
180NLnet Labs Sep 18, 2017 unbound-anchor(8)