idnits 2.17.00 (12 Aug 2021) /tmp/idnits12146/draft-ietf-dnsop-root-loopback-01.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- == There are 17 instances of lines with non-RFC6890-compliant IPv4 addresses in the document. If these are example addresses, they should be changed. == There are 2 instances of lines with non-RFC3849-compliant IPv6 addresses in the document. If these are example addresses, they should be changed. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (January 11, 2015) is 2687 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Informational ---------------------------------------------------------------------------- No issues found here. Summary: 0 errors (**), 0 flaws (~~), 3 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group W. Kumari 3 Internet-Draft Google 4 Intended status: Informational P. Hoffman 5 Expires: July 15, 2015 VPN Consortium 6 January 11, 2015 8 Decreasing Access Time to Root Servers by Running One on Loopback 9 draft-ietf-dnsop-root-loopback-01 11 Abstract 13 Some DNS recursive resolvers have longer-than-desired round trip 14 times to the closest DNS root server. Some DNS recursive resolver 15 operators want to prevent snooping of requests sent to DNS root 16 servers by third parties. Such resolvers can greatly decrease the 17 round trip time and prevent observation of requests by running a copy 18 of the full root zone on a loopback address (such as 127.0.0.1). 19 This document shows how to start and maintain such a copy of the root 20 zone that does not pose a threat to other users of the DNS, at the 21 cost of adding some operational fragility for the operator. 23 Status of This Memo 25 This Internet-Draft is submitted in full conformance with the 26 provisions of BCP 78 and BCP 79. 28 Internet-Drafts are working documents of the Internet Engineering 29 Task Force (IETF). Note that other groups may also distribute 30 working documents as Internet-Drafts. The list of current Internet- 31 Drafts is at http://datatracker.ietf.org/drafts/current/. 33 Internet-Drafts are draft documents valid for a maximum of six months 34 and may be updated, replaced, or obsoleted by other documents at any 35 time. It is inappropriate to use Internet-Drafts as reference 36 material or to cite them other than as "work in progress." 38 This Internet-Draft will expire on July 15, 2015. 40 Copyright Notice 42 Copyright (c) 2015 IETF Trust and the persons identified as the 43 document authors. All rights reserved. 45 This document is subject to BCP 78 and the IETF Trust's Legal 46 Provisions Relating to IETF Documents 47 (http://trustee.ietf.org/license-info) in effect on the date of 48 publication of this document. Please review these documents 49 carefully, as they describe your rights and restrictions with respect 50 to this document. Code Components extracted from this document must 51 include Simplified BSD License text as described in Section 4.e of 52 the Trust Legal Provisions and are provided without warranty as 53 described in the Simplified BSD License. 55 Table of Contents 57 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 58 1.1. Requirements Notation . . . . . . . . . . . . . . . . . . 3 59 2. Requirements . . . . . . . . . . . . . . . . . . . . . . . . 4 60 3. Operation of the Root Zone on the Loopback Address . . . . . 4 61 4. Using the Root Zone Server on the Loopback Address . . . . . 5 62 5. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5 63 6. Security Considerations . . . . . . . . . . . . . . . . . . . 5 64 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 5 65 8. References . . . . . . . . . . . . . . . . . . . . . . . . . 6 66 8.1. Normative References . . . . . . . . . . . . . . . . . . 6 67 8.2. Informative References . . . . . . . . . . . . . . . . . 6 68 Appendix A. Current Sources of the Root Zone . . . . . . . . . . 6 69 Appendix B. Example Configurations of Common Implementations . . 7 70 B.1. Example Configuration: BIND 9.9 . . . . . . . . . . . . . 7 71 B.2. Example Configuration: Unbound 1.4 and NSD 4 . . . . . . 8 72 B.3. Example Configuration: Microsoft Windows Server 2012 . . 9 73 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 10 75 1. Introduction 77 DNS recursive resolvers have to provide answers to all queries from 78 their customers, even those which are for domain names that do not 79 exist. For each queried name that has a top level domain (TLD) that 80 is not in the recursive resolver's cache, the resolver must send a 81 query to a root server to get the information for that TLD, or to 82 find out that the TLD does not exist. Typically, the vast majority 83 of queries going to the root are for names that do not exist in the 84 root zone, and the negative answers are cached for a much shorter 85 period of time. A slow path between the recursive resolver and the 86 closest root server has a negative effect on the resolver's 87 customers. 89 Recursive resolvers currently send queries for all TLDs that are not 90 in their caches to root servers, even though most of those queries 91 get answers that are referrals to other servers. Malicious third 92 parties might be able to observe that traffic on the network between 93 the recursive resolver and one or more of the DNS roots. 95 This document describes a method for the operator of a recursive 96 resolver to greatly speed these queries and to hide them from 97 outsiders. The basic idea is to create an up-to-date root zone 98 server on a loopback address on the same host as the recursive 99 server, and use that server when the recursive resolver looks up root 100 information. The recursive resolver validates all responses from the 101 root server on the loopback address, just as it would all responses 102 from a remote root server. 104 The primary goals of this design is to provide faster negative 105 responses to stub resolver queries that contain junk queries, and to 106 prevent queries and responses from being visible on the network. 107 This design will probably have little effect on getting faster 108 positive responses to stub resolver for good queries on TLDs, because 109 the data for those zones is usually long-lived and already in the 110 cache of the recursive resolver; thus, getting faster positive 111 responses is a non-goal of this design. 113 This design explicitly only allows the new root zone server to be run 114 on a loopback address, in order to prevent the server from serving 115 authoritative answers to any system other than the recursive 116 resolver. [[ Other people have said that they might propose a 117 similar design that does not use the loopback, but instead uses a new 118 root zone server that only responds to queries from a very limited 119 number of addresses. ]] 121 It is important to note that this design is being described here is 122 not considered a "best practice". In fact, many people feel that it 123 is an excessively risky practice because it introduces a new 124 operational piece to local DNS operations where there was not one 125 before. The advantages listed above do not come free: if this new 126 system does not work correctly, users can get bad data, or the entire 127 recursive resolution system might fail in ways that are hard to 128 diagnose. 130 This design requires the addition of authoritative name server 131 software running on the same machine as the recursive resolver. 132 Thus, recursive resolver software such as BIND will not need to add 133 much new functionality, but recursive resolver software such as 134 Unbound will need to be able to talk to an authoritative server (such 135 as NSD) running on the same host. 137 1.1. Requirements Notation 139 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 140 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 141 document are to be interpreted as described in [RFC2119]. 143 2. Requirements 145 In order to implement the mechanism described in this document: 147 o The system MUST be able to validate a zone with DNSSEC. 149 o The system MUST have an up-to-date copy of the DNS root key. 151 o The system MUST be able to retrieve a copy of the entire root zone 152 (including all DNSSEC-related records). 154 o The system MUST be able to run an authoritative server on one of 155 the IPv4 loopback addresses (that is, an address in the range 156 127/8). 158 A corollary of the above list is that authoritative data in the root 159 zone used on the local authoritative server MUST be identical to the 160 same data in the root zone for the DNS. It is possible to change the 161 unsigned data (the glue records) in the copy of the root zone, but 162 such changes could cause problems for the recursive server that 163 accesses the local root zone, and therefore any changes to the glue 164 records SHOULD NOT be made. 166 3. Operation of the Root Zone on the Loopback Address 168 The operation of an authoritative server for the root in the system 169 described here can be done separately from the operation of the 170 recursive resolver. 172 The steps to set up the root zone are: 174 1. Retrieve a copy of the root zone. (See Appendix A for some 175 current locations of sources.) 177 2. Start the authoritative server with the root zone on a loopback 178 address that is not in use. This would typically be 127.0.0.1, 179 but if that address is in use, any address in 127/8 is 180 acceptable. 182 The contents of the root zone MUST be refreshed using the timers from 183 the SOA record in root zone, as described in [RFC1035]. If the 184 contents of the zone cannot be refreshed before the expire time, the 185 server MUST return a SERVFAIL error response for all queries until 186 the zone can be successfully be set up again. 188 In the event that refreshing the contents of the root zone fails, the 189 results can be disastrous. For example, sometimes all the NS records 190 for a TLD are changed in a short period of time; if the local root 191 zone refreshing is broken during that time, the recursive resolver 192 will have bad data for the entire TLD zone. 194 An administrator using the procedure in this document SHOULD have an 195 automated method to check that the contents of the local root zone 196 are being refreshed. One way to do this is to have a separate 197 process that periodically checks the SOA of the root zone from the 198 local root zone and makes sure that they are changing. At the time 199 that this document is published, the SOA for the root zone is the 200 digital representation of the current date with a two-digit counter 201 appended, and the SOA is changed every day even if the contents of 202 the root zone are unchanged. For example, the SOA of the root zone 203 on January 2, 2015 was 2015010201. A process can use this fact to 204 create a check for the contents of the local root zone (using a 205 program not specified in this document). 207 4. Using the Root Zone Server on the Loopback Address 209 A recursive resolver that wants to use a root zone server operating 210 as described in Section 3 simply specifies the local address as the 211 place to look when it is looking for information from the root. All 212 responses from the root server must be validated using DNSSEC. 214 Note that using this configuration will cause the recursive resolver 215 to fail if the local root zone server fails. See Appendix B for more 216 discussion of this for specific software. 218 To test the proper operation of the recursive resolver with the local 219 root server, use a DNS client to send a query for the SOA of the root 220 to the recursive server. Make sure the response that comes back has 221 the AA bit in the message header set to 0. 223 5. IANA Considerations 225 This document requires no action from the IANA. 227 6. Security Considerations 229 A system that does not follow the DNSSEC-related requirements given 230 in Section 2 can be fooled into giving bad responses in the same way 231 as any recursive resolver that does not do DNSSEC validation on 232 responses from a remote root server. 234 7. Acknowledgements 236 The editors fully acknowledge that this is not a new concept, and 237 that we have chatted with many people about this. In fact, this 238 concept may already have been implemented without the knowledge of 239 the authors. For example, Bill Manning described a similar solution 240 but to a very different problem (intermittent connectivity, instead 241 of constant but slow connectivity) in his doctoral dissertation in 242 2013 [Manning2013]. 244 Evan Hunt contributed greatly to the logic in the requirements. 245 Other significant contributors include Wouter Wijngaards, Tony Hain, 246 Doug Barton, and Greg Lindsay. The authors also received many off- 247 line comments about making the document clear that this was just a 248 description of a way to operate a root zone on localhost, and not a 249 recommendation to do so. 251 8. References 253 8.1. Normative References 255 [RFC1035] Mockapetris, P., "Domain names - implementation and 256 specification", STD 13, RFC 1035, November 1987. 258 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 259 Requirement Levels", BCP 14, RFC 2119, March 1997. 261 8.2. Informative References 263 [Manning2013] 264 Maning, W., "Client Based Naming", 2013, 265 . 267 Appendix A. Current Sources of the Root Zone 269 The root zone can be retrieved from anywhere as long as it comes with 270 all the DNSSEC records needed for validation. Currently, there are 271 three sources of the root zone supported by ICANN: 273 o From ICANN via FTP at ftp://rs.internic.net/domain/root.zone 275 o From ICANN via HTTP at http://www.internic.net/domain/root.zone 277 o From ICANN by AXFR from DNS servers at xfr.lax.dns.icann.org and 278 xfr.cjr.dns.icann.org 280 Currently, the root can also be retrieved by zone transfer (AXFR) 281 from the following root server operators: 283 o b.root-servers.net 285 o c.root-servers.net 286 o f.root-servers.net 288 o g.root-servers.net 290 o k.root-servers.net 292 Appendix B. Example Configurations of Common Implementations 294 This section shows fragments of configurations for some popular 295 recursive server software that is believed to correctly implement the 296 requirements given in this document. 298 The IPv4 and IPv6 addresses in this section were checked recently by 299 testing for AXFR over TCP from each address for the known single- 300 letter names in the root-servers.net zone. 302 The examples here use a loopback address of 127.12.12.12, but typical 303 installations will use 127.0.0.1. The different address is used in 304 order to emphasize that the root server does not need to be on the 305 device at "localhost". 307 [[ We were told that PowerDNS will soon be able to be configured to 308 meet the requirements in this document. We'll add that configuration 309 when/if someone contributes it. ]] 311 B.1. Example Configuration: BIND 9.9 313 BIND acts both as a recursive resolver and an authoritative server. 314 Because of this, there is "fate sharing" between the two servers in 315 the following configuration. That is, if the root server dies, it is 316 likely that all of BIND is dead. 318 Using this configuration, queries for information in the root zone 319 are returned with the AA bit not set. 321 When slaving a zone, BIND will treat zone data differently if it is 322 slaved into a separate view (or a separate instance of the software) 323 versus slaving the zone into the same view or instance that is also 324 performing the recursion. 326 Validation: When using separate views or separate instances, the DS 327 records in the slaved zone will be validated as the zone data is 328 accessed by the recursive server. When using the same view, this 329 validation does not occur for the slaved zone. 331 Caching: When using separate views or instances, the recursive 332 server will cache all of the queries for the slaved zone, just as 333 it would using the traditional root hints method. Thus, as the 334 zone in the other view or instance is refreshed or updated, 335 changed information will not appear in the recursive server until 336 the TTL of the old record times out. Currently the TTL for DS and 337 delegation NS records is two days. When using the same view, all 338 zone data in the recursive server will be updated as soon as it 339 receives its copy of the zone. 341 view root { 342 match-destinations { 127.12.12.12; }; 343 zone "." { 344 type slave; 345 file "rootzone.db"; 346 notify no; 347 masters { 348 192.228.79.201; # b.root-servers.net 349 192.33.4.12; # c.root-servers.net 350 192.5.5.241; # f.root-servers.net 351 192.112.36.4; # g.root-servers.net 352 193.0.14.129; # k.root-servers.net 353 2001:500:84::b; # b.root-servers.net 354 2001:500:2f::f; # f.root-servers.net 355 2001:7fd::1; # k.root-servers.net 356 }; 357 }; 358 }; 360 view recursive { 361 dnssec-validation auto; 362 allow-recursion { any; }; 363 recursion yes; 364 zone "." { 365 type static-stub; 366 server-addresses { 127.12.12.12; }; 367 }; 368 }; 370 B.2. Example Configuration: Unbound 1.4 and NSD 4 372 Unbound and NSD are separate software packages. Because of this, 373 there is no "fate sharing" between the two servers in the following 374 configurations. That is, if the root server instance (NSD) dies, the 375 recursive resolver instance (Unbound) will probably keep running, but 376 will not be able to resolve any queries for the root zone. 377 Therefore, the administrator of this configuration might want to 378 carefully monitor the NSD instance and restart it immediately if it 379 dies. 381 Using this configuration, queries for information in the root zone 382 are returned with the AA bit not set. 384 # Configuration for Unbound 385 server: 386 do-not-query-localhost: no 387 stub-zone: 388 name: "." 389 stub-prime: no 390 stub-addr: 127.12.12.12 392 # Configuration for NSD 393 server: 394 ip-address: 127.12.12.12 395 zone: 396 name: "." 397 request-xfr: 192.228.79.201 NOKEY # b.root-servers.net 398 request-xfr: 192.33.4.12 NOKEY # c.root-servers.net 399 request-xfr: 192.5.5.241 NOKEY # f.root-servers.net 400 request-xfr: 192.112.36.4 NOKEY # g.root-servers.net 401 request-xfr: 193.0.14.129 NOKEY # k.root-servers.net 402 request-xfr: 2001:500:84::b NOKEY # b.root-servers.net 403 request-xfr: 2001:500:2f::f NOKEY # f.root-servers.net 404 request-xfr: 2001:7fd::1 NOKEY # k.root-servers.net 406 B.3. Example Configuration: Microsoft Windows Server 2012 408 Windows Server 2012 contains a DNS server in the "DNS Manager" 409 component. When activated, that component acts as a recursive 410 server. DNS Manager can also act as an authoritative server. 412 Using this configuration, queries for information in the root zone 413 are returned with the AA bit set. 415 The steps to configure DNS Manager to implement the requirements in 416 this document are: 418 1. Launch the DNS Manager GUI. This can be done from the command 419 line ("dnsmgmt.msc") or from the Service Manager (the "DNS" 420 command in the "Tools" menu). 422 2. In the hierarchy under the server on which the service is 423 running, right-click on the "Forward Lookup Zones", and select 424 "New Zone". This brings up a succession of dialog boxes. 426 3. In the "Zone Type" dialog box, select "Secondary zone". 428 4. In the "Zone Name" dialog box, enter ".". 430 5. In the "Master DNS Servers" dialog box, enter "b.root- 431 servers.net". The system validates that it can do a zone 432 transfer from that server. (After this configuration is 433 completed, DNS Manager will attempt to transfer from all of the 434 root zone servers.) 436 6. In the "Completing the New Zone Wizard" dialog box, click 437 "Finish". 439 7. Verify that the DNS Manager is acting as a recursive resolver. 440 Right-click on the server name in the hierarch, choosing the 441 "Advanced" tab in the dialog box. See that "Disable recursion 442 (also disables forwarders)" is not selected, and that "Enable 443 DNSSEC validation for remote responses" is selected. 445 Authors' Addresses 447 Warren Kumari 448 Google 450 Email: Warren@kumari.net 452 Paul Hoffman 453 VPN Consortium 455 Email: paul.hoffman@vpnc.org