]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/unbound/doc/unbound-anchor.8
Fix multiple vulnerabilities in unbound.
[FreeBSD/FreeBSD.git] / contrib / unbound / doc / unbound-anchor.8
1 .TH "unbound-anchor" "8" "Jun 17, 2019" "NLnet Labs" "unbound 1.9.2"
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 "/var/unbound/root.key"
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: "/var/unbound/root.key"
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 /var/unbound/root.key.
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 /var/unbound/icannbundle.pem.
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 \-x \fIpath
73 The pathname to the root\-anchors.xml file on the server. (forms URL with \-u).
74 The default is /root\-anchors/root\-anchors.xml.
75 .TP
76 .B \-s \fIpath
77 The pathname to the root\-anchors.p7s file on the server. (forms URL with \-u).
78 The default is /root\-anchors/root\-anchors.p7s.  This file has to be a PKCS7
79 signature over the xml file, using the pem file (\-c) as trust anchor.
80 .TP
81 .B \-n \fIname
82 The emailAddress for the Subject of the signer's certificate from the p7s
83 signature file.  Only signatures from this name are allowed.  default is
84 dnssec@iana.org.  If you pass "" then the emailAddress is not checked.
85 .TP
86 .B \-4
87 Use IPv4 for domain resolution and contacting the server on https.  Default is
88 to use IPv4 and IPv6 where appropriate.
89 .TP
90 .B \-6
91 Use IPv6 for domain resolution and contacting the server on https.  Default is
92 to use IPv4 and IPv6 where appropriate.
93 .TP
94 .B \-f \fIresolv.conf
95 Use the given resolv.conf file.  Not enabled by default, but you could try to
96 pass /etc/resolv.conf on some systems.  It contains the IP addresses of the
97 recursive nameservers to use.  However, since this tool could be used to
98 bootstrap that very recursive nameserver, it would not be useful (since
99 that server is not up yet, since we are bootstrapping it).  It could be
100 useful in a situation where you know an upstream cache is deployed (and
101 running) and in captive portal situations.
102 .TP
103 .B \-r \fIroot.hints
104 Use the given root.hints file (same syntax as the BIND and Unbound root hints
105 file) to bootstrap domain resolution.  By default a list of builtin root
106 hints is used.  Unbound\-anchor goes to the network itself for these roots,
107 to resolve the server (\-u option) and to check the root DNSKEY records.
108 It does so, because the tool when used for bootstrapping the recursive
109 resolver, cannot use that recursive resolver itself because it is bootstrapping
110 that server.
111 .TP
112 .B \-R
113 Allow fallback from \-f resolv.conf file to direct root servers query.
114 It allows you to prefer local resolvers, but fallback automatically
115 to direct root query if they do not respond or do not support DNSSEC.
116 .TP
117 .B \-v
118 More verbose. Once prints informational messages, multiple times may enable
119 large debug amounts (such as full certificates or byte\-dumps of downloaded
120 files).  By default it prints almost nothing.  It also prints nothing on
121 errors by default; in that case the original root anchor file is simply
122 left undisturbed, so that a recursive server can start right after it.
123 .TP
124 .B \-C \fIunbound.conf
125 Debug option to read unbound.conf into the resolver process used.
126 .TP
127 .B \-P \fIport
128 Set the port number to use for the https connection.  The default is 443.
129 .TP
130 .B \-F
131 Debug option to force update of the root anchor through downloading the xml
132 file and verifying it with the certificate.  By default it first tries to
133 update by contacting the DNS, which uses much less bandwidth, is much
134 faster (200 msec not 2 sec), and is nicer to the deployed infrastructure.
135 With this option, it still attempts to do so (and may verbosely tell you),
136 but then ignores the result and goes on to use the xml fallback method.
137 .TP
138 .B \-h
139 Show the version and commandline option help.
140 .SH "EXIT CODE"
141 This tool exits with value 1 if the root anchor was updated using the
142 certificate or if the builtin root-anchor was used.  It exits with code
143 0 if no update was necessary, if the update was possible with RFC5011
144 tracking, or if an error occurred.
145 .P
146 You can check the exit value in this manner:
147 .nf
148         unbound-anchor \-a "root.key" || logger "Please check root.key"
149 .fi
150 Or something more suitable for your operational environment.
151 .SH "TRUST"
152 The root keys and update certificate included in this tool
153 are provided for convenience and under the terms of our
154 license (see the LICENSE file in the source distribution or
155 http://unbound.nlnetlabs.nl/svn/trunk/LICENSE) and might be stale or
156 not suitable to your purpose.
157 .P
158 By running "unbound\-anchor \-l" the  keys and certificate that are
159 configured in the code are printed for your convenience.
160 .P
161 The build\-in configuration can be overridden by providing a root\-cert
162 file and a rootkey file.
163 .SH "FILES"
164 .TP
165 .I /var/unbound/root.key
166 The root anchor file, updated with 5011 tracking, and read and written to.
167 The file is created if it does not exist.
168 .TP
169 .I /var/unbound/icannbundle.pem
170 The trusted self\-signed certificate that is used to verify the downloaded
171 DNSSEC root trust anchor.  You can update it by fetching it from
172 https://data.iana.org/root\-anchors/icannbundle.pem (and validate it).
173 If the file does not exist or is empty, a builtin version is used.
174 .TP
175 .I https://data.iana.org/root\-anchors/root\-anchors.xml
176 Source for the root key information.
177 .TP
178 .I https://data.iana.org/root\-anchors/root\-anchors.p7s
179 Signature on the root key information.
180 .SH "SEE ALSO"
181 \fIunbound.conf\fR(5), 
182 \fIunbound\fR(8).