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