idnits 2.17.1 draft-ietf-dnsop-7706bis-02.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 (January 25, 2019) is 1915 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: July 29, 2019 January 25, 2019 8 Running a Root Server Local to a Resolver 9 draft-ietf-dnsop-7706bis-02 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 July 29, 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 . . . . . . . . . 7 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.9 . . . . . . . . . . . . . 9 83 B.2. Example Configuration: Unbound 1.8 . . . . . . . . . . . 10 84 B.3. Example Configuration: Unbound . . . . . . . . . . . . . 11 85 B.4. Example Configuration: Knot Resolver . . . . . . . . . . 11 86 B.5. Example Configuration: Microsoft Windows Server 2012 . . 11 87 Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . 12 88 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 13 90 1. Introduction 92 DNS recursive resolvers have to provide answers to all queries from 93 their customers, even those for domain names that do not exist. For 94 each queried name that has a top-level domain (TLD) that is not in 95 the recursive resolver's cache, the resolver must send a query to a 96 root server to get the information for that TLD, or to find out that 97 the TLD does not exist. Research shows that the vast majority of 98 queries going to the root are for names that do not exist in the root 99 zone because negative answers are sometimes cached for a much shorter 100 period of time. 102 Many of the queries from recursive resolvers to root servers get 103 answers that are referrals to other servers. Malicious third parties 104 might be able to observe that traffic on the network between the 105 recursive resolver and root servers. 107 The primary goals of this design are to provide more reliable answers 108 for queries to the root zone during network attacks, and to prevent 109 queries and responses from being visible on the network. This design 110 will probably have little effect on getting faster responses to stub 111 resolver for good queries on TLDs, because the TTL for most TLDs is 112 usually long-lived (on the order of a day or two) and is thus usually 113 already in the cache of the recursive resolver; the same is true for 114 the TTL for negative answers from the root servers. 116 This document describes a method for the operator of a recursive 117 resolver to have a complete root zone locally, and to hide these 118 queries from outsiders. The basic idea is to create an up-to-date 119 root zone server on the same host as the recursive server, and use 120 that server when the recursive resolver looks up root information. 121 The recursive resolver validates all responses from the root server 122 on the same host, just as it would all responses from a remote root 123 server. 125 This design explicitly only allows the new root zone server to be run 126 on the same server as the recursive resolver, in order to prevent the 127 server from serving authoritative answers to any other system. 128 Specifically, the root server on the local system MUST be configured 129 to only answer queries from the resolvers on the same host, and MUST 130 NOT answer queries from any other resolver. 132 At the time that RFC 7706 was published, it was considered 133 controversial: there was not consensus on whether this was a "best 134 practice". In fact, many people felt that it is an excessively risky 135 practice because it introduced a new operational piece to local DNS 136 operations where there was not one before. Since then, the DNS 137 operational community has largely shifted to believing that local 138 serving of the root zone for an individual resolver is a reasonable 139 practice. The advantages listed above do not come free: if this new 140 system does not work correctly, users can get bad data, or the entire 141 recursive resolution system might fail in ways that are hard to 142 diagnose. 144 This design uses authoritative name server software running on the 145 same machine as the recursive resolver. Thus, recursive resolver 146 software such as BIND or modern versions of common open source 147 recursive resolver software do not need to add new functionality, but 148 other recursive resolver software might need to be able to talk to an 149 authoritative server running on the same host. 151 A different approach to solving some of the problems discussed in 152 this document is described in [RFC8198]. 154 1.1. Updates from RFC 7706 156 RFC 7706 explicitly required that the root server instance be run on 157 the loopback interface of the host running the validating resolver. 158 However, RFC 7706 also had examples of how to set up common software 159 that did not use the loopback interface. Thus, this document loosens 160 the restriction on the interface but keeps the requirement that only 161 systems running on that single host be able to query that root server 162 instance. 164 Removed the prohibition on distribution of recursive DNS servers 165 including configurations for this design because some already do, and 166 others have expressed an interest in doing so. 168 Added the idea that a recursive resolver using this design might 169 switch to using the normal (remote) root servers if the local root 170 server fails. 172 [ This section will list all the changes from RFC 7706. For this 173 draft, it is also the list of changes that we will make in future 174 versions of the daft. ] 176 [ Give a clearer comparison of software that allows slaving the root 177 zone in the software (such as BIND or modern Unbound) versus resolver 178 software that requires a local slaved root zone (older Unbound). ] 180 [ Add a description of Knot's cache-prefilling as way to get the data 181 without having a local authoritative. ] 183 [ Add examples of other resolvers such as PowerDNS Recusor. ] 185 [ Add discussion of BIND slaving the root zone in the same view 186 instead of using different views. ] 188 [ Make the use cases explicit. Be clearer that a real use case is 189 folks who are worried that root server unavailabilty due to DDoS 190 against them is a reason some people would use the mechanisms here. 191 ] 193 [ Describe how slaving the root zone from root zone servers does not 194 fully remove the reliance on the root servers being available. ] 196 [ Refresh list of where one can get copies of the root zone. ] 198 [ Other new topics might go here. ] 200 1.2. Requirements Notation 202 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 203 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 204 document are to be interpreted as described in [RFC2119]. 206 2. Requirements 208 In order to implement the mechanism described in this document: 210 o The system MUST be able to validate a zone with DNSSEC [RFC4033]. 212 o The system MUST have an up-to-date copy of the key used to sign 213 the DNS root. 215 o The system MUST be able to retrieve a copy of the entire root zone 216 (including all DNSSEC-related records). 218 o The system MUST be able to run an authoritative server for the 219 root zone on the same host. The root server instance MUST only 220 respond to queries from the same host. One way to assure not 221 responding to queries from other hosts is to make the address of 222 the authoritative server one of the loopback addresses (that is, 223 an address in the range 127/8 for IPv4 or ::1 in IPv6). 225 A corollary of the above list is that authoritative data in the root 226 zone used on the local authoritative server MUST be identical to the 227 same data in the root zone for the DNS. It is possible to change the 228 unsigned data (the glue records) in the copy of the root zone, but 229 such changes could cause problems for the recursive server that 230 accesses the local root zone, and therefore any changes to the glue 231 records SHOULD NOT be made. 233 3. Operation of the Root Zone on the Local Server 235 The operation of an authoritative server for the root in the system 236 described here can be done separately from the operation of the 237 recursive resolver, or it might be part of the configuration of the 238 recursive resolver system. 240 The steps to set up the root zone are: 242 1. Retrieve a copy of the root zone. (See Appendix A for some 243 current locations of sources.) 245 2. Start the authoritative server with the root zone on an address 246 on the host that is not in use. For IPv4, this could be 247 127.0.0.1, but if that address is in use, any address in 127/8 is 248 acceptable. For IPv6, this would be ::1. It can also be a 249 publicly-visible address on the host, but only if the 250 authoritative server software allows restricting the addresses 251 that can access the authoritative server, and the software is 252 configured to only allow access from addresses on this single 253 host. 255 The contents of the root zone MUST be refreshed using the timers from 256 the SOA record in the root zone, as described in [RFC1035]. This 257 inherently means that the contents of the local root zone will likely 258 be a little behind those of the global root servers because those 259 servers are updated when triggered by NOTIFY messages. 261 If the contents of the root zone cannot be refreshed before the 262 expire time in the SOA, the local root server MUST return a SERVFAIL 263 error response for all queries sent to it until the zone can be 264 successfully be set up again. Because this would cause a recursive 265 resolver on the same host that is relying on this root server to also 266 fail, a resolver might be configured to immediatly switch to using 267 other (non-local) root servers if the resolver receives a SERVFAIL 268 response from a local root server. 270 In the event that refreshing the contents of the root zone fails, the 271 results can be disastrous. For example, sometimes all the NS records 272 for a TLD are changed in a short period of time (such as 2 days); if 273 the refreshing of the local root zone is broken during that time, the 274 recursive resolver will have bad data for the entire TLD zone. 276 An administrator using the procedure in this document SHOULD have an 277 automated method to check that the contents of the local root zone 278 are being refreshed; this might be part of the resolver software. 279 One way to do this is to have a separate process that periodically 280 checks the SOA of the root zone from the local root zone and makes 281 sure that it is changing. At the time that this document is 282 published, the SOA for the root zone is the digital representation of 283 the current date with a two-digit counter appended, and the SOA is 284 changed every day even if the contents of the root zone are 285 unchanged. For example, the SOA of the root zone on January 2, 2018 286 was 2018010201. A process can use this fact to create a check for 287 the contents of the local root zone (using a program not specified in 288 this document). 290 4. Using the Root Zone Server on the Same Host 292 A recursive resolver that wants to use a root zone server operating 293 as described in Section 3 simply specifies the local address as the 294 place to look when it is looking for information from the root. All 295 responses from the root server MUST be validated using DNSSEC. 297 Note that using this simplistic configuration will cause the 298 recursive resolver to fail if the local root zone server fails. A 299 more robust configuration would cause the resolver to start using the 300 normal remote root servers when the local root server fails (such as 301 if it does not respond or gives SERVFAIL responses). 303 See Appendix B for more discussion of this for specific software. 305 To test the proper operation of the recursive resolver with the local 306 root server, use a DNS client to send a query for the SOA of the root 307 to the recursive server. Make sure the response that comes back has 308 the AA bit in the message header set to 0. 310 5. Security Considerations 312 A system that does not follow the DNSSEC-related requirements given 313 in Section 2 can be fooled into giving bad responses in the same way 314 as any recursive resolver that does not do DNSSEC validation on 315 responses from a remote root server. Anyone deploying the method 316 described in this document should be familiar with the operational 317 benefits and costs of deploying DNSSEC [RFC4033]. 319 As stated in Section 1, this design explicitly only allows the new 320 root zone server to be run on the same host, answering queries only 321 from resolvers on that host, in order to prevent the server from 322 serving authoritative answers to any system other than the recursive 323 resolver. This has the security property of limiting damage to any 324 other system that might try to rely on an altered copy of the root. 326 6. References 328 6.1. Normative References 330 [RFC1035] Mockapetris, P., "Domain names - implementation and 331 specification", STD 13, RFC 1035, DOI 10.17487/RFC1035, 332 November 1987, . 334 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 335 Requirement Levels", BCP 14, RFC 2119, 336 DOI 10.17487/RFC2119, March 1997, 337 . 339 [RFC4033] Arends, R., Austein, R., Larson, M., Massey, D., and S. 340 Rose, "DNS Security Introduction and Requirements", 341 RFC 4033, DOI 10.17487/RFC4033, March 2005, 342 . 344 6.2. Informative References 346 [Manning2013] 347 Manning, W., "Client Based Naming", 2013, 348 . 350 [RFC8198] Fujiwara, K., Kato, A., and W. Kumari, "Aggressive Use of 351 DNSSEC-Validated Cache", RFC 8198, DOI 10.17487/RFC8198, 352 July 2017, . 354 Appendix A. Current Sources of the Root Zone 356 The root zone can be retrieved from anywhere as long as it comes with 357 all the DNSSEC records needed for validation. Currently, one can get 358 the root zone from ICANN by zone transfer (AXFR) over TCP from DNS 359 servers at xfr.lax.dns.icann.org and xfr.cjr.dns.icann.org. 361 Currently, the root can also be retrieved by AXFR over TCP from the 362 following root server operators: 364 o b.root-servers.net 366 o c.root-servers.net 368 o d.root-servers.net 370 o f.root-servers.net 372 o g.root-servers.net 374 o k.root-servers.net 376 It is crucial to note that none of the above services are guaranteed 377 to be available. It is possible that ICANN or some of the root 378 server operators will turn off the AXFR capability on the servers 379 listed above. Using AXFR over TCP to addresses that are likely to be 380 anycast (as the ones above are) may conceivably have transfer 381 problems due to anycast, but current practice shows that to be 382 unlikely. 384 To repeat the requirement from earlier in this document: if the 385 contents of the zone cannot be refreshed before the expire time, the 386 server MUST return a SERVFAIL error response for all queries until 387 the zone can be successfully be set up again. 389 Appendix B. Example Configurations of Common Implementations 391 This section shows fragments of configurations for some popular 392 recursive server software that is believed to correctly implement the 393 requirements given in this document. 395 The IPv4 and IPv6 addresses in this section were checked recently by 396 testing for AXFR over TCP from each address for the known single- 397 letter names in the root-servers.net zone. 399 B.1. Example Configuration: BIND 9.9 401 BIND acts both as a recursive resolver and an authoritative server. 402 Because of this, there is "fate-sharing" between the two servers in 403 the following configuration. That is, if the root server dies, it is 404 likely that all of BIND is dead. 406 Using this configuration, queries for information in the root zone 407 are returned with the AA bit not set. 409 When slaving a zone, BIND will treat zone data differently if the 410 zone is slaved into a separate view (or a separate instance of the 411 software) versus slaved into the same view or instance that is also 412 performing the recursion. 414 Validation: When using separate views or separate instances, the DS 415 records in the slaved zone will be validated as the zone data is 416 accessed by the recursive server. When using the same view, this 417 validation does not occur for the slaved zone. 419 Caching: When using separate views or instances, the recursive 420 server will cache all of the queries for the slaved zone, just as 421 it would using the traditional "root hints" method. Thus, as the 422 zone in the other view or instance is refreshed or updated, 423 changed information will not appear in the recursive server until 424 the TTL of the old record times out. Currently, the TTL for DS 425 and delegation NS records is two days. When using the same view, 426 all zone data in the recursive server will be updated as soon as 427 it receives its copy of the zone. 429 view root { 430 match-destinations { 127.12.12.12; }; 431 zone "." { 432 type slave; 433 file "rootzone.db"; 434 notify no; 435 masters { 436 192.228.79.201; # b.root-servers.net 437 192.33.4.12; # c.root-servers.net 438 199.7.91.13; # d.root-servers.net 439 192.5.5.241; # f.root-servers.net 440 192.112.36.4; # g.root-servers.net 441 193.0.14.129; # k.root-servers.net 442 192.0.47.132; # xfr.cjr.dns.icann.org 443 192.0.32.132; # xfr.lax.dns.icann.org 444 2001:500:84::b; # b.root-servers.net 445 2001:500:2::c; # c.root-servers.net 446 2001:500:2d::d; # d.root-servers.net 447 2001:500:2f::f; # f.root-servers.net 448 2001:500:12::d0d; # g.root-servers.net 449 2001:7fd::1; # k.root-servers.net 450 2620:0:2830:202::132; # xfr.cjr.dns.icann.org 451 2620:0:2d0:202::132; # xfr.lax.dns.icann.org 452 }; 453 }; 454 }; 456 view recursive { 457 dnssec-validation auto; 458 allow-recursion { any; }; 459 recursion yes; 460 zone "." { 461 type static-stub; 462 server-addresses { 127.12.12.12; }; 463 }; 464 }; 466 B.2. Example Configuration: Unbound 1.8 468 Similar to BIND, Unbound starting with version 1.8 can act both as a 469 recursive resolver and an authoritative server. 471 auth-zone: 472 name: "." 473 master: 192.228.79.201 # b.root-servers.net 474 master: 192.33.4.12 # c.root-servers.net 475 master: 199.7.91.13 # d.root-servers.net 476 master: 192.5.5.241 # f.root-servers.net 477 master: 192.112.36.4 # g.root-servers.net 478 master: 193.0.14.129 # k.root-servers.net 479 master: 192.0.47.132 # xfr.cjr.dns.icann.org 480 master: 192.0.32.132 # xfr.lax.dns.icann.org 481 master: 2001:500:84::b # b.root-servers.net 482 master: 2001:500:2::c # c.root-servers.net 483 master: 2001:500:2d::d # d.root-servers.net 484 master: 2001:500:2f::f # f.root-servers.net 485 master: 2001:500:12::d0d # g.root-servers.net 486 master: 2001:7fd::1 # k.root-servers.net 487 master: 2620:0:2830:202::132 # xfr.cjr.dns.icann.org 488 master: 2620:0:2d0:202::132 # xfr.lax.dns.icann.org 489 fallback-enabled: yes 490 for-downstream: no 491 for-upstream: yes 493 B.3. Example Configuration: Unbound 495 [ Add an example of modern Unbound, or point to the Unbound 496 documentation where it exists ] 498 B.4. Example Configuration: Knot Resolver 500 Knot Resolver uses its "prefill" module to load the root zone 501 information. This is described at . 505 B.5. Example Configuration: Microsoft Windows Server 2012 507 Windows Server 2012 contains a DNS server in the "DNS Manager" 508 component. When activated, that component acts as a recursive 509 server. DNS Manager can also act as an authoritative server. 511 Using this configuration, queries for information in the root zone 512 are returned with the AA bit set. 514 The steps to configure DNS Manager to implement the requirements in 515 this document are: 517 1. Launch the DNS Manager GUI. This can be done from the command 518 line ("dnsmgmt.msc") or from the Service Manager (the "DNS" 519 command in the "Tools" menu). 521 2. In the hierarchy under the server on which the service is 522 running, right-click on the "Forward Lookup Zones", and select 523 "New Zone". This brings up a succession of dialog boxes. 525 3. In the "Zone Type" dialog box, select "Secondary zone". 527 4. In the "Zone Name" dialog box, enter ".". 529 5. In the "Master DNS Servers" dialog box, enter 530 "b.root-servers.net". The system validates that it can do a zone 531 transfer from that server. (After this configuration is 532 completed, the DNS Manager will attempt to transfer from all of 533 the root zone servers.) 535 6. In the "Completing the New Zone Wizard" dialog box, click 536 "Finish". 538 7. Verify that the DNS Manager is acting as a recursive resolver. 539 Right-click on the server name in the hierarchy, choosing the 540 "Advanced" tab in the dialog box. See that "Disable recursion 541 (also disables forwarders)" is not selected, and that "Enable 542 DNSSEC validation for remote responses" is selected. 544 Acknowledgements 546 The authors fully acknowledge that running a copy of the root zone on 547 the loopback address is not a new concept, and that we have chatted 548 with many people about that idea over time. For example, Bill 549 Manning described a similar solution to the problems in his doctoral 550 dissertation in 2013 [Manning2013]. 552 Evan Hunt contributed greatly to the logic in the requirements. 553 Other significant contributors include Wouter Wijngaards, Tony Hain, 554 Doug Barton, Greg Lindsay, and Akira Kato. The authors also received 555 many offline comments about making the document clear that this is 556 just a description of a way to operate a root zone on the same host, 557 and not a recommendation to do so. 559 People who contributed to this update to RFC 7706 include: Florian 560 Obser, nusenu, [[ others go here ]]. 562 Authors' Addresses 564 Warren Kumari 565 Google 567 Email: Warren@kumari.net 569 Paul Hoffman 570 ICANN 572 Email: paul.hoffman@icann.org