idnits 2.17.00 (12 Aug 2021) /tmp/idnits43990/draft-ietf-dnsop-7706bis-03.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 : ---------------------------------------------------------------------------- ** The document seems to lack an IANA Considerations section. (See Section 2.2 of https://www.ietf.org/id-info/checklist for how to handle the case when there are no actions for IANA.) == There are 19 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. -- The draft header indicates that this document updates RFC7706, but the abstract doesn't seem to directly say this. It does mention RFC7706 though, so this could be OK. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (March 8, 2019) is 1170 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- No issues found here. Summary: 1 error (**), 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 Updates: 7706 (if approved) P. Hoffman 5 Intended status: Informational ICANN 6 Expires: September 9, 2019 March 8, 2019 8 Running a Root Server Local to a Resolver 9 draft-ietf-dnsop-7706bis-03 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 the same server, such as on a loopback 19 address. This document shows how to start and maintain such a copy 20 of the root zone that does not pose a threat to other users of the 21 DNS, at the cost of adding some operational fragility for the 22 operator. 24 This draft will update RFC 7706. See Section 1.1 for a list of 25 topics that will be added in the update. 27 [ Ed note: Text inside square brackets ([]) is additional background 28 information, answers to freqently asked questions, general musings, 29 etc. They will be removed before publication.] 31 [ This document is being collaborated on in Github at: 32 https://github.com/wkumari/draft-kh-dnsop-7706bis. The most recent 33 version of the document, open issues, and so on should all be 34 available there. The authors gratefully accept pull requests. ] 36 Status of This Memo 38 This Internet-Draft is submitted in full conformance with the 39 provisions of BCP 78 and BCP 79. 41 Internet-Drafts are working documents of the Internet Engineering 42 Task Force (IETF). Note that other groups may also distribute 43 working documents as Internet-Drafts. The list of current Internet- 44 Drafts is at https://datatracker.ietf.org/drafts/current/. 46 Internet-Drafts are draft documents valid for a maximum of six months 47 and may be updated, replaced, or obsoleted by other documents at any 48 time. It is inappropriate to use Internet-Drafts as reference 49 material or to cite them other than as "work in progress." 51 This Internet-Draft will expire on September 9, 2019. 53 Copyright Notice 55 Copyright (c) 2019 IETF Trust and the persons identified as the 56 document authors. All rights reserved. 58 This document is subject to BCP 78 and the IETF Trust's Legal 59 Provisions Relating to IETF Documents 60 (https://trustee.ietf.org/license-info) in effect on the date of 61 publication of this document. Please review these documents 62 carefully, as they describe your rights and restrictions with respect 63 to this document. Code Components extracted from this document must 64 include Simplified BSD License text as described in Section 4.e of 65 the Trust Legal Provisions and are provided without warranty as 66 described in the Simplified BSD License. 68 Table of Contents 70 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 71 1.1. Updates from RFC 7706 . . . . . . . . . . . . . . . . . . 4 72 1.2. Requirements Notation . . . . . . . . . . . . . . . . . . 5 73 2. Requirements . . . . . . . . . . . . . . . . . . . . . . . . 5 74 3. Operation of the Root Zone on the Local Server . . . . . . . 5 75 4. Using the Root Zone Server on the Same Host . . . . . . . . . 6 76 5. Security Considerations . . . . . . . . . . . . . . . . . . . 7 77 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 7 78 6.1. Normative References . . . . . . . . . . . . . . . . . . 7 79 6.2. Informative References . . . . . . . . . . . . . . . . . 8 80 Appendix A. Current Sources of the Root Zone . . . . . . . . . . 8 81 Appendix B. Example Configurations of Common Implementations . . 9 82 B.1. Example Configuration: BIND 9.12 . . . . . . . . . . . . 9 83 B.2. Example Configuration: Unbound 1.8 . . . . . . . . . . . 10 84 B.3. Example Configuration: BIND 9.14 . . . . . . . . . . . . 11 85 B.4. Example Configuration: Unbound 1.9 . . . . . . . . . . . 11 86 B.5. Example Configuration: Knot Resolver . . . . . . . . . . 12 87 B.6. Example Configuration: Microsoft Windows Server 2012 . . 12 88 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 13 89 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 13 91 1. Introduction 93 DNS recursive resolvers have to provide answers to all queries from 94 their customers, even those for domain names that do not exist. For 95 each queried name that has a top-level domain (TLD) that is not in 96 the recursive resolver's cache, the resolver must send a query to a 97 root server to get the information for that TLD, or to find out that 98 the TLD does not exist. Research shows that the vast majority of 99 queries going to the root are for names that do not exist in the root 100 zone because negative answers are sometimes cached for a much shorter 101 period of time. 103 Many of the queries from recursive resolvers to root servers get 104 answers that are referrals to other servers. Malicious third parties 105 might be able to observe that traffic on the network between the 106 recursive resolver and root servers. 108 The primary goals of this design are to provide more reliable answers 109 for queries to the root zone during network attacks, and to prevent 110 queries and responses from being visible on the network. This design 111 will probably have little effect on getting faster responses to stub 112 resolver for good queries on TLDs, because the TTL for most TLDs is 113 usually long-lived (on the order of a day or two) and is thus usually 114 already in the cache of the recursive resolver; the same is true for 115 the TTL for negative answers from the root servers. (Although the 116 primary goal of the design is for serving the root zone, the method 117 can be used for any zone.) 119 This document describes a method for the operator of a recursive 120 resolver to have a complete root zone locally, and to hide these 121 queries from outsiders. The basic idea is to create an up-to-date 122 root zone server on the same host as the recursive server, and use 123 that server when the recursive resolver looks up root information. 124 The recursive resolver validates all responses from the root server 125 on the same host, just as it would all responses from a remote root 126 server. 128 This design explicitly only allows the new root zone server to be run 129 on the same server as the recursive resolver, in order to prevent the 130 server from serving authoritative answers to any other system. 131 Specifically, the root server on the local system MUST be configured 132 to only answer queries from the resolvers on the same host, and MUST 133 NOT answer queries from any other resolver. 135 At the time that RFC 7706 was published, it was considered 136 controversial: there was not consensus on whether this was a "best 137 practice". In fact, many people felt that it is an excessively risky 138 practice because it introduced a new operational piece to local DNS 139 operations where there was not one before. Since then, the DNS 140 operational community has largely shifted to believing that local 141 serving of the root zone for an individual resolver is a reasonable 142 practice. The advantages listed above do not come free: if this new 143 system does not work correctly, users can get bad data, or the entire 144 recursive resolution system might fail in ways that are hard to 145 diagnose. 147 This design uses authoritative name server software running on the 148 same machine as the recursive resolver. Thus, recursive resolver 149 software such as BIND or modern versions of common open source 150 recursive resolver software do not need to add new functionality, but 151 other recursive resolver software might need to be able to talk to an 152 authoritative server running on the same host. 154 A different approach to solving some of the problems discussed in 155 this document is described in [RFC8198]. 157 1.1. Updates from RFC 7706 159 RFC 7706 explicitly required that the root server instance be run on 160 the loopback interface of the host running the validating resolver. 161 However, RFC 7706 also had examples of how to set up common software 162 that did not use the loopback interface. Thus, this document loosens 163 the restriction on the interface but keeps the requirement that only 164 systems running on that single host be able to query that root server 165 instance. 167 Removed the prohibition on distribution of recursive DNS servers 168 including configurations for this design because some already do, and 169 others have expressed an interest in doing so. 171 Added the idea that a recursive resolver using this design might 172 switch to using the normal (remote) root servers if the local root 173 server fails. 175 Refreshed the list of where one can get copies of the root zone. 177 Added examples of other resolvers and updated the existing examples. 179 [ This section will list all the changes from RFC 7706. For this 180 draft, it is also the list of changes that we will make in future 181 versions of the daft. ] 183 [ Make the use cases explicit. Be clearer that a real use case is 184 folks who are worried that root server unavailabilty due to DDoS 185 against them is a reason some people would use the mechanisms here. 186 ] 188 [ Describe how slaving the root zone from root zone servers does not 189 fully remove the reliance on the root servers being available. ] 191 [ Other new topics might go here. ] 193 1.2. Requirements Notation 195 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 196 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 197 document are to be interpreted as described in [RFC2119]. 199 2. Requirements 201 In order to implement the mechanism described in this document: 203 o The system MUST be able to validate a zone with DNSSEC [RFC4033]. 205 o The system MUST have an up-to-date copy of the key used to sign 206 the DNS root. 208 o The system MUST be able to retrieve a copy of the entire root zone 209 (including all DNSSEC-related records). 211 o The system MUST be able to run an authoritative server for the 212 root zone on the same host. The root server instance MUST only 213 respond to queries from the same host. One way to assure not 214 responding to queries from other hosts is to make the address of 215 the authoritative server one of the loopback addresses (that is, 216 an address in the range 127/8 for IPv4 or ::1 in IPv6). 218 A corollary of the above list is that authoritative data in the root 219 zone used on the local authoritative server MUST be identical to the 220 same data in the root zone for the DNS. It is possible to change the 221 unsigned data (the glue records) in the copy of the root zone, but 222 such changes could cause problems for the recursive server that 223 accesses the local root zone, and therefore any changes to the glue 224 records SHOULD NOT be made. 226 3. Operation of the Root Zone on the Local Server 228 The operation of an authoritative server for the root in the system 229 described here can be done separately from the operation of the 230 recursive resolver, or it might be part of the configuration of the 231 recursive resolver system. 233 The steps to set up the root zone are: 235 1. Retrieve a copy of the root zone. (See Appendix A for some 236 current locations of sources.) 238 2. Start the authoritative server with the root zone on an address 239 on the host that is not in use. For IPv4, this could be 240 127.0.0.1, but if that address is in use, any address in 127/8 is 241 acceptable. For IPv6, this would be ::1. It can also be a 242 publicly-visible address on the host, but only if the 243 authoritative server software allows restricting the addresses 244 that can access the authoritative server, and the software is 245 configured to only allow access from addresses on this single 246 host. 248 The contents of the root zone MUST be refreshed using the timers from 249 the SOA record in the root zone, as described in [RFC1035]. This 250 inherently means that the contents of the local root zone will likely 251 be a little behind those of the global root servers because those 252 servers are updated when triggered by NOTIFY messages. 254 If the contents of the root zone cannot be refreshed before the 255 expire time in the SOA, the local root server MUST return a SERVFAIL 256 error response for all queries sent to it until the zone can be 257 successfully be set up again. Because this would cause a recursive 258 resolver on the same host that is relying on this root server to also 259 fail, a resolver might be configured to immediatly switch to using 260 other (non-local) root servers if the resolver receives a SERVFAIL 261 response from a local root server. 263 In the event that refreshing the contents of the root zone fails, the 264 results can be disastrous. For example, sometimes all the NS records 265 for a TLD are changed in a short period of time (such as 2 days); if 266 the refreshing of the local root zone is broken during that time, the 267 recursive resolver will have bad data for the entire TLD zone. 269 An administrator using the procedure in this document SHOULD have an 270 automated method to check that the contents of the local root zone 271 are being refreshed; this might be part of the resolver software. 272 One way to do this is to have a separate process that periodically 273 checks the SOA of the root zone from the local root zone and makes 274 sure that it is changing. At the time that this document is 275 published, the SOA for the root zone is the digital representation of 276 the current date with a two-digit counter appended, and the SOA is 277 changed every day even if the contents of the root zone are 278 unchanged. For example, the SOA of the root zone on January 2, 2018 279 was 2018010201. A process can use this fact to create a check for 280 the contents of the local root zone (using a program not specified in 281 this document). 283 4. Using the Root Zone Server on the Same Host 285 A recursive resolver that wants to use a root zone server operating 286 as described in Section 3 simply specifies the local address as the 287 place to look when it is looking for information from the root. All 288 responses from the root server MUST be validated using DNSSEC. 290 Note that using this simplistic configuration will cause the 291 recursive resolver to fail if the local root zone server fails. A 292 more robust configuration would cause the resolver to start using the 293 normal remote root servers when the local root server fails (such as 294 if it does not respond or gives SERVFAIL responses). 296 See Appendix B for more discussion of this for specific software. 298 To test the proper operation of the recursive resolver with the local 299 root server, use a DNS client to send a query for the SOA of the root 300 to the recursive server. Make sure the response that comes back has 301 the AA bit in the message header set to 0. 303 5. Security Considerations 305 A system that does not follow the DNSSEC-related requirements given 306 in Section 2 can be fooled into giving bad responses in the same way 307 as any recursive resolver that does not do DNSSEC validation on 308 responses from a remote root server. Anyone deploying the method 309 described in this document should be familiar with the operational 310 benefits and costs of deploying DNSSEC [RFC4033]. 312 As stated in Section 1, this design explicitly only allows the new 313 root zone server to be run on the same host, answering queries only 314 from resolvers on that host, in order to prevent the server from 315 serving authoritative answers to any system other than the recursive 316 resolver. This has the security property of limiting damage to any 317 other system that might try to rely on an altered copy of the root. 319 6. References 321 6.1. Normative References 323 [RFC1035] Mockapetris, P., "Domain names - implementation and 324 specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, 325 November 1987, . 327 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 328 Requirement Levels", BCP 14, RFC 2119, 329 DOI 10.17487/RFC2119, March 1997, 330 . 332 [RFC4033] Arends, R., Austein, R., Larson, M., Massey, D., and S. 333 Rose, "DNS Security Introduction and Requirements", 334 RFC 4033, DOI 10.17487/RFC4033, March 2005, 335 . 337 6.2. Informative References 339 [Manning2013] 340 Manning, W., "Client Based Naming", 2013, 341 . 343 [RFC8198] Fujiwara, K., Kato, A., and W. Kumari, "Aggressive Use of 344 DNSSEC-Validated Cache", RFC 8198, DOI 10.17487/RFC8198, 345 July 2017, . 347 Appendix A. Current Sources of the Root Zone 349 The root zone can be retrieved from anywhere as long as it comes with 350 all the DNSSEC records needed for validation. Currently, one can get 351 the root zone from ICANN by zone transfer (AXFR) over TCP from DNS 352 servers at xfr.lax.dns.icann.org and xfr.cjr.dns.icann.org. 354 Currently, the root can also be retrieved by AXFR over TCP from the 355 following root server operators: 357 o b.root-servers.net 359 o c.root-servers.net 361 o d.root-servers.net 363 o f.root-servers.net 365 o g.root-servers.net 367 o k.root-servers.net 369 It is crucial to note that none of the above services are guaranteed 370 to be available. It is possible that ICANN or some of the root 371 server operators will turn off the AXFR capability on the servers 372 listed above. Using AXFR over TCP to addresses that are likely to be 373 anycast (as the ones above are) may conceivably have transfer 374 problems due to anycast, but current practice shows that to be 375 unlikely. 377 To repeat the requirement from earlier in this document: if the 378 contents of the zone cannot be refreshed before the expire time, the 379 server MUST return a SERVFAIL error response for all queries until 380 the zone can be successfully be set up again. 382 Appendix B. Example Configurations of Common Implementations 384 This section shows fragments of configurations for some popular 385 recursive server software that is believed to correctly implement the 386 requirements given in this document. The examples have been updated 387 since the publication of RFC 7706. 389 The IPv4 and IPv6 addresses in this section were checked recently by 390 testing for AXFR over TCP from each address for the known single- 391 letter names in the root-servers.net zone. 393 B.1. Example Configuration: BIND 9.12 395 BIND 9.12 acts both as a recursive resolver and an authoritative 396 server. Because of this, there is "fate-sharing" between the two 397 servers in the following configuration. That is, if the root server 398 dies, it is likely that all of BIND is dead. 400 Note that a future version of BIND will support a much more robust 401 method for creating a local mirror of the root or other zones; see 402 Appendix B.3. 404 Using this configuration, queries for information in the root zone 405 are returned with the AA bit not set. 407 When slaving a zone, BIND 9.12 will treat zone data differently if 408 the zone is slaved into a separate view (or a separate instance of 409 the software) versus slaved into the same view or instance that is 410 also performing the recursion. 412 Validation: When using separate views or separate instances, the DS 413 records in the slaved zone will be validated as the zone data is 414 accessed by the recursive server. When using the same view, this 415 validation does not occur for the slaved zone. 417 Caching: When using separate views or instances, the recursive 418 server will cache all of the queries for the slaved zone, just as 419 it would using the traditional "root hints" method. Thus, as the 420 zone in the other view or instance is refreshed or updated, 421 changed information will not appear in the recursive server until 422 the TTL of the old record times out. Currently, the TTL for DS 423 and delegation NS records is two days. When using the same view, 424 all zone data in the recursive server will be updated as soon as 425 it receives its copy of the zone. 427 view root { 428 match-destinations { 127.12.12.12; }; 429 zone "." { 430 type slave; 431 file "rootzone.db"; 432 notify no; 433 masters { 434 199.9.14.201; # b.root-servers.net 435 192.33.4.12; # c.root-servers.net 436 199.7.91.13; # d.root-servers.net 437 192.5.5.241; # f.root-servers.net 438 192.112.36.4; # g.root-servers.net 439 193.0.14.129; # k.root-servers.net 440 192.0.47.132; # xfr.cjr.dns.icann.org 441 192.0.32.132; # xfr.lax.dns.icann.org 442 2001:500:200::b; # b.root-servers.net 443 2001:500:2::c; # c.root-servers.net 444 2001:500:2d::d; # d.root-servers.net 445 2001:500:2f::f; # f.root-servers.net 446 2001:500:12::d0d; # g.root-servers.net 447 2001:7fd::1; # k.root-servers.net 448 2620:0:2830:202::132; # xfr.cjr.dns.icann.org 449 2620:0:2d0:202::132; # xfr.lax.dns.icann.org 450 }; 451 }; 452 }; 454 view recursive { 455 dnssec-validation auto; 456 allow-recursion { any; }; 457 recursion yes; 458 zone "." { 459 type static-stub; 460 server-addresses { 127.12.12.12; }; 461 }; 462 }; 464 B.2. Example Configuration: Unbound 1.8 466 Similar to BIND, Unbound starting with version 1.8 can act both as a 467 recursive resolver and an authoritative server. 469 auth-zone: 470 name: "." 471 master: 199.9.14.201 # b.root-servers.net 472 master: 192.33.4.12 # c.root-servers.net 473 master: 199.7.91.13 # d.root-servers.net 474 master: 192.5.5.241 # f.root-servers.net 475 master: 192.112.36.4 # g.root-servers.net 476 master: 193.0.14.129 # k.root-servers.net 477 master: 192.0.47.132 # xfr.cjr.dns.icann.org 478 master: 192.0.32.132 # xfr.lax.dns.icann.org 479 master: 2001:500:200::b # b.root-servers.net 480 master: 2001:500:2::c # c.root-servers.net 481 master: 2001:500:2d::d # d.root-servers.net 482 master: 2001:500:2f::f # f.root-servers.net 483 master: 2001:500:12::d0d # g.root-servers.net 484 master: 2001:7fd::1 # k.root-servers.net 485 master: 2620:0:2830:202::132 # xfr.cjr.dns.icann.org 486 master: 2620:0:2d0:202::132 # xfr.lax.dns.icann.org 487 fallback-enabled: yes 488 for-downstream: no 489 for-upstream: yes 491 B.3. Example Configuration: BIND 9.14 493 BIND 9.14 (which, at the time of publication of this document is a 494 future release) can set up a local mirror of the root zone with a 495 small configuration option: 497 zone "." { 498 type mirror; 499 }; 501 The simple "type mirror" configuration for the root zone works for 502 the root zone because a default list of primary servers for the IANA 503 root zone is built into BIND 9.14. In order to set up mirroring of 504 any other zone, an explicit list of primary servers needs to be 505 provided. 507 See the documentation for BIND 9.14 (when it is released) for more 508 detail about how to use this simplified configuration 510 B.4. Example Configuration: Unbound 1.9 512 Recent versions of Unbound have a "auth-zone" feature that allows 513 local mirroring of the root zone. Configuration looks like: 515 auth-zone: 516 name: "." 517 master: "b.root-servers.net" 518 master: "c.root-servers.net" 519 master: "d.root-servers.net" 520 master: "f.root-servers.net" 521 master: "g.root-servers.net" 522 master: "k.root-servers.net" 523 fallback-enabled: yes 524 for-downstream: no 525 for-upstream: yes 526 zonefile: "root.zone" 528 B.5. Example Configuration: Knot Resolver 530 Knot Resolver uses its "prefill" module to load the root zone 531 information. This is described at . 535 B.6. Example Configuration: Microsoft Windows Server 2012 537 Windows Server 2012 contains a DNS server in the "DNS Manager" 538 component. When activated, that component acts as a recursive 539 server. DNS Manager can also act as an authoritative server. 541 Using this configuration, queries for information in the root zone 542 are returned with the AA bit set. 544 The steps to configure DNS Manager to implement the requirements in 545 this document are: 547 1. Launch the DNS Manager GUI. This can be done from the command 548 line ("dnsmgmt.msc") or from the Service Manager (the "DNS" 549 command in the "Tools" menu). 551 2. In the hierarchy under the server on which the service is 552 running, right-click on the "Forward Lookup Zones", and select 553 "New Zone". This brings up a succession of dialog boxes. 555 3. In the "Zone Type" dialog box, select "Secondary zone". 557 4. In the "Zone Name" dialog box, enter ".". 559 5. In the "Master DNS Servers" dialog box, enter 560 "b.root-servers.net". The system validates that it can do a zone 561 transfer from that server. (After this configuration is 562 completed, the DNS Manager will attempt to transfer from all of 563 the root zone servers.) 565 6. In the "Completing the New Zone Wizard" dialog box, click 566 "Finish". 568 7. Verify that the DNS Manager is acting as a recursive resolver. 569 Right-click on the server name in the hierarchy, choosing the 570 "Advanced" tab in the dialog box. See that "Disable recursion 571 (also disables forwarders)" is not selected, and that "Enable 572 DNSSEC validation for remote responses" is selected. 574 Acknowledgements 576 The authors fully acknowledge that running a copy of the root zone on 577 the loopback address is not a new concept, and that we have chatted 578 with many people about that idea over time. For example, Bill 579 Manning described a similar solution to the problems in his doctoral 580 dissertation in 2013 [Manning2013]. 582 Evan Hunt contributed greatly to the logic in the requirements. 583 Other significant contributors include Wouter Wijngaards, Tony Hain, 584 Doug Barton, Greg Lindsay, and Akira Kato. The authors also received 585 many offline comments about making the document clear that this is 586 just a description of a way to operate a root zone on the same host, 587 and not a recommendation to do so. 589 People who contributed to this update to RFC 7706 include: Florian 590 Obser, nusenu, Wouter Wijngaards, [[ others go here ]]. 592 Authors' Addresses 594 Warren Kumari 595 Google 597 Email: Warren@kumari.net 599 Paul Hoffman 600 ICANN 602 Email: paul.hoffman@icann.org