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