1*b2efd602SCy Schubert.. 2*b2efd602SCy Schubert WHEN EDITING MAKE SURE EACH SENTENCE STARTS ON A NEW LINE 3*b2efd602SCy Schubert 4*b2efd602SCy Schubert.. 5*b2efd602SCy Schubert IT HELPS RENDERERS TO DO THE RIGHT THING WRT SPACE 6*b2efd602SCy Schubert 7*b2efd602SCy Schubert.. 8*b2efd602SCy Schubert IT HELPS PEOPLE DIFFING THE CHANGES 9*b2efd602SCy Schubert 10*b2efd602SCy Schubert.. 11*b2efd602SCy Schubert WHEN EDITING MAKE SURE EACH SENTENCE STARTS ON A NEW LINE 12*b2efd602SCy Schubert 13*b2efd602SCy Schubert.. 14*b2efd602SCy Schubert IT HELPS RENDERERS TO DO THE RIGHT THING WRT SPACE 15*b2efd602SCy Schubert 16*b2efd602SCy Schubert.. 17*b2efd602SCy Schubert IT HELPS PEOPLE DIFFING THE CHANGES 18*b2efd602SCy Schubert 19*b2efd602SCy Schubert.. 20*b2efd602SCy Schubert WHEN EDITING MAKE SURE EACH SENTENCE STARTS ON A NEW LINE 21*b2efd602SCy Schubert 22*b2efd602SCy Schubert.. 23*b2efd602SCy Schubert IT HELPS RENDERERS TO DO THE RIGHT THING WRT SPACE 24*b2efd602SCy Schubert 25*b2efd602SCy Schubert.. 26*b2efd602SCy Schubert IT HELPS PEOPLE DIFFING THE CHANGES 27*b2efd602SCy Schubert 28*b2efd602SCy Schubert.. 29*b2efd602SCy Schubert WHEN EDITING MAKE SURE EACH SENTENCE STARTS ON A NEW LINE 30*b2efd602SCy Schubert 31*b2efd602SCy Schubert.. 32*b2efd602SCy Schubert IT HELPS RENDERERS TO DO THE RIGHT THING WRT SPACE 33*b2efd602SCy Schubert 34*b2efd602SCy Schubert.. 35*b2efd602SCy Schubert IT HELPS PEOPLE DIFFING THE CHANGES 36*b2efd602SCy Schubert 37*b2efd602SCy Schubert.. program:: unbound-anchor 38*b2efd602SCy Schubert 39*b2efd602SCy Schubertunbound-anchor(8) 40*b2efd602SCy Schubert================= 41*b2efd602SCy Schubert 42*b2efd602SCy SchubertSynopsis 43*b2efd602SCy Schubert-------- 44*b2efd602SCy Schubert 45*b2efd602SCy Schubert**unbound-anchor** [``opts``] 46*b2efd602SCy Schubert 47*b2efd602SCy SchubertDescription 48*b2efd602SCy Schubert----------- 49*b2efd602SCy Schubert 50*b2efd602SCy Schubert``unbound-anchor`` performs setup or update of the root trust anchor for DNSSEC 51*b2efd602SCy Schubertvalidation. 52*b2efd602SCy SchubertThe program fetches the trust anchor with the method from :rfc:`7958` when 53*b2efd602SCy Schubertregular :rfc:`5011` update fails to bring it up to date. 54*b2efd602SCy SchubertIt can be run (as root) from the commandline, or run as part of startup 55*b2efd602SCy Schubertscripts. 56*b2efd602SCy SchubertBefore you start the :doc:`unbound(8)</manpages/unbound>` DNS server. 57*b2efd602SCy Schubert 58*b2efd602SCy SchubertSuggested usage: 59*b2efd602SCy Schubert 60*b2efd602SCy Schubert.. code-block:: text 61*b2efd602SCy Schubert 62*b2efd602SCy Schubert # in the init scripts. 63*b2efd602SCy Schubert # provide or update the root anchor (if necessary) 64*b2efd602SCy Schubert unbound-anchor -a "@UNBOUND_ROOTKEY_FILE@" 65*b2efd602SCy Schubert # Please note usage of this root anchor is at your own risk 66*b2efd602SCy Schubert # and under the terms of our LICENSE (see source). 67*b2efd602SCy Schubert # 68*b2efd602SCy Schubert # start validating resolver 69*b2efd602SCy Schubert # the unbound.conf contains: 70*b2efd602SCy Schubert # auto-trust-anchor-file: "@UNBOUND_ROOTKEY_FILE@" 71*b2efd602SCy Schubert unbound -c unbound.conf 72*b2efd602SCy Schubert 73*b2efd602SCy SchubertThis tool provides builtin default contents for the root anchor and root update 74*b2efd602SCy Schubertcertificate files. 75*b2efd602SCy Schubert 76*b2efd602SCy SchubertIt tests if the root anchor file works, and if not, and an update is possible, 77*b2efd602SCy Schubertattempts to update the root anchor using the root update certificate. 78*b2efd602SCy SchubertIt performs a https fetch of 79*b2efd602SCy Schubert`root-anchors.xml <http://data.iana.org/root-anchors/root-anchors.xml>`__ 80*b2efd602SCy Schubertand checks the results (:rfc:`7958`); if all checks are successful, it updates 81*b2efd602SCy Schubertthe root anchor file. 82*b2efd602SCy SchubertOtherwise the root anchor file is unchanged. 83*b2efd602SCy SchubertIt performs :rfc:`5011` tracking if the DNSSEC information available via the 84*b2efd602SCy SchubertDNS makes that possible. 85*b2efd602SCy Schubert 86*b2efd602SCy SchubertIt does not perform an update if the certificate is expired, if the network is 87*b2efd602SCy Schubertdown or other errors occur. 88*b2efd602SCy Schubert 89*b2efd602SCy SchubertThe available options are: 90*b2efd602SCy Schubert 91*b2efd602SCy Schubert.. option:: -a <file> 92*b2efd602SCy Schubert 93*b2efd602SCy Schubert The root anchor key file, that is read in and written out. 94*b2efd602SCy Schubert Default is :file:`@UNBOUND_ROOTKEY_FILE@`. 95*b2efd602SCy Schubert If the file does not exist, or is empty, a builtin root key is written 96*b2efd602SCy Schubert to it. 97*b2efd602SCy Schubert 98*b2efd602SCy Schubert.. option:: -c <file> 99*b2efd602SCy Schubert 100*b2efd602SCy Schubert The root update certificate file, that is read in. 101*b2efd602SCy Schubert Default is :file:`@UNBOUND_ROOTCERT_FILE@`. 102*b2efd602SCy Schubert If the file does not exist, or is empty, a builtin certificate is used. 103*b2efd602SCy Schubert 104*b2efd602SCy Schubert.. option:: -l 105*b2efd602SCy Schubert 106*b2efd602SCy Schubert List the builtin root key and builtin root update certificate on stdout. 107*b2efd602SCy Schubert 108*b2efd602SCy Schubert.. option:: -u <name> 109*b2efd602SCy Schubert 110*b2efd602SCy Schubert The server name, it connects to ``https://name``. 111*b2efd602SCy Schubert Specify without ``https://`` prefix. 112*b2efd602SCy Schubert The default is ``"data.iana.org"``. 113*b2efd602SCy Schubert It connects to the port specified with :option:`-P`. 114*b2efd602SCy Schubert You can pass an IPv4 address or IPv6 address (no brackets) if you want. 115*b2efd602SCy Schubert 116*b2efd602SCy Schubert.. option:: -S 117*b2efd602SCy Schubert 118*b2efd602SCy Schubert Do not use SNI for the HTTPS connection. 119*b2efd602SCy Schubert Default is to use SNI. 120*b2efd602SCy Schubert 121*b2efd602SCy Schubert.. option:: -b <address> 122*b2efd602SCy Schubert 123*b2efd602SCy Schubert The source address to bind to for domain resolution and contacting the 124*b2efd602SCy Schubert server on https. 125*b2efd602SCy Schubert May be either an IPv4 address or IPv6 address (no brackets). 126*b2efd602SCy Schubert 127*b2efd602SCy Schubert.. option:: -x <path> 128*b2efd602SCy Schubert 129*b2efd602SCy Schubert The pathname to the root-anchors.xml file on the server. 130*b2efd602SCy Schubert (forms URL with :option:`-u`). 131*b2efd602SCy Schubert The default is :file:`/root-anchors/root-anchors.xml`. 132*b2efd602SCy Schubert 133*b2efd602SCy Schubert.. option:: -s <path> 134*b2efd602SCy Schubert 135*b2efd602SCy Schubert The pathname to the root-anchors.p7s file on the server. 136*b2efd602SCy Schubert (forms URL with :option:`-u`). 137*b2efd602SCy Schubert The default is :file:`/root-anchors/root-anchors.p7s`. 138*b2efd602SCy Schubert This file has to be a PKCS7 signature over the xml file, using the pem 139*b2efd602SCy Schubert file (:option:`-c`) as trust anchor. 140*b2efd602SCy Schubert 141*b2efd602SCy Schubert.. option:: -n <name> 142*b2efd602SCy Schubert 143*b2efd602SCy Schubert The emailAddress for the Subject of the signer's certificate from the 144*b2efd602SCy Schubert p7s signature file. 145*b2efd602SCy Schubert Only signatures from this name are allowed. 146*b2efd602SCy Schubert The default is ``dnssec@iana.org``. 147*b2efd602SCy Schubert If you pass ``""`` then the emailAddress is not checked. 148*b2efd602SCy Schubert 149*b2efd602SCy Schubert.. option:: -4 150*b2efd602SCy Schubert 151*b2efd602SCy Schubert Use IPv4 for domain resolution and contacting the server on 152*b2efd602SCy Schubert https. 153*b2efd602SCy Schubert Default is to use IPv4 and IPv6 where appropriate. 154*b2efd602SCy Schubert 155*b2efd602SCy Schubert.. option:: -6 156*b2efd602SCy Schubert 157*b2efd602SCy Schubert Use IPv6 for domain resolution and contacting the server on https. 158*b2efd602SCy Schubert Default is to use IPv4 and IPv6 where appropriate. 159*b2efd602SCy Schubert 160*b2efd602SCy Schubert.. option:: -f <resolv.conf> 161*b2efd602SCy Schubert 162*b2efd602SCy Schubert Use the given resolv.conf file. 163*b2efd602SCy Schubert Not enabled by default, but you could try to pass 164*b2efd602SCy Schubert :file:`/etc/resolv.conf` on some systems. 165*b2efd602SCy Schubert It contains the IP addresses of the recursive nameservers to use. 166*b2efd602SCy Schubert However, since this tool could be used to bootstrap that very recursive 167*b2efd602SCy Schubert nameserver, it would not be useful (since that server is not up yet, 168*b2efd602SCy Schubert since we are bootstrapping it). 169*b2efd602SCy Schubert It could be useful in a situation where you know an upstream cache is 170*b2efd602SCy Schubert deployed (and running) and in captive portal situations. 171*b2efd602SCy Schubert 172*b2efd602SCy Schubert.. option:: -r <root.hints> 173*b2efd602SCy Schubert 174*b2efd602SCy Schubert Use the given root.hints file (same syntax as the BIND and Unbound root 175*b2efd602SCy Schubert hints file) to bootstrap domain resolution. 176*b2efd602SCy Schubert By default a list of builtin root hints is used. 177*b2efd602SCy Schubert unbound-anchor goes to the network itself for these roots, to resolve 178*b2efd602SCy Schubert the server (:option:`-u` option) and to check the root DNSKEY records. 179*b2efd602SCy Schubert It does so, because the tool when used for bootstrapping the recursive 180*b2efd602SCy Schubert resolver, cannot use that recursive resolver itself because it is 181*b2efd602SCy Schubert bootstrapping that server. 182*b2efd602SCy Schubert 183*b2efd602SCy Schubert.. option:: -R 184*b2efd602SCy Schubert 185*b2efd602SCy Schubert Allow fallback from :option:`-f` ``<resolv.conf>`` file to direct root 186*b2efd602SCy Schubert servers query. 187*b2efd602SCy Schubert It allows you to prefer local resolvers, but fallback automatically to 188*b2efd602SCy Schubert direct root query if they do not respond or do not support DNSSEC. 189*b2efd602SCy Schubert 190*b2efd602SCy Schubert.. option:: -v 191*b2efd602SCy Schubert 192*b2efd602SCy Schubert More verbose. 193*b2efd602SCy Schubert Once prints informational messages, multiple times may enable large 194*b2efd602SCy Schubert debug amounts (such as full certificates or byte-dumps of downloaded 195*b2efd602SCy Schubert files). 196*b2efd602SCy Schubert By default it prints almost nothing. 197*b2efd602SCy Schubert It also prints nothing on errors by default; in that case the original 198*b2efd602SCy Schubert root anchor file is simply left undisturbed, so that a recursive server 199*b2efd602SCy Schubert can start right after it. 200*b2efd602SCy Schubert 201*b2efd602SCy Schubert.. option:: -C <unbound.conf> 202*b2efd602SCy Schubert 203*b2efd602SCy Schubert Debug option to read :file:`<unbound.conf>` into the resolver process 204*b2efd602SCy Schubert used. 205*b2efd602SCy Schubert 206*b2efd602SCy Schubert.. option:: -P <port> 207*b2efd602SCy Schubert 208*b2efd602SCy Schubert Set the port number to use for the https connection. 209*b2efd602SCy Schubert The default is 443. 210*b2efd602SCy Schubert 211*b2efd602SCy Schubert.. option:: -F 212*b2efd602SCy Schubert 213*b2efd602SCy Schubert Debug option to force update of the root anchor through downloading the 214*b2efd602SCy Schubert xml file and verifying it with the certificate. 215*b2efd602SCy Schubert By default it first tries to update by contacting the DNS, which uses 216*b2efd602SCy Schubert much less bandwidth, is much faster (200 msec not 2 sec), and is nicer 217*b2efd602SCy Schubert to the deployed infrastructure. 218*b2efd602SCy Schubert With this option, it still attempts to do so (and may verbosely tell 219*b2efd602SCy Schubert you), but then ignores the result and goes on to use the xml fallback 220*b2efd602SCy Schubert method. 221*b2efd602SCy Schubert 222*b2efd602SCy Schubert.. option:: -h 223*b2efd602SCy Schubert 224*b2efd602SCy Schubert Show the version and commandline option help. 225*b2efd602SCy Schubert 226*b2efd602SCy SchubertExit Code 227*b2efd602SCy Schubert--------- 228*b2efd602SCy Schubert 229*b2efd602SCy SchubertThis tool exits with value 1 if the root anchor was updated using the 230*b2efd602SCy Schubertcertificate or if the builtin root-anchor was used. 231*b2efd602SCy SchubertIt exits with code 0 if no update was necessary, if the update was possible 232*b2efd602SCy Schubertwith :rfc:`5011` tracking, or if an error occurred. 233*b2efd602SCy Schubert 234*b2efd602SCy SchubertYou can check the exit value in this manner: 235*b2efd602SCy Schubert 236*b2efd602SCy Schubert.. code-block:: text 237*b2efd602SCy Schubert 238*b2efd602SCy Schubert unbound-anchor -a "root.key" || logger "Please check root.key" 239*b2efd602SCy Schubert 240*b2efd602SCy SchubertOr something more suitable for your operational environment. 241*b2efd602SCy Schubert 242*b2efd602SCy SchubertTrust 243*b2efd602SCy Schubert----- 244*b2efd602SCy Schubert 245*b2efd602SCy SchubertThe root keys and update certificate included in this tool are provided for 246*b2efd602SCy Schubertconvenience and under the terms of our license (see the LICENSE file in the 247*b2efd602SCy Schubertsource distribution or https://github.com/NLnetLabs/unbound/blob/master/LICENSE 248*b2efd602SCy Schubertand might be stale or not suitable to your purpose. 249*b2efd602SCy Schubert 250*b2efd602SCy SchubertBy running :option:`unbound-anchor -l` the keys and certificate that are 251*b2efd602SCy Schubertconfigured in the code are printed for your convenience. 252*b2efd602SCy Schubert 253*b2efd602SCy SchubertThe built-in configuration can be overridden by providing a root-cert file and 254*b2efd602SCy Schuberta rootkey file. 255*b2efd602SCy Schubert 256*b2efd602SCy SchubertFiles 257*b2efd602SCy Schubert----- 258*b2efd602SCy Schubert 259*b2efd602SCy Schubert@UNBOUND_ROOTKEY_FILE@ 260*b2efd602SCy Schubert The root anchor file, updated with 5011 tracking, and read and written 261*b2efd602SCy Schubert to. 262*b2efd602SCy Schubert The file is created if it does not exist. 263*b2efd602SCy Schubert 264*b2efd602SCy Schubert@UNBOUND_ROOTCERT_FILE@ 265*b2efd602SCy Schubert The trusted self-signed certificate that is used to verify the 266*b2efd602SCy Schubert downloaded DNSSEC root trust anchor. 267*b2efd602SCy Schubert You can update it by fetching it from 268*b2efd602SCy Schubert https://data.iana.org/root-anchors/icannbundle.pem (and validate it). 269*b2efd602SCy Schubert If the file does not exist or is empty, a builtin version is used. 270*b2efd602SCy Schubert 271*b2efd602SCy Schuberthttps://data.iana.org/root-anchors/root-anchors.xml 272*b2efd602SCy Schubert Source for the root key information. 273*b2efd602SCy Schubert 274*b2efd602SCy Schuberthttps://data.iana.org/root-anchors/root-anchors.p7s 275*b2efd602SCy Schubert Signature on the root key information. 276*b2efd602SCy Schubert 277*b2efd602SCy SchubertSee Also 278*b2efd602SCy Schubert-------- 279*b2efd602SCy Schubert 280*b2efd602SCy Schubert:doc:`unbound.conf(5)</manpages/unbound.conf>`, 281*b2efd602SCy Schubert:doc:`unbound(8)</manpages/unbound>`. 282