
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/">
    <channel>
        <title><![CDATA[ The Cloudflare Blog ]]></title>
        <description><![CDATA[ Get the latest news on how products at Cloudflare are built, technologies used, and join the teams helping to build a better Internet. ]]></description>
        <link>https://blog.cloudflare.com</link>
        <atom:link href="https://blog.cloudflare.com/" rel="self" type="application/rss+xml"/>
        <language>en-us</language>
        <image>
            <url>https://blog.cloudflare.com/favicon.png</url>
            <title>The Cloudflare Blog</title>
            <link>https://blog.cloudflare.com</link>
        </image>
        <lastBuildDate>Wed, 15 Apr 2026 19:39:49 GMT</lastBuildDate>
        <item>
            <title><![CDATA[1.1.1.1 lookup failures on  October 4, 2023]]></title>
            <link>https://blog.cloudflare.com/1-1-1-1-lookup-failures-on-october-4th-2023/</link>
            <pubDate>Wed, 04 Oct 2023 19:40:34 GMT</pubDate>
            <description><![CDATA[ On 4 October 2023, Cloudflare experienced DNS resolution problems. Some users may have received SERVFAIL DNS responses to valid queries. In this blog, we’re going to talk about what the failure was, why it occurred, and what we’re doing to make sure this doesn’t happen again ]]></description>
            <content:encoded><![CDATA[ <p></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5S774vlQ0Giaa7OrRw5WpA/429311dc4a79f8e088291906058eb206/DNS-Incident-1.png" />
            
            </figure><p>On 4 October 2023, Cloudflare experienced DNS resolution problems starting at 07:00 UTC and ending at 11:00 UTC. Some users of 1.1.1.1 or products like WARP, Zero Trust, or third party DNS resolvers which use 1.1.1.1 may have received SERVFAIL DNS responses to valid queries. We’re very sorry for this outage. This outage was an internal software error and not the result of an attack. In this blog, we’re going to talk about what the failure was, why it occurred, and what we’re doing to make sure this doesn’t happen again.</p>
    <div>
      <h2>Background</h2>
      <a href="#background">
        
      </a>
    </div>
    <p>In the <a href="https://www.cloudflare.com/learning/dns/what-is-dns/">Domain Name System (DNS)</a>, every domain name exists within a DNS zone. The zone is a collection of <a href="https://www.cloudflare.com/learning/dns/glossary/what-is-a-domain-name/">domain names</a> and host names that are controlled together. For example, Cloudflare is responsible for the domain name cloudflare.com, which we say is in the “cloudflare.com” zone. The .com top-level domain (TLD) is owned by a third party and is in the “com” zone. It gives directions on how to reach cloudflare.com. Above all of the TLDs is <a href="https://en.wikipedia.org/wiki/DNS_root_zone">the root zone</a>, which gives <a href="https://www.iana.org/domains/root/db">directions on how to reach TLDs</a>. This means that the root zone is important in being able to resolve all other domain names. Like other important parts of the DNS, <a href="https://www.iana.org/dnssec/procedures">the root zone is signed with DNSSEC</a>, which means the root zone itself contains cryptographic signatures.</p><p>The root zone is published on <a href="https://root-servers.org/">the root servers</a>, but it is also common for DNS operators to <a href="https://www.rfc-editor.org/rfc/rfc8806">retrieve and retain a copy of the root zone automatically</a> so that in the event that the root servers cannot be reached, the information in the root zone is still available. Cloudflare’s recursive DNS infrastructure takes this approach as it also makes the resolution process faster. New versions of the root zone are normally published twice a day. 1.1.1.1 has a <a href="/big-pineapple-intro/">WebAssembly app</a> called static_zone running on top of the main DNS logic that serves those new versions when they are available.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5tgd6rlFY7udR3qnaykmLu/b3256f48a8d2aa87e51de7da96bdfa4b/image2-1.png" />
            
            </figure>
    <div>
      <h2>What happened</h2>
      <a href="#what-happened">
        
      </a>
    </div>
    <p>On 21 September, as part of <a href="https://blog.verisign.com/security/root-zone-zonemd/">a known and planned change in root zone management</a>, a new resource record type was included in the root zones for the first time. The new resource record is named <a href="https://www.rfc-editor.org/rfc/rfc8976.html">ZONEMD</a>, and is in effect a checksum for the contents of the root zone.</p><p>The root zone is retrieved by software running in Cloudflare’s core network. It is subsequently redistributed to Cloudflare’s data centers around the world. After the change, the root zone containing the ZONEMD record continued to be retrieved and distributed as normal. However, the 1.1.1.1 resolver systems that make use of that data had problems parsing the ZONEMD record. Because zones must be loaded and served in their entirety, the system’s failure to parse ZONEMD meant the new versions of the root zone were not used in Cloudflare’s resolver systems. Some of the servers hosting Cloudflare's resolver infrastructure failed over to querying the DNS root servers directly on a request-by-request basis when they did not receive the new root zone. However, others continued to rely on the known working version of the root zone still available in their memory cache, which was the version pulled on 21 September before the change.</p><p>On 4 October 2023 at 07:00 UTC, the DNSSEC signatures in the version of the root zone from 21 September expired. Because there was no newer version that the Cloudflare resolver systems were able to use, some of Cloudflare’s resolver systems stopped being able to validate DNSSEC signatures and as a result started sending error responses (SERVFAIL). The rate at which Cloudflare resolvers generated SERVFAIL responses grew by 12%. The diagrams below illustrate the progression of the failure and how it became visible to users.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1XAzPsw7SXN9MWtsdfATWP/6df4fb0f70eddd8d5a7b92ae242cb0f5/image3-1.png" />
            
            </figure>
    <div>
      <h2>Incident timeline and impact</h2>
      <a href="#incident-timeline-and-impact">
        
      </a>
    </div>
    <p><b>21 September 6:30 UTC</b>: Last successful pull of the root zone.<b>4 October 7:00 UTC</b>: DNSSEC signatures in the root zone obtained on 21 September expired causing an increase in SERVFAIL responses to client queries.<b>7:57</b>: First external reports of unexpected SERVFAILs started coming in.<b>8:03</b>: Internal Cloudflare incident declared.<b>8:50</b>: Initial attempt made at stopping 1.1.1.1 from serving responses using the stale root zone file with an override rule.<b>10:30</b>: Stopped 1.1.1.1 from preloading the root zone file entirely.<b>10:32</b>: Responses returned to normal.<b>11:02</b>: Incident closed.</p><p>This below chart shows the timeline of impact along with the percentage of DNS queries that returned with a SERVFAIL error:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1Wfn8yZCTZqq1AcB8EjQ4L/fe78cafa32baa2553bdba082c61e9dca/image1-3.png" />
            
            </figure><p>We expect a baseline volume of SERVFAIL errors for regular traffic during normal operation. Usually that percentage sits at around 3%. These SERVFAILs can be caused by legitimate issues in the DNSSEC chain, failures to connect to authoritative servers, authoritative servers taking too long to respond, <a href="/unwrap-the-servfail/">and many others</a>. During the incident the amount of SERVFAILs peaked at 15% of total queries, although the impact was not evenly distributed around the world and was mainly concentrated in our larger data centers like Ashburn, Virginia; Frankfurt, Germany; and Singapore.</p>
    <div>
      <h2>Why this incident happened</h2>
      <a href="#why-this-incident-happened">
        
      </a>
    </div>
    
    <div>
      <h4>Why parsing the ZONEMD record failed</h4>
      <a href="#why-parsing-the-zonemd-record-failed">
        
      </a>
    </div>
    <p>DNS has a binary format for storing resource records. In this binary format the type of the resource record (TYPE)  is stored as a 16-bit integer. The type of resource record determines how the resource data (RDATA) is parsed. When the record type is 1, this means it is an A record, and the RDATA can be parsed as an IPv4 address. Record type 28 is an AAAA record, whose RDATA can be parsed as an IPv6 address instead. When a parser runs into an unknown resource type it won’t know how to parse its RDATA, but fortunately it doesn’t have to: the RDLENGTH field indicates how long the RDATA field is, allowing the parser to treat it as an opaque data element.</p>
            <pre><code>                                   1  1  1  1  1  1
      0  1  2  3  4  5  6  7  8  9  0  1  2  3  4  5
    +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
    |                                               |
    /                                               /
    /                      NAME                     /
    |                                               |
    +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
    |                      TYPE                     |
    +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
    |                     CLASS                     |
    +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
    |                      TTL                      |
    |                                               |
    +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
    |                   RDLENGTH                    |
    +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--|
    /                     RDATA                     /
    /                                               /
    +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+</code></pre>
            <p><a href="https://www.ietf.org/rfc/rfc1035.txt">RFC 1035</a></p><p>The reason static_zone didn’t support the new ZONEMD record is because up until now we had chosen to distribute the root zone internally in its presentation format, rather than in the binary format. When looking at the text representation for a few resource records we can see there is a lot more variation in how different records are presented.</p>
            <pre><code>.			86400	IN	SOA	a.root-servers.net. nstld.verisign-grs.com. 2023100400 1800 900 604800 86400
.			86400	IN	RRSIG	SOA 8 0 86400 20231017050000 20231004040000 46780 . J5lVTygIkJHDBt6HHm1QLx7S0EItynbBijgNlcKs/W8FIkPBfCQmw5BsUTZAPVxKj7r2iNLRddwRcM/1sL49jV9Jtctn8OLLc9wtouBmg3LH94M0utW86dKSGEKtzGzWbi5hjVBlkroB8XVQxBphAUqGxNDxdE6AIAvh/eSSb3uSQrarxLnKWvHIHm5PORIOftkIRZ2kcA7Qtou9NqPCSE8fOM5EdXxussKChGthmN5AR5S2EruXIGGRd1vvEYBrRPv55BAWKKRERkaXhgAp7VikYzXesiRLdqVlTQd+fwy2tm/MTw+v3Un48wXPg1lRPlQXmQsuBwqg74Ts5r8w8w==
.			518400	IN	NS	a.root-servers.net.
.			86400	IN	ZONEMD	2023100400 1 241 E375B158DAEE6141E1F784FDB66620CC4412EDE47C8892B975C90C6A102E97443678CCA4115E27195B468E33ABD9F78C</code></pre>
            <p>Example records taken from <a href="https://www.internic.net/domain/root.zone">https://www.internic.net/domain/root.zone</a></p><p>When we run into an unknown resource record it’s not always easy to know how to handle it. Because of this, the library we use to parse the root zone at the edge does not make an attempt at doing so, and instead returns a parser error.</p>
    <div>
      <h3>Why a stale version of the root zone was used</h3>
      <a href="#why-a-stale-version-of-the-root-zone-was-used">
        
      </a>
    </div>
    <p>The static_zone app, tasked with loading and parsing the root zone for the purpose of serving the root zone locally (<a href="https://datatracker.ietf.org/doc/html/rfc7706">RFC 7706</a>), stores the latest version in memory. When a new version is published it parses it and, when successfully done so, drops the old version. However, as parsing failed the static_zone app never switched to a newer version, and instead continued using the old version indefinitely. When the 1.1.1.1 service is first started the static_zone app does not have an existing version in memory. When it tries to parse the root zone it fails in doing so, but because it does not have an older version of the root zone to fall back on, it falls back on querying the root servers directly for incoming requests.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6CnsfVerlBEVukAWjtcK0B/2bdf1562912f7694fe4c65f73e8a9810/image5.png" />
            
            </figure>
    <div>
      <h3>Why the initial attempt at disabling static_zone didn’t work</h3>
      <a href="#why-the-initial-attempt-at-disabling-static_zone-didnt-work">
        
      </a>
    </div>
    <p>Initially we tried to disable the static_zone app through override rules, a mechanism that allows us to programmatically change some behavior of 1.1.1.1. The rule we deployed was:</p>
            <pre><code>phase = pre-cache set-tag rec_disable_static</code></pre>
            <p>For any incoming request this rule adds the tag rec_disable_static to the request. Inside the static_zone app we check for this tag and, if it’s set, we do not return a response from the cached, static root zone. However, <a href="/big-pineapple-intro/">to improve cache performance</a> queries are sometimes forwarded to another node if the current node can’t find the response in its own cache. Unfortunately, the rec_disable_static tag is not included in the queries being forwarded to other nodes, which caused the static_zone app to continue replying with stale information until we eventually disabled the app entirely.</p>
    <div>
      <h3>Why the impact was partial</h3>
      <a href="#why-the-impact-was-partial">
        
      </a>
    </div>
    <p>Cloudflare regularly performs rolling reboots of the servers that host our services for tasks like kernel updates that can only take effect after a full system restart. At the time of this outage, resolver server instances that were restarted between the ZONEMD change and the DNSSEC invalidation did not contribute to impact. If they had restarted during this two-week period, they would have failed to load the root zone on startup and fallen back to resolving by sending DNS queries to root servers instead. In addition, the resolver uses a technique called serve stale (<a href="https://datatracker.ietf.org/doc/html/rfc8767">RFC 8767</a>) with the purpose of being able to continue to serve popular records from a potentially stale cache to limit the impact. A record is considered to be stale once the TTL amount of seconds has passed since the record was retrieved from upstream.  This prevented a total outage; impact was mainly felt in our largest data centers which had many servers that had not restarted the 1.1.1.1 service in that timeframe.</p>
    <div>
      <h2>Remediation and follow-up steps</h2>
      <a href="#remediation-and-follow-up-steps">
        
      </a>
    </div>
    <p>This incident had widespread impact, and we take the availability of our services very seriously. We have identified several areas of improvement and will continue to work on uncovering any other gaps that could cause a recurrence.</p><p>Here is what we are working on immediately:</p><p><b>Visibility</b>: We’re adding alerts to notify when static_zone serves a stale root zone file. It should not have been the case that serving a stale root zone file went unnoticed for as long as it did. If we had been monitoring this better, with the caching that exists, there would have been no impact. It is our goal to protect our customers and their users from upstream changes.</p><p><b>Resilience:</b> We will re-evaluate how we ingest and distribute the root zone internally. Our ingestion and distribution pipelines should handle new RRTYPEs seamlessly, and any brief interruption to the pipeline should be invisible to end users.</p><p><b>Testing:</b> Despite having tests in place around this problem, including tests related to unreleased changes in parsing the new ZONEMD records, we did not adequately test what happens when the root zone fails to parse. We will improve our test coverage and the related processes.</p><p><b>Architecture</b>: We should not use stale copies of the root zone past a certain point. While it’s certainly possible to continue to use stale root zone data for a limited amount of time, past a certain point there are unacceptable operational risks. We will take measures to ensure that the lifetime of cached root zone data is better managed as described in <a href="https://www.rfc-editor.org/rfc/rfc8806">RFC 8806: Running a Root Server Local to a Resolver</a>.</p>
    <div>
      <h2>Conclusion</h2>
      <a href="#conclusion">
        
      </a>
    </div>
    <p>We are deeply sorry that this incident happened. There is one clear message from this incident: do not ever assume that something is not going to change!  Many modern systems are built with a long chain of libraries that are pulled into the final executable, each one of those may have bugs or may not be updated early enough for programs to operate correctly when changes in input happen. We understand how important it is to have good testing in place that allows detection of regressions and systems and components that fail gracefully on changes to input. We understand that we need to always assume that “format” changes in the most critical systems of the internet (DNS and BGP) are going to have an impact.</p><p>We have a lot to follow up on internally and are working around the clock to make sure something like this does not happen again.</p> ]]></content:encoded>
            <category><![CDATA[1.1.1.1]]></category>
            <category><![CDATA[Post Mortem]]></category>
            <category><![CDATA[Outage]]></category>
            <guid isPermaLink="false">5Epuwd37zPtXIStrh5nqXB</guid>
            <dc:creator>Ólafur Guðmundsson</dc:creator>
        </item>
        <item>
            <title><![CDATA[Introducing DNS Resolver, 1.1.1.1 (not a joke)]]></title>
            <link>https://blog.cloudflare.com/dns-resolver-1-1-1-1/</link>
            <pubDate>Sun, 01 Apr 2018 13:00:00 GMT</pubDate>
            <description><![CDATA[ Cloudflare’s mission is to help build a better Internet and today we are releasing our DNS resolver, 1.1.1.1 - a recursive DNS service. With this offering, we’re fixing the foundation of the Internet by building a faster, more secure and privacy-centric public DNS resolver.  ]]></description>
            <content:encoded><![CDATA[ <p>Cloudflare’s mission is to help build a better Internet and today we are releasing our DNS resolver, <a href="https://1.1.1.1/">1.1.1.1</a> - a recursive DNS service. With this offering, we’re fixing the foundation of the Internet by building a faster, more secure and privacy-centric public DNS resolver. The DNS resolver, 1.1.1.1, is available publicly for everyone to use - it is the first consumer-focused service Cloudflare has ever released.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/V4FY9gxhQg6fqRgn5VLPt/ddc10850b07eff62665dee8fa07a8e86/1.1.1.1.svg" />
            
            </figure><p>We’re using the following IPv4 addresses for our resolver: <b>1.1.1.1</b> and <b>1.0.0.1</b>. Easy to remember. These addresses have been provided to Cloudflare by APNIC for both joint research and this service. You can read more about their work via the <a href="https://labs.apnic.net/?p=1127">APNIC blog</a>.</p><p>DNS resolver, 1.1.1.1, is served by Cloudflare’s Global Anycast <a href="https://www.cloudflare.com/network/">Network</a>.</p>
    <div>
      <h3>Background: A quick refresher on the role of the resolver in DNS</h3>
      <a href="#background-a-quick-refresher-on-the-role-of-the-resolver-in-dns">
        
      </a>
    </div>
    <p>Our friends at <a href="https://dnsimple.com/">DNSimple</a> have made this amazing DNS Tutorial for anyone to fill in their gaps on <a href="https://howdns.works/">how DNS works</a>. They explain all about resolvers, root name servers, and much more in a very informative way.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6jPbSyNPUonCJ1K5iq71CF/a5cad2f0ad2e28a99314206509ad1759/dnsimple-howdns-works.png" />
            
            </figure><p>When resolving a <a href="https://www.cloudflare.com/learning/dns/glossary/what-is-a-domain-name/">domain name</a>, a query travels from your end system (i.e. a web browser) to a <a href="https://www.cloudflare.com/learning/dns/what-is-recursive-dns/">recursive DNS service</a>. If the DNS record is not in the service’s local cache, the recursor will query the authoritative DNS hierarchy to find the IP address information you are looking for. The recursor is the part that DNS resolver, 1.1.1.1 plays. It must be fast and these days it must be secure!</p>
    <div>
      <h3>Goals for DNS resolver, 1.1.1.1</h3>
      <a href="#goals-for-dns-resolver-1-1-1-1">
        
      </a>
    </div>
    <p>Our goals with the public resolver are simple: Cloudflare wants to operate the fastest public resolver on the planet while raising the standard of privacy protections for users. To make the Internet faster, we are already building data centers all over the globe to reduce the distance (i.e. latency) from users to content. Eventually we want everyone to be within 10 milliseconds of at least one of our locations.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4jl1jZyKSdjvPvyEhQxtiP/314ae80aaae5f5011df13b2a61f71459/Cloudflare_and_world-population-map.png" />
            
            </figure><p>In March alone, we enabled thirty-one new data centers globally (<a href="/istanbul-not-constantinople/">Istanbul</a>, <a href="/reykjavik-cloudflares-northernmost-location/">Reykjavík</a>, <a href="/riyadh/">Riyadh</a>, <a href="/macau/">Macau</a>, <a href="/baghdad/">Baghdad</a>, <a href="/usa-expansion/">Houston, Indianapolis, Montgomery, Pittsburgh, Sacramento</a>, <a href="/mexico-city/">Mexico City</a>, <a href="/tel-aviv/">Tel Aviv</a>, <a href="/durban-and-port-louis/">Durban, Port Louis</a>, <a href="/cebu/">Cebu City</a>, <a href="/edinburgh/">Edinburgh</a>, <a href="/riga-tallinn-vilnius/">Riga, Tallinn, Vilnius</a>, <a href="/welcome-calgary-saskatoon-and-winnipeg/">Calgary, Saskatoon, Winnipeg</a>, <a href="/more-us-data-centers/">Jacksonville, Memphis, Tallahassee</a>, <a href="/bogota/">Bogotá</a>, <a href="/luxembourg-chisinau/">Luxembourg City, Chișinău</a>) and just like every other city in our network, new sites run DNS Resolver, 1.1.1.1 on day-one!</p><p>Our fast and highly distributed network is built to serve any protocol and we are currently the fastest authoritative DNS provider on the Internet, a capability enjoyed by over seven million Internet properties. Plus, we already provide an anycast service to two of the thirteen root nameservers. The next logical step was to provide faster recursive DNS service for users. Our recursor can take advantage of the authoritative servers that are co-located with us, resulting in faster lookups for all domain names.</p><p>While <a href="https://www.cloudflare.com/dns/dnssec/how-dnssec-works/">DNSSEC</a> ensures integrity of data between a resolver and an authoritative server, it does not protect the privacy of the “last mile” towards you. DNS resolver, 1.1.1.1, supports both emerging DNS privacy standards - DNS-over-TLS, and DNS-over-HTTPS, which both provide last mile encryption to keep your DNS queries private and free from tampering.</p>
    <div>
      <h3>Making our resolver privacy conscious</h3>
      <a href="#making-our-resolver-privacy-conscious">
        
      </a>
    </div>
    <p>Historically, recursor sends the full domain name to any intermediary as it finds its way to the <a href="https://www.cloudflare.com/learning/dns/glossary/dns-root-server/">root or authoritative DNS</a>. This meant that if you were going to <a href="https://www.cloudflare.com">www.cloudflare.com</a>, the root server and the .com server would both be queried with the full domain name (i.e. the <code>www</code>, the <code>cloudflare</code>, and the <code>com</code> parts), even though the root servers just need to redirect the recursive to dot com (independent of anything else in the fully qualified domain name). This ease of access to all this personal browsing information via DNS presents a grave privacy concern to many. This has been addressed by several resolvers’ software packages, though not all solutions have been widely adapted or deployed.</p><p>The DNS resolver, 1.1.1.1, provides, on day-one, all defined and proposed DNS privacy-protection mechanisms for use between the stub resolver and recursive resolver. For those not familiar, a stub resolver is a component of your operating system that talks to the recursive resolver. By only using DNS Query Name Minimisation defined in <a href="https://tools.ietf.org/html/rfc7816">RFC7816</a>, DNS resolver, 1.1.1.1, reduces the information leaked to intermediary DNS servers, like the root and <a href="https://www.cloudflare.com/learning/dns/top-level-domain/">TLDs</a>. That means that DNS resolver, 1.1.1.1, only sends just enough of the name for the authority to tell the resolver where to ask the next question.</p><p>The DNS resolver, 1.1.1.1, is also supporting privacy-enabled TLS queries on port 853 (<a href="https://www.cloudflare.com/learning/dns/dns-over-tls/">DNS over TLS</a>), so we can keep queries hidden from snooping networks. Furthermore, by offering the experimental DoH (<a href="https://developers.cloudflare.com/1.1.1.1/dns-over-https/">DNS over HTTPS</a>) protocol, we improve both privacy and a number of future speedups for end users, as browsers and other applications can now mix DNS and HTTPS traffic into one single connection.</p><p>With DNS aggressive negative caching, as described in <a href="https://tools.ietf.org/html/rfc8198">RFC8198</a>, we can further decrease the load on the global DNS system. This technique first tries to use the existing resolvers negative cache which keeps negative (or non-existent) information around for a period of time. For zones signed with DNSSEC and from the NSEC records in cache, the resolver can figure out if the requested name does NOT exist without doing any further query. So if you type <code>wwwwwww</code> dot something and then <code>wwww</code> dot something, the second query could well be answered with a very quick “no” (NXDOMAIN in the DNS world). Aggressive negative caching works only with DNSSEC signed zones, which includes both the root and a 1400 out of 1544 TLDs are signed today.</p><p>We use <a href="/dnssec-an-introduction/">DNSSEC</a> validation when possible, as that allows us to be sure the answers are accurate and untampered with. The cost of signature verifications is low, and the potential savings we get from aggressive negative caching more than make up for that. We want our users to trust the answers we give out, and thus perform all possible checks to avoid giving bad answers to the clients.</p><p>However, <a href="/dnssec-complexities-and-considerations/">DNSSEC</a> is very unforgiving. Errors in DNSSEC configuration by authoritative DNS operators can make such misconfigured domains unresolvable. To work around this problem, Cloudflare will configure "Negative Trust Anchors" on domains with detected and vetted DNSSEC errors and remove them once the configuration is rectified by authoritative operators. This limits the impact of broken DNSSEC domains by temporarily disabling DNSSEC validation for a specific misconfigured domain, restoring access to end consumers.</p>
    <div>
      <h3>How did we build it?</h3>
      <a href="#how-did-we-build-it">
        
      </a>
    </div>
    <p>Initially, we thought about building our own resolver, but rejected that approach due to complexity and go-to-market considerations. Then we looked at all open source resolvers on the market; from this long list we narrowed our choices down to two or three that would be suitable to meet most of the project goals. In the end, we decided to build the system around the <a href="https://www.knot-resolver.cz/">Knot Resolver from CZ NIC</a>. This is a modern resolver that was originally released about two and a half years ago. By selecting the Knot Resolver, we also increase software diversity. The tipping point was that it had more of the core features we wanted, with a modular architecture similar to <a href="https://openresty.org/">OpenResty</a>. The Knot Resolver is in active use and development.</p>
    <div>
      <h3>Interesting things we do that no one else does</h3>
      <a href="#interesting-things-we-do-that-no-one-else-does">
        
      </a>
    </div>
    <p>The recent advanced features we wanted were:</p><ul><li><p>Query Minimization <a href="https://tools.ietf.org/html/rfc7816">RFC7816</a>,</p></li><li><p>DNS-over-TLS (Transport Layer Security) <a href="https://tools.ietf.org/html/rfc7858">RFC7858</a>,</p></li><li><p>DNS-over-HTTPS protocol <a href="https://datatracker.ietf.org/wg/doh/about/">DoH</a>,</p></li><li><p>Aggressive negative answers <a href="https://tools.ietf.org/html/rfc8198">RFC8198</a>,</p></li></ul><p>Small disclaimer: the original main developer of Knot Resolver, <a href="/author/marek/">Marek Vavruša</a>, has been working on the Cloudflare DNS team for over two years.</p>
    <div>
      <h3>How to make our resolver faster</h3>
      <a href="#how-to-make-our-resolver-faster">
        
      </a>
    </div>
    <p>There are many factors that affect how fast a resolver is. The first and foremost is: can it answer from cache? If it can, then the time to answer is only the <a href="https://www.cloudflare.com/learning/cdn/glossary/round-trip-time-rtt/">round-trip time</a> for a packet from the client to the resolver.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4r4HfabYK6zlyJU7VIpsXb/60d4400700a3b64720866680225ad704/1.1.1.1-dns-resolver-performance.png" />
            
            </figure><p>When a resolver needs to get an answer from an authority, things get a bit more complicated. A resolver needs to follow the DNS hierarchy to resolve a name, which means it has to talk to multiple authoritative servers starting at the root. For example, our resolver in Buenos Aires, Argentina will take longer to follow a DNS hierarchy than our resolver in Frankfurt, Germany because of its proximity to the authoritative servers. In order to get around this issue we prefill our cache, out-of-band, for popular names, which means when an actual query comes in, responses can be fetched from cache which is much faster. Over the next few weeks we will post blogs about some of the other things we are doing to make the resolver faster and better, Including our fast caching.</p><p>One issue with our expansive network is that the cache hit ratio is inversely proportional to the number of nodes configured in each data center. If there was only one node in a data center that’s nearest to you, you could be sure that if you ask the same query twice, you would get a cached answer the second time. However, as there’s hundreds of nodes in each of our data centers, you might get an uncached response, paying the latency-price for each request. One common solution is to put a <a href="https://www.cloudflare.com/application-services/products/load-balancing/">caching load balancer</a> in front of all your resolvers, which unfortunately introduces a single-point-of-failure. We don’t do single-point-of-failures.</p><p>Instead of relying on a centralized cache, DNS resolver, 1.1.1.1, uses an innovative distributed cache, which we will talk about in a later blog.</p>
    <div>
      <h3>Data Policy</h3>
      <a href="#data-policy">
        
      </a>
    </div>
    <p>Here’s the deal - we don’t store client IP addresses never, ever, and we only use query names for things that improve DNS resolver performance (such as prefill all caches based on popular domains in a region and/or after obfuscation, APNIC research).</p><p>Cloudflare will never store any information in our logs that identifies an end user, and all logs collected by our public resolver will be deleted within 24 hours. We will continue to abide by our <a href="https://developers.cloudflare.com/1.1.1.1/privacy">privacy policy</a> and ensure that no user data is sold to advertisers or used to target consumers.</p>
    <div>
      <h3>Setting it up</h3>
      <a href="#setting-it-up">
        
      </a>
    </div>
    <p>See <a href="https://1.1.1.1/">https://1.1.1.1/</a> because it's that simple!</p>
    <div>
      <h3>About those addresses</h3>
      <a href="#about-those-addresses">
        
      </a>
    </div>
    <p>We are grateful to APNIC, our partner for the IPv4 addresses <code>1.0.0.1</code> and <code>1.1.1.1</code> (which everyone agrees is insanely easy to remember). Without their years of research and testing, these addresses would be impossible to bring into production. Yet, we still have a way to go with that. Stay tuned to hear about our adventures with those IPs in future blogs.</p><p>For IPv6, we have chosen <code>2606:4700:4700::1111</code> and <code>2606:4700:4700::1001</code> for our service. It’s not as easy to get cool IPv6 addresses; however, we’ve picked an address that only uses digits.</p><p>But why use easy to remember addresses? What’s special about public resolvers? While we use names for nearly everything we do; however, there needs to be that first step in the process and that’s where these number come in. We need a number entered into whatever computer or connected device you’re using in order to find a resolver service.</p><p>Anyone on the internet can use our public resolver and you can see how to do that by visiting <a href="https://1.1.1.1/">https://1.1.1.1/</a> and clicking on <b>GET STARTED</b>.</p>
    <div>
      <h3>Why announce it on April first?</h3>
      <a href="#why-announce-it-on-april-first">
        
      </a>
    </div>
    <p>For most of the world, Sunday is 1/4/2018 (in America the day/month is reversed as-in 4/1/2018). Do you see the <b>4</b> and the <b>1</b>? We did and that’s why we are announcing <b>1.1.1.1</b> today. Four ones! If it helps you remember <b>1.1.1.1</b>, then that’s a good thing!</p><p>Sure, It’s also <a href="https://en.wikipedia.org/wiki/April_Fools%27_Day">April Fools' Day</a> and for a good portion of people it’s a day for jokes, foolishness, or harmless pranks. This is no joke, this is no prank, this is no foolish act. This is DNS Resolver, <a href="https://1.1.1.1/">1.1.1.1</a> ! Follow it at <a href="https://twitter.com/hashtag/1dot1dot1dot1">#1dot1dot1dot1</a></p> ]]></content:encoded>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[1.1.1.1]]></category>
            <category><![CDATA[Privacy]]></category>
            <category><![CDATA[Resolver]]></category>
            <category><![CDATA[Product News]]></category>
            <guid isPermaLink="false">6jPV59BfkHGXRqo03yj35k</guid>
            <dc:creator>Ólafur Guðmundsson</dc:creator>
        </item>
        <item>
            <title><![CDATA[It’s Hard To Change The Keys To The Internet And It Involves Destroying HSM’s]]></title>
            <link>https://blog.cloudflare.com/its-hard-to-change-the-keys-to-the-internet-and-it-involves-destroying-hsms/</link>
            <pubDate>Tue, 06 Feb 2018 22:33:19 GMT</pubDate>
            <description><![CDATA[ The root of the DNS tree has been using DNSSEC to protect the zone content since 2010. DNSSEC is simply a mechanism to provide cryptographic signatures alongside DNS records that can be validated, i.e. prove the answer is correct and has not been tampered with.  ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Photo by <a href="https://unsplash.com/@niko_photos?utm_source=ghost&amp;utm_medium=referral&amp;utm_campaign=api-credit">Niko Soikkeli</a> / <a href="https://unsplash.com/?utm_source=ghost&amp;utm_medium=referral&amp;utm_campaign=api-credit">Unsplash</a></p><p>The root of the DNS tree has been using DNSSEC to protect the zone content since 2010. DNSSEC is simply a mechanism to provide cryptographic signatures alongside DNS records that can be validated, i.e. prove the answer is correct and has not been tampered with. To learn more about why DNSSEC is important, you can read our <a href="/dnssec-an-introduction/">earlier blog post</a>.</p><p>Today, the root zone is signed with a 2048 bit RSA “Trust Anchor” key. This key is used to sign further keys and is used to establish the <a href="https://en.wikipedia.org/wiki/Chain_of_trust">Chain of trust</a> that exists in the public DNS at the moment.</p><p>With access to this root Trust Anchor, it would be possible to re-sign the DNS tree and tamper with the content of DNS records on any domain, implementing an on-path DNS attack… without causing recursors and resolvers to consider the data invalid.</p><p>As explained in this <a href="https://www.cloudflare.com/dns/dnssec/root-signing-ceremony/">blog</a> the key is very well protected with eye scanners and fingerprint readers and fire-breathing dragons patrolling the gate (okay, maybe not dragons). Operationally though, the root zone uses two different keys, the mentioned Trust Anchor key (that is called the Key Signing Key or KSK for short) and the Zone Signing Key (ZSK).</p><p>The ZSK (Zone Signing Key) is used to generate signatures for all of the Resource Records (RRs) in a zone.</p><p>You can query for the DNSSEC signature (the RRSIG record) of “<a href="http://www.cloudflare.com">www.cloudflare.com</a>” using your friendly dig command.</p>
            <pre><code>$ dig www.cloudflare.com +dnssec</code></pre>
            
            <pre><code>;; QUESTION SECTION:
;www.cloudflare.com.		IN	A
;; ANSWER SECTION:
www.cloudflare.com.	4	IN	A	198.41.215.162
www.cloudflare.com.	4	IN	A	198.41.214.162
www.cloudflare.com.	4	IN	RRSIG	A 13 3 5 20180207170906 20180205150906 35273 cloudflare.com. 4W4mJXJRnd/wHnDyNo5minGvZY6hVNSXITnUI+pO6fzhnkpsEp1ko8K7 1PQ6r0s9SwLgrgfneqXyPs4b5X0YDw==</code></pre>
            <p>The two A records shown here can be cryptographically verified using the RRSIG and ZSK in the zone. The ZSK can itself be verified using the KSK, and so on… this continues upwards following the “chain of trust” until the root KSK is found.</p><p>The <a href="http://dnsviz.net/">http://dnsviz.net/</a> tool can be used to help visualize how this verification can be done for any domain on the internet, for example here is the trust chain for “<a href="http://www.cloudflare.com”">www.cloudflare.com”</a>.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5XNseB8e3GOtwhK8uckjfV/7f8bc719d84fcdd0844152bc2b6dd56b/Screen-Shot-2018-02-06-at-1.58.42-PM.png" />
            
            </figure><p>To verify the RRSIG on “<a href="http://www.cloudflare.com”">www.cloudflare.com”</a> we would need to cryptographically verify the signatures in reverse order on the diagram. First “cloudflare.com”, then “com”, and finally “.” – the root zone.</p><p>If you are able to access the secret key that’s used to sign the root, it’s possible to trick resolvers into verifying a "forged" answer.</p><p>While this DNSSEC signing has been deployed on the root zone, for over seven years, there is one operation that has never been attempted: rolling the Key Signing Key. This means to generate a new key and update every part of DNS infrastructure on the internet that needs it, retiring the old one completely.</p><p>The ZSK (Zone Signing Key) has been rolled religiously every quarter since 2010, however rolling the Key Signing Key is a much scarier operation. If it goes wrong it could leave the root zone signing invalid, meaning a large part of the internet would not trust any of the content, effectively knocking DNS offline for validating resolvers. After DNSSEC was designed, a mechanism was devised for rolling out a new Key Signing Key in RFC5011, this operation is commonly known as the 5011 roll-over.</p>
    <div>
      <h3>What is a KEY rollover?</h3>
      <a href="#what-is-a-key-rollover">
        
      </a>
    </div>
    <p>All cryptographic keys have a life cycle that can represented by states:Generated == the key is created but only the “owner” knows of its properties.Published == the key has been made public either as a public key or a hash of it.Active == the key is in useRetired == the has been withdrawn from service but is still publishedRevoked == they key has been marked as not to be trusted ever again.Removed == taken out of publication</p><p>Different keys move through the states in different ways depending on the usage, for example some keys are never revoked, just removing them is sufficient, for example the root ZSK’s are never revoked. When rolled, the root KSK will pass through all states.</p>
    <div>
      <h3>Why is the Root KSK different ?</h3>
      <a href="#why-is-the-root-ksk-different">
        
      </a>
    </div>
    <p>For most keys used in DNS the trust is derived by a relationship between the parent zone and the child zone. The parent publishes a special record, the DS (Delegation Signer), that contains cryptographically strong binding to the actual key, a hash. The child has a DNSKEY RRset at the top of its zone that has at least one key that matches one of the DS records in the parent. To complete the chain of trust the DNSKEY RRset MUST be signed by that key.</p><p>The root zone has no parent, thus trust cannot be derived in the same way. Instead, validating resolvers must be configured with the root Trust Anchor. This anchor must be refreshed during a key rollover or the validating resolver will not trust anything it sees in the root zone after the old KSK (from 2010) is retired from service. The Trust Anchors can be updated in a number of ways, such as a manual update, a software update, or an in-band update. The preferred update mechanism is the previously mentioned in-band update mechanism RFC5011-roll.</p><p>The process outlined in RFC 5011 relies on two factors, first that the new key is published in the DNSKEY RRset – which is signed by the old KSK, and is kept there for at least a hold-down period of 30 days. Validating resolvers that follow the procedure will check frequently to see if there is a new KSK in the DNSKEY set. The new key can be trusted because it has been signed with a key that is already in service. When there is new key, it is placed in PendingAddition state If at any point one of the key’s in PendingAddition is removed from the DNSKEY set, the resolver will forget about it. This means that if the key were to appear again, it would start a new 30 day hold-down period.</p><p>After the key has been in PendingAddtional for 30 consecutive days it is accepted into Active state and will be trusted to sign the DNSKEY set for the root. From this point onwards, the new key can be used to sign the Zone Signing Key, and in turn the root zone content itself.</p>
    <div>
      <h3>Why are we rolling the root key trust anchor?</h3>
      <a href="#why-are-we-rolling-the-root-key-trust-anchor">
        
      </a>
    </div>
    <p>There are two main reasons;</p><ol><li><p>The community wants to be a sure that the RFC5011 mechanism works in practice. Knowing this makes future rollovers possible, and less risky. Regular rollovers are something to be done as a matter of good key hygiene, like changing your password regularly</p></li><li><p>Enables thinking about switching to different algorithms. RSA with a large key size is a strong algorithm, but using it causes DNS packets to be larger. There are other algorithms like the ones that Cloudflare uses that are based on elliptic curves have smaller keys but increased safety per bit. To switch to a new algorithm would require a new key.</p></li></ol><p>Some people advocated rolling the key and changing the algorithm at the same time but that was deemed too risky. The right time to start talking about that is after the current roll concludes successfully.</p>
    <div>
      <h3>What has happened so far?</h3>
      <a href="#what-has-happened-so-far">
        
      </a>
    </div>
    <p><a href="https://www.icann.org/en/system/files/files/ksk-rollover-operational-implementation-plan-22jul16-en.pdf">ICANN started the rollover process last year</a>. The new keys has been created and replicated to all the <a href="https://en.wikipedia.org/wiki/Hardware_security_module">HSM’s (Hardware Security Modules)</a> in the two facilities that ICANN operates. From now on we will use the terms <b>KSK2010 (the old key)</b> and <b>KSK2017 (the new key)</b>.</p><p>Before starting the roll-over process, testing of RFC5011 implementations took place and most implementations reported success.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4muimZ8Ndzr9qyosAIIIFt/b5fc9a1b736e33a15e6cf378377686f1/Screen-Shot-2018-02-05-at-7.46.40-PM.png" />
            
            </figure><p>The new key was published in DNS on July 11th 2017, thus the DNSKEY set now contains two KSKs. At that point the new key/KSK2017 has entered Published state. It was scheduled to become Active on October 11th 2017. Any validating resolver that has been operating for at least 30 days during the July 11-October 11 window should have placed the new Trust Anchor in “Active” state before October 11th. But sometimes things do not go according to plan.</p><p>One of the things that was put in place before the rollover was a way for <a href="https://tools.ietf.org/html/rfc8145">resolvers to signal to authoritative servers what trust anchor the resolver trusts RFC8145</a>. RFC8145 was only published in April 2017, thus during the KSK2017 key publication phase, only the latest version of Bind-9 supported it by default.</p><p>The mechanism works by resolvers periodically sending a query to the root nodes, with a query name formatted like “_ta-4a5c” or “_ta-4a5c-4f66”. The name contains HEX encoded versions of the Trust Anchor identifiers, 19036 and 20326 respectively. This at least allows root operators to estimate the % of resolvers that have implemented RFC8145 AND are aware of each Trust Anchor.</p><p>On September 29 <a href="https://www.icann.org/news/announcement-2017-09-27-en">ICANN postponed the roll</a> based on evidence from the resolvers that sent in reports.It was concerning that the latest and <a href="https://www.icann.org/news/blog/update-on-the-root-ksk-rollover-project">greatest version of Bind-9 in 4%</a> of cases did not pick up the new Trust Anchor, this was explained in more detail in a <a href="https://indico.dns-oarc.net/event/27/session/1/contribution/11/material/slides/0.pdf">DNS-OARC presentation</a>. But this still leaves us with the question, why?</p><p>It is also important to note that although other implementations of RFC8145 did not enable it by default thus most of the reports were by Bind-9.</p><p>Rolling the KSK at this point would have resulted in the remaining resolvers not trusting the content of the root zone, ultimately breaking all DNS resolution through them.</p>
    <div>
      <h3>Operational reality vs the protocol design</h3>
      <a href="#operational-reality-vs-the-protocol-design">
        
      </a>
    </div>
    <p>At Cloudflare we operate validating resolvers in all of our &gt;120 data centers, and we monitored the adoption of trust anchors on a weekly basis, expecting everything to work correctly. After 6 weeks we noticed that things were not going right, some of the resolvers had picked up the new trust anchor and others had not accepted the new trust anchor even though more than enough time had passed.</p><p>First let’s look at the assumptions that RFC5011 makes.</p><ul><li><p>The resolver is a long running process that understands time and and can keep state</p></li><li><p>The resolver has access to persistent writeable storage that will work across reboots.</p></li></ul><p>In the protocol community we had worried about the first one a lot, for the second one we had identified two failure cases: machine configured from old read-only medium, and new machine takes over. Both were considered rare enough and operators would know to deal with those exceptions.</p><p>Turns out the second assumption in RFC5011 had more failure modes than the community expected.</p><p>For example in Bind-9, it originally had a hardcoded list of “trusted-keys”. Later when RFC5011 support was added the configuration option “managed-keys” was added. It looks like some installations while religiously updating the software never changed from the fixed configuration to the RFC5011 managed one. In this case the only recovery is to change the configuration, and in some cases the operator selected this operating mode assuming he/she would distribute a new configuration file during rollover, but the person may have left or forgotten.</p><p>Software that uses managed-keys operations (Bind-9, Unbound, Knot-resolver) uses a file to maintain state between restarts. BUT it is possible that the file is read-only and in that case managed-keys works just like trusted-keys. Why anyone would have a configuration like that is a good question? The interesting obersevation is that unless the implementation complains loudly about the read-only state, the operator is not likely to notice. The only recovery option here is to change the configuration so the trust anchor file can be written.</p><p>Software upgrades are another possible reason for not picking up the new trust anchor, but only if the file containing the Trust Anchor state is overwritten or lost. This can happen if the resolver machine has a disk replacement/reformat etc. but in this case the net effect is only slowing down the acceptance of the new trust anchor. This failure is visible as as KSK2017 spends more than 30 days in state “PendingAddition” but that is only visible if someone is looking.</p><p>Modern operating practices use “containers” that are spun up and down, in those cases there is no “persistent” storage. To avoid validation errors in this case the software installed must know about the new key or perform a key discovery upon startup like the <a href="https://www.unbound.net/documentation/unbound-anchor.html">unbound-anchor</a> program performs for Unbound.</p><p>There are probably few other reasons where operations may cause the errors seen by the Trust Anchor Signaling.</p><p>Back to what happened at Cloudflare? In our case the issue was a combination of upgrades and container issues. We were upgrading software on all our nodes and our resolver processes were allocated to different computers. Our fix was to quickly upgrade to a software version that knew about the new trust anchor, so future restarts/migrations would not cause loss in trust.</p>
    <div>
      <h3>What is next for the KSK rollover</h3>
      <a href="#what-is-next-for-the-ksk-rollover">
        
      </a>
    </div>
    <p>ICANN has just asked for comments on restarting the rollover process and <a href="https://www.icann.org/news/blog/announcing-draft-plan-for-continuing-with-the-ksk-roll">perform the roll on October 11th 2018</a>.</p><p>What can you do to prepare for the key rollover?If you operate a validating resolver, make sure you have the latest version of your vendors software, audit the configuration files and file permissions and check that your software supports both KSK2010 (key tag 19036) and KSK2017 (key tag <b>20326</b>).</p><p>If you are a concerned end user right now there is nothing you can do, but the IETF is considering a proposal <a href="https://datatracker.ietf.org/doc/draft-ietf-dnsop-kskroll-sentinel/?include_text=1">to allow remote trust anchor checking via queries</a>. Hopefully this will be standardized soon and DNS resolver software vendors add support, but until then there is no testing possible by you.</p><p>If you speak languages other than English and you worry about your local operators should know about the DNSSEC Key Rollover failure modes, feel free to republish this blog or parts of it in your language.</p>
    <div>
      <h3>HSM destruction at the next KSK ceremony Feb 7th 2018</h3>
      <a href="#hsm-destruction-at-the-next-ksk-ceremony-feb-7th-2018">
        
      </a>
    </div>
    <p>Every quarter there is a new KSK signing ceremony where signatures for 3 months of use of the KSK are generated. <a href="https://www.iana.org/dnssec/ceremonies/32">February 6th 2018 is the next one</a> and it will sign a DNSKEY set with both KSKs but only signed by KSK2010 . You can see the script for the ceremony here and you can even watch it online. But the fun part of this particular ceremony is the destruction of old HSM (Hardware Security Module), via some fancy contraption.</p><p>An HSM is a special kind of equipment that can store private keys and never leak them, and protects its secrets by erasing them when someone tries to access/tamper with the equipment. The secrets remain in the HSM as long as a non-replaceable battery lasts. The old KSK HSMs have a lifetime of 10 years and were made in late 2009 or early 2010 thus the battery is not designed to last much longer. Last year the private keys were safely and securly moved to newer models and the new machines have been in use for about a year. The final step of retiring the old machines is to destroy them during the ceremony, tune in to see how that is done.</p><p>Excited by working on cutting edge stuff? Or building systems at a scale where once-in-a-decade problems can get triggered every day? <a href="https://www.cloudflare.com/careers/">Then join our team</a>.</p> ]]></content:encoded>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[DNSSEC]]></category>
            <category><![CDATA[Reliability]]></category>
            <guid isPermaLink="false">6oKXZMilsKD2I3Cq90yIo0</guid>
            <dc:creator>Ólafur Guðmundsson</dc:creator>
        </item>
        <item>
            <title><![CDATA[What happened next: the deprecation of ANY]]></title>
            <link>https://blog.cloudflare.com/what-happened-next-the-deprecation-of-any/</link>
            <pubDate>Wed, 13 Apr 2016 12:39:32 GMT</pubDate>
            <description><![CDATA[ Almost a year ago, we announced that we were going to stop answering DNS ANY queries. We were prompted by a number of factors: The lack of legitimate ANY use. The abundance of malicious ANY use. The constant use of ANY queries in large DNS amplification DDoS attacks. ]]></description>
            <content:encoded><![CDATA[ <p>Almost a year ago, we announced that we were going to <a href="/deprecating-dns-any-meta-query-type/">stop answering DNS ANY</a> queries. We were prompted by a number of factors:</p><ol><li><p>The lack of legitimate ANY use.</p></li><li><p>The abundance of malicious ANY use.</p></li><li><p>The constant use of ANY queries in large DNS amplification DDoS attacks.</p></li></ol><p>Additionally, we were about to launch <a href="https://www.cloudflare.com/dnssec/universal-dnssec/">Universal DNSSEC</a>, and we could foresee the high cost of assembling ANY answers and providing DNSSEC-on-the-fly for those answers, especially when most of the time, those ANY answers were for malicious, illegitimate, clients.</p>
            <figure>
            <a href="https://dnsreactions.tumblr.com/post/115111883802/cloudflare-responds-to-qtype-any">
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/76VgmR1nSYbfIkKmmZ7tFC/3dfbf14246951cb4c2bd2d914e24b603/Screen-Shot-2016-04-13-at-9-49-31-AM.png" />
            </a>
            </figure><p>Although we usually make a tremendous effort to maintain backwards compatibility across Internet protocols (recently, for example, continuing to support <a href="/sha-1-deprecation-no-browser-left-behind/">SHA-1-based SSL certificates</a>), it was clear to us that the DNS ANY query was something that was better removed from the Internet than maintained for general use.</p><p>Our proposal at the time was to return an ERROR code to the querier telling them that ANY was not supported, and this sparked a robust discussion in the DNS protocol community. In this blog post, we’ll cover what has happened and what our final plan is.</p><p>Just before we published our blog a popular software started using ANY queries, to get all address records for a name -- something that ANY isn’t actually designed to do. The effect of this software was that our steady ANY query load had grown from few hundred per second to tens of thousands in a matter of days. Luckily, the software in question issued a revised version that did not use ANY, and our steady ANY query load returned to the old level.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2hiSIjgf7eL3dVpclsjVMK/457b1fed76df1399beb02ef158542019/5719368307_7475b5594c_z.jpg" />
            
            </figure><p><a href="https://creativecommons.org/licenses/by-sa/2.0/">CC BY-SA 2.0</a> <a href="https://www.flickr.com/photos/liamq/5719368307/in/photolist-9HpfWp-7vpC9Y-7nQmx5-q1mALK-2NP1Dj-9tSNAV-fs6aGK-9YGHL4-a2MX7m-pdavta-9YG3s2-9HMRfG-vyBqdd-57eEb7-nVMdGs-9XmtSF-9LzUNq-9Hsn2o-ijY6d-stqR-9s2yQP-9UQ1he-9HsbT7-9USt79-8rJpfT-zRD2us-q1fiy4-vReb9v-87zVLF-dix1Mc-bkvWid-9YGk6z-8rVUX-ibFyKE-JNes5-4ZTY63-9Hpsuk-ak22cF-8AYnAR-9rCCPK-7wLkFs-9LzY73-oG2GwQ-3YN2wN-9UQ1Zx-2VDgHs-rgq9Tv-9pTXeC-vQB1HW-pkU3qT">image</a> by <a href="https://www.flickr.com/photos/liamq/">Liam Quinn</a></p>
    <div>
      <h3>The Conversation in the DNS Community</h3>
      <a href="#the-conversation-in-the-dns-community">
        
      </a>
    </div>
    <p>As that was happening, a lively discussion started to form among those in the DNS community. The first fundamental question that had to be answered was: “Does ANY mean ALL?”. That is, was an ANY query meant to be a way to receive all of the records in a zone for the query name?</p><p>Different people had different interpretations of ANY depending on the kind of DNS service they were providing. For example, it is nice as an operator of a DNS resolver to be able to ask your own resolver, “what is stored in the resolver memory/cache for a particular name?”. An ANY query with the right query flags can help answer that. On the other hand, an operator of an authoritative server does not need that functionality, as AXFR provides another reliable way to get that information. In short, the ANY query is a nice tool for people that are trying to understand what is going on in DNS resolution. Some community members argued that ANY should be a restricted query to a privileged few that have the need to know.</p><p>While ANY can be a nice tool to debug and expose inconsistencies in resolver caches, it’s still not a great tool: with more and more Anycast resolver clusters, there is no guarantee that two subsequent queries will hit the same resolver.</p>
    <div>
      <h3>Why is answering ANY expensive for some DNS providers like CloudFlare?</h3>
      <a href="#why-is-answering-any-expensive-for-some-dns-providers-like-cloudflare">
        
      </a>
    </div>
    <p>Our in-house DNS server is optimized to provide dynamic answers to questions. For example, depending on how a CNAME is configured, our server may return the CNAME, fetch the real answer from the target of the CNAME (what we call <a href="/introducing-cname-flattening-rfc-compliant-cnames-at-a-domains-root/">CNAME Flattening</a>), or provide CloudFlare addresses as answers. Thus for us to answer an ANY query, we need to compute all of the possible combinations just to know what to return.</p><p>Beyond that, our DNSSEC implementation signs answers on-the-fly. Thus, returning an answer with many different types of DNS records in the answer requires signing all of them at the edge. Thus providing support for ANY in the “traditional” sense had serious computational and response time implications. This is not unique to CloudFlare; we are not the only DNS implementation that has this high cost factor in answering ANY queries.</p>
    <div>
      <h3>The use of ANY queries in DDoS attacks</h3>
      <a href="#the-use-of-any-queries-in-ddos-attacks">
        
      </a>
    </div>
    <p>In a <a href="https://www.stateoftheinternet.com/downloads/pdfs/2016-state-of-the-internet-threat-advisory-dnssec-ddos-amplification-attacks.pdf">recent paper</a> by Akamai the authors draw the conclusion that DNSSEC is the main cause of large answers used for DDoS attacks. But looking at the packet capture they included in the paper, it’s clear the real cause of the large answers is that the attackers use ANY queries to maximize the amplification factor.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/67n5OGO94a4jGEf93Gq5ce/380e90087e4e1eb00225458c77792529/542729697_fee708a68f_z.jpg" />
            
            </figure><p><a href="https://creativecommons.org/licenses/by-sa/2.0/">CC BY-SA 2.0</a> <a href="https://www.flickr.com/photos/vshioshvili/542729697/in/photolist-PXCCz-k6NoRc-cDtNZd-edwgy1-6jQXRQ-dXy1Jr-y7nBK-bc1yiX-3VM5qq-gwmAC2-f9yVtM-oRrjRG-941Srq-4S5XGd-iWWst8-osFsjb-bwNo4s-fmBA2h-gMUKvN-bSYVZ-qyv52o-j5SCMq-hbeFS5-c4YDmC-pBuq2q-7dLGEn-6yMZwa-pQBJaX-8rtb76-8G1gSm-4S6XpX-oNYyuF-8jiMY-oTjWxG-7rMR8G-4TXTS2-pBv71k-9Ti743-pugFk8-8v4Sze-pSheSw-hSNyda-qtj2GB-yvd8-9dDz1m-nMnq18-7Ky43P-tJa4Bm-8UEDst-7R5MQW">image</a> by <a href="https://www.flickr.com/photos/vshioshvili/">Vladimer Shioshvili</a></p><p>We regularly see attacks that attempt to use our powerful DNS system as a source of reflection. We have in response to this created sophisticated systems to detect the attacks and mitigate them in a responsible manner. Our deprecation of ANY is a key part of those protections. One of our main mantra is “<i>do not return larger than needed answers</i>”, exactly to help protect others on the Internet from amplification attacks.</p>
    <div>
      <h3>Evolution of “Suppress ANY” in the DNS protocol community</h3>
      <a href="#evolution-of-suppress-any-in-the-dns-protocol-community">
        
      </a>
    </div>
    <p>Soon after we announced our planned deprecation of ANY, we <a href="https://tools.ietf.org/html/draft-ogud-dnsop-acl-metaqueries-00">submitted an Internet Draft</a> to the IETF proposing to restrict ANY queries to authorized parties only. In the resulting discussion, it became clear that what mattered here was how we deprecated ANY. To make sure no system was adversely affected, we had to take into account how various applications and DNS implementations were using ANY.</p><p>In short, there are two main uses of ANY queries:</p><ol><li><p>Some programs use ANY as a probabilistic optimization attempt to get the answers they need.</p></li><li><p>Some use ANY to debug DNS resolvers when things go wrong.</p></li></ol><p>However, neither of those use cases are satisfied by the current ANY landscape. There is a lack of common behavior among resolvers as to how they treat answers that are cached as a result of an ANY query. Some will return this data when a more specific query matches, while other resolvers will fetch the exact requested data, even though they already have it in cache from an ANY query. This is because resolvers interpret <a href="https://tools.ietf.org/html/rfc2181">RFC2181</a> section 5.4.1 (Ranking Data) in differing ways, and some resolvers were written without applying the rules from RFC2181 at all. Some resolvers will not forward ANY queries to authoritative servers if there exists a single RRset for that name in the resolver’s cache, and others will forward it unless they have a prior ANY answer in the cache. Furthermore, some resolvers will only reuse the results of an ANY query to answer other ANY queries, queries for all other types will result in a direct query for the type requested.</p><p>In many cases, the ANY query results in an answer that is too large to fit in the UDP packet size requested, resulting in a truncated answer, leading to a follow up via TCP. For a while, the DNS community believed that returning truncated answers would stop attacks, but in reality, that will only mitigate simple attacks using forged packets. In attacks that are reflected via open resolvers, returning truncated packets will not work because the open resolvers are happy to fall back to TCP if the UDP answer sets the truncate bit.</p><p>So, there is no common understanding of how the ANY query should be treated to minimize its amplification potential. To be fair, the ANY query is a special type of query called a meta-query i.e. it is not an actual type. Nevertheless, the community was divided into two camps: “ANY == ALL” and “ANY != ALL”.</p><p>The community was also further divided into groups of “ANY is ok for everyone” and “ANY should be restricted to “good” clients”. Our position from the beginning was that “ANY != ALL” and we were looking for a way to help curb the number of large amplified attacks on the Internet that used ANY.</p><p>Over a few months, we engaged in a number of experiments to see how different DNS systems reacted to different non-ANY responses to the ANY query. After a fair amount of experimentation and discussions with colleagues around the world, we decided on an approach that is <i>recursive resolver centric</i>. What we wanted to do was to give answers that are friendly to recursive resolvers, i.e. we give them something small that they can cache and return to repeated ANY queries. Returning an error to a recursive resolver was not a good option, as the resolver will just ask the next authoritative server and visit all the authoritative servers before giving up.</p><p>We also wanted to avoid guessing the intention of the originator of the query, which is why we did not follow one proposal to give out the A+AAAA+MX records or a CNAME if one existed. We do not like that, as the answer is bigger than it has to be and there is more data in the answer than the originator wanted.</p><p>For example, consider an email server that wants an MX record if one exists, but will fallback to an IP address if the MX does not exist. Instead, we decided to return what we call a “harmless” answer––an answer that is not useful for any application on the Internet. We selected an old DNS record type that is not used much anymore, but has the nice property that all test tools display as text: <i>HINFO</i>. This approach is documented in the current Internet Draft <a href="https://datatracker.ietf.org/doc/draft-ietf-dnsop-refuse-any/">Refuse ANY</a> draft that was adopted by the <a href="https://datatracker.ietf.org/wg/dnsop/charter/">DNSOP working group</a> of the IETF that handles DNS protocol issues.</p><p>As you can see below, when asked for ANY, we only return one HINFO record and the optional RRSIG that is only needed when the zone is signed. This record can be cached, and has the added benefit of being small and therefore reducing the amplification factor the attacker expected.</p>
            <pre><code>; &lt;&lt;&gt;&gt; DiG 9.8.3-P1 &lt;&lt;&gt;&gt; @ns2.p31.dynect.net. amazon.com. any +dnssec +norec
; (1 server found)
;; global options: +cmd
;; Got answer:
;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 29671
;; flags: qr aa; QUERY: 1, ANSWER: 16, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags: do; udp: 4096
;; QUESTION SECTION:
;amazon.com.			IN	ANY

;; ANSWER SECTION:
amazon.com.		900	IN	SOA	dns-    external-master.amazon.com. root.amazon.com. 2010113317 180 60 3024000 60
amazon.com.		3600	IN	NS	pdns6.ultradns.co.uk.
amazon.com.		3600	IN	NS	pdns1.ultradns.net.
amazon.com.		3600	IN	NS	ns2.p31.dynect.net.
amazon.com.		3600	IN	NS	ns3.p31.dynect.net.
amazon.com.		3600	IN	NS	ns1.p31.dynect.net.
amazon.com.		3600	IN	NS	ns4.p31.dynect.net.
amazon.com.		60	IN	A	54.239.26.128
amazon.com.		60	IN	A	54.239.25.208
amazon.com.		60	IN	A	54.239.25.200
amazon.com.		60	IN	A	54.239.17.7
amazon.com.		60	IN	A	54.239.17.6
amazon.com.		60	IN	A	54.239.25.192
amazon.com.		900	IN	MX	5 amazon-smtp.amazon.com.
amazon.com.		900	IN	TXT	"spf2.0/pra include:spf1.amazon.com include:spf2.amazon.com include:amazonses.com -all"
amazon.com.		900	IN	TXT	"v=spf1 include:spf1.amazon.com include:spf2.amazon.com include:amazonses.com -all"

;; Query time: 30 msec
;; SERVER: 204.13.250.31#53(204.13.250.31)
;; WHEN: Wed Apr 13 09:57:59 2016
;; MSG SIZE  rcvd: 565</code></pre>
            <p>Unsigned answer from large internet company is 565 bytes long.</p><p>In contrast a signed answer from CloudFlare.com is only 224 bytes long or less than ½ the unsigned answer above.</p>
            <pre><code>; &lt;&lt;&gt;&gt; DiG 9.8.3-P1 &lt;&lt;&gt;&gt; cloudflare.com any @ns3.cloudflare.com +dnssec +norec
;; global options: +cmd
;; Got answer:
;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 36238
;; flags: qr aa; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags: do; udp: 512
;; QUESTION SECTION:
;cloudflare.com.			IN	ANY

;; ANSWER SECTION:
cloudflare.com.		3789	IN	HINFO	"Please stop asking for ANY" "See draft-ietf-dnsop-refuse-any"
cloudflare.com.		3789	IN	RRSIG	HINFO 13 2 3789 20160414100147 20160412080147 35273 cloudflare.com. lGyCY7IC5sgHBfE95IJXDUS4diFjE5kq4vNMhhqP6+2+NyTQh1zAh1qw 3C710mFvvuCWe4VyRiqlu1jUzMnuLg==

;; Query time: 80 msec
;; SERVER: 2400:cb00:2049:1::a29f:21#53(2400:cb00:2049:1::a29f:21)
;; WHEN: Wed Apr 13 10:01:47 2016
;; MSG SIZE  rcvd: 224</code></pre>
            <p>We have been returning the HINFO answer for ANY queries since October 2015, with very few reports of problems in the field, besides a single Twitter rant about us not understanding DNS.</p><p>A few other DNS server vendors and DNS operators have followed our lead or adopted a similar line of defense. The latest example is the <a href="http://fanf.livejournal.com/140566.html">University of Cambridge</a> which modified their BIND implementation to only return a single RRset for an <a href="https://git.csx.cam.ac.uk/x/ucs/ipreg/bind9.git/commitdiff/f8c420dd8e">ANY query</a>. A common DNS server (NSD) has also been limiting ANY responses to only A+AAAA+MX types and/or CNAME, and a <a href="https://gist.github.com/hdais/25cb3fc86335026d40f0">patch to return an even smaller answer</a> has been proposed.</p>
    <div>
      <h3>Summary</h3>
      <a href="#summary">
        
      </a>
    </div>
    <p>The moral is that the ANY query is not a useful tool for most DNS operators, but it is a wonderful tool if one is in the business of generating attacks against anyone else on the Internet. Answering ANY queries with a giant answer is not helping mitigate the plague of DoS volume attacks.</p><p>CloudFlare has taken a step to make the Internet a less hostile place and is leading by example. We strongly urge others to follow in our steps and neuter the amplification factor that a single DNS query can achieve. We all want to build a safer Internet, and neutering ANY query is one small step that everyone can take.</p> ]]></content:encoded>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[DNSSEC]]></category>
            <category><![CDATA[Reliability]]></category>
            <category><![CDATA[DDoS]]></category>
            <category><![CDATA[Attacks]]></category>
            <category><![CDATA[Security]]></category>
            <guid isPermaLink="false">2FlSGPeXk3rPYpnd9NtCZ6</guid>
            <dc:creator>Ólafur Guðmundsson</dc:creator>
        </item>
        <item>
            <title><![CDATA[Deprecating the DNS ANY meta-query type]]></title>
            <link>https://blog.cloudflare.com/deprecating-dns-any-meta-query-type/</link>
            <pubDate>Fri, 06 Mar 2015 14:33:13 GMT</pubDate>
            <description><![CDATA[ DNS, one of the oldest technologies running the Internet, keeps evolving. There is a constant stream of new developments, from DNSSEC, through DNS-over-TLS, to a plentiful supply of fresh EDNS extensions. ]]></description>
            <content:encoded><![CDATA[ <p>DNS, one of the oldest technologies running the Internet, keeps evolving. There is a constant stream of new developments, <a href="/help-us-test-our-dnssec-implementation">from DNSSEC</a>, through <a href="http://www.isi.edu/ant/tdns/">DNS-over-TLS</a>, to a plentiful supply of <a href="http://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-11">fresh EDNS extensions</a>.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7cyA2HOLAYyTdbqLf4LKeP/4854a84baf0f33715d38d72e30363f00/5220534077_8d417f3bac_z.jpg" />
            
            </figure><p><a href="https://creativecommons.org/licenses/by-nd/2.0/">CC BY-ND 2.0</a> <a href="https://www.flickr.com/photos/antarcticabound/">image</a> by <a href="https://www.flickr.com/photos/antarcticabound/">Antarctica Bound</a></p><p>New <a href="http://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-4">DNS Resource Records types</a> are being added all the time. As the Internet evolves, new RR’s gain traction while the usage of some old record types decreases. Did you know you can use DNS to express <a href="/the-weird-and-wonderful-world-of-dns-loc-records/">the location of your server on the planet's surface</a>?</p><p>Today, we are announcing that we are deprecating the DNS ANY meta-query. In a few weeks we'll be responding to those queries with rcode <a href="http://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-6">4 / Not Implemented</a>.</p><p>“ANY” is one of <a href="http://tools.ietf.org/html/rfc1035#page-12">the special “magic” types in DNS</a>. Instead of being a query for a single type like A , AAAA or MX, ANY retrieves all the available types for a given name. Over the years there have been many arguments over the semantics of ANY with some people arguing it really means ALL. Answers to ANY queries are among the biggest that DNS servers give out. The original reason for adding the ANY to DNS was to aid in debugging and testing and there is no real reason why a normal application would ever issue a ANY query.</p><p>ANY is not the only operation that lists records in DNS. The AXFR operation could be used to transfer all data for a DNS zone between two servers. A frequently recommended option is to restrict the scope of IP addresses that can perform this action and return REFUSED or drop the query for all others. The reason for this is security: people can easily learn the entire DNS zone with one command. In many case it is not okay for anyone to list all entries in your DNS zone. We believe the same holds for ANY and that an authoritative server should be allowed to refuse to answer it.</p><p>ANY queries are not widely used by any real world software. We aware of only two programs that issue ANY queries:</p><ul><li><p><a href="http://fanf.livejournal.com/122220.html">Un-patched versions qmaild</a></p></li><li><p><a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1093983">Firefox version 36.0 to 36.0.1</a></p></li></ul><p>We strongly believe using ANY query type in both those cases was a mistake and should not be endorsed.</p><p>The usage of ANY by a Firefox caught us by surprise and increased the ANY queries load 8 fold:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/LQBvUa35G7JxXCkSQ3Rgb/14166b5de06fe138bb0ef3b87621074f/any.png" />
            
            </figure><p>Since Firefox reverted the use of ANY we expect this load to drop back to the level of a background noise. Unfortunately the most common users of ANY queries in practice are people trying to perform <a href="https://www.us-cert.gov/ncas/alerts/TA13-088A">DNS reflection attacks</a>, exploiting the unusual length of the ANY responses.</p><p>Disabling or throttling ANY is not unprecedented. <a href="https://lists.dns-oarc.net/pipermail/dns-operations/2013-January/009501.html">UltraDNS disabled them</a> briefly in 2013 with little impact visible to Internet users. A number of operators have refused to answer ANY queries over UDP, forcing the traffic to TCP, with the side effect that forged ANY queries are not amplified. Similarly a number of DNS operators use QoS techniques to limit how many ANY questions they will answer per second.</p><p>Attempting to handle ANY queries creates enormous complexity in our DNS server code base. It's almost impossible to generate a proper response, anyway. Consider load-balancing, geoip, CNAME flattening features, and on-the-fly answer generation.</p><p>Due to the lack of justified uses and to avoid code complexity, we have decided to completely phase out attempting to answer meaningfully the ANY qtype. In the near future we plan on returning NOTIMP return code in response to all ANY queries to our authoritative servers. This is the most truthful answer we can give as the code to process ANY type will be removed.</p><p>If you are aware of any software that relies solely on ANY queries, now is the time to fix it.</p> ]]></content:encoded>
            <category><![CDATA[Reliability]]></category>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[DNSSEC]]></category>
            <guid isPermaLink="false">3YaaNoO3DLOOu9djuP2mWA</guid>
            <dc:creator>Marek Majkowski</dc:creator>
            <dc:creator>Ólafur Guðmundsson</dc:creator>
        </item>
        <item>
            <title><![CDATA[Updating the DNS Registration Model to Keep Pace with Today’s Internet.]]></title>
            <link>https://blog.cloudflare.com/updating-the-dns-registration-model-to-keep-pace-with-todays-internet/</link>
            <pubDate>Thu, 05 Feb 2015 18:48:17 GMT</pubDate>
            <description><![CDATA[ CloudFlare is, arguably, the largest third-party DNS Authoritative operator in the world. We manage well over 1 million domains and have registrations in almost every TLD open for registrations. ]]></description>
            <content:encoded><![CDATA[ <p>CloudFlare is, arguably, the <a href="http://solvedns.com/">largest third-party DNS Authoritative operator in the world</a>. We manage well over 1 million domains and have registrations in almost every <a href="https://www.cloudflare.com/learning/dns/top-level-domain/">TLD</a> open for registrations. Our role as a DNS operator is to maintain customer information and publish their records in the global DNS.</p><p>In this blog, we’ll introduce a significant problem that DNS operators like CloudFlare face when trying to provide the best possible experience to our customers. If you are a CloudFlare customer, you’ll remember during the sign up process you were asked to login to your registrar account in order to change your nameservers (NS). The absence of an automated process for changing NS records not only makes our signup process one step longer than we’d like, it also prevents CloudFlare, and other 3rd party DNS operators, from doing a slew of other things that would benefit customers and the Internet as a whole.</p><p><i>Note: In this blog we’ll use the term DNS Operator mainly in the context of operators that provide Authoritative DNS service. This is sometimes called Managed DNS service.</i></p>
    <div>
      <h3>Manual Updates</h3>
      <a href="#manual-updates">
        
      </a>
    </div>
    <p>For those who are not yet CloudFlare customers, let’s run through the sign up process:</p><p>When CloudFlare customers enable our DNS services for their domain, we allocate and provide them with nameservers. After the customer configures various records within their domain (e.g., A, AAAA, MX, CNAME, etc. records) on the CloudFlare system, customer’s then need to go back to their Domain Registrar and manually update their NS records so they match the NS information provided by CloudFlare. Once the NS records have been changed, CloudFlare becomes the authoritative DNS operator for that zone.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6xGSdSSJaAmdzPRXGsKMTl/95600f604567101eab60db2995d1237f/image01.png" />
            
            </figure><p>This manual process is outdated, and there is only one thing standing in the way of an automated process—the current domain industry registration model.</p>
    <div>
      <h3>The Problem with the Domain Industry Standard Registration Model</h3>
      <a href="#the-problem-with-the-domain-industry-standard-registration-model">
        
      </a>
    </div>
    <p>The <a href="https://www.cloudflare.com/products/registrar/">domain registration</a> system includes Registrants (Resellers and Registrars), Registries, and ICANN, and there are strict rules about how information flows through it:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1OisQPr4yYjNuGeQvWKoZm/91ddc13aff287140eb618f672cc30197/image00.gif" />
            
            </figure><p><i>Note: A full glossary of the terms used in this document is available from the ICANN website.</i></p><p>Notice that DNS Operators are not included in the ICANN diagram above. When this model was created, no one one thought that DNS service might be provided by someone other than Registrant and Registrar. Things have changed, but unfortunately, the system and its rules haven’t.</p><p>In nearly all cases, CloudFlare customers are using a Registrar where CloudFlare’s relationship with the customer is not explicitly expressed. The relationship can only be inferred by the NS records that point towards CloudFlare, or by the fact that nameserver addresses that are in CloudFlare address spaces. This omission of 3rd party DNS operators in the ICANN model causes operational difficulties.</p>
    <div>
      <h3>CloudFlare’s Relationship With Registries and Registrars</h3>
      <a href="#cloudflares-relationship-with-registries-and-registrars">
        
      </a>
    </div>
    <p>Operational difficulties arise currently because the only way to find the Registrar of a <a href="https://www.cloudflare.com/learning/dns/glossary/what-is-a-domain-name/">domain name</a> is to query for the “whois” information. Below is an selected output from a successful whois query:</p><p><code>Domain Name: CLOUDFLARE.COM ... Registrar WHOIS Server: whois.networksolutions.com Registrar URL: http://networksolutions.com ... Registrar: NETWORK SOLUTIONS, LLC. Registrar IANA ID: 2 ... Registrant Name: CloudFlare, Inc.</code></p><p>All domain updates (such as postal address or name server changes) go from the customer (or Registrant) to the Registrar before being sent to the Registry. As a DNS Operator, CloudFlare is separate from these R-named entities so we don’t show up in a whois query.</p><p>The difficulty is that whois information, which may contain postal addresses, telephone numbers, and/or email addresses, is designed for human consumption and human action. Because this information has historically been changed by people, there isn’t a protocol specified regarding how a DNS operator’s system can ask a <a href="https://www.cloudflare.com/learning/dns/glossary/what-is-a-domain-name-registrar/">registrar</a> for changes in delegation information in an authenticated automated way.</p>
    <div>
      <h3>A New Model: DNS Operators Communicating with Registrars and Registries</h3>
      <a href="#a-new-model-dns-operators-communicating-with-registrars-and-registries">
        
      </a>
    </div>
    <p>In the current ICANN system there are roughly three classes of DNS operators. These classes are based on the ability of DNS operators to make changes in the delegating parent zone:</p><p><b>Registrars/Resellers</b>—Have direct interface to the registry database, and can change information at will and instantly.</p><p><b>Registrant</b>—Have a User Interface (usually web) to update information</p><p><b>Third Party DNS Operator</b>—Need either the registrant to update information on its behalf, or have access to the registrants account with registrar (which is a bad security practice). In reality, DNS operators can only expect registrants to log into the account on two occasions: a. when service is moved to Operator, or b. when service is taken away from operator.</p><p>CloudFlare is advocating to gain the ability to update NS records for our customers and address records associated with them using automated channels. Our goal is to be able to add and remove nameservers from customer domains without the customer being involved.</p><p>Creating an automated process for updating NS (and DS) records would help solve the operational difficulties to providing DNS service, and would open up new possibilities for the Internet as a whole. If DNS operators had control of NS and DS records they could re-balance nameservers for stability, quickly change nameservers that go bad, and even better protect customers against DDoS attacks. Most people don’t know that when certain NS records come under heavy DDoS attack, all customers that share that nameserver might also experience a degradation in service. If those NS records could be changed quickly, we could lessen the impact on domains that are not <a href="http://www.circleid.com/posts/20141202_nameserver_operators_need_the_ability_to_disavow_domains/">being targeted</a>.</p><p>Perhaps the most important reason for automating DNS operator’s access customer NS and DS records (Delegated Signer Record) is that this change would pave the way for DNSSEC implementation. DNSSEC requires maintaining DS records because they have to be inserted into the parent domain and potentially updated on a regular basis. If this record is not properly maintained, then DNSSEC validation fails, making the domain inaccessible. Presently, this is done through a web interface at the Registrar by the Registrant.</p>
    <div>
      <h3>Achieving DNSSEC Ubiquity</h3>
      <a href="#achieving-dnssec-ubiquity">
        
      </a>
    </div>
    <p>In theory, the Registrant could designate the DNS Operator as Technical Contact, but that doesn’t help unless the Technical Contact is given full access to the Registrant’s account since most Registrars don’t provide role-based access to accounts. In any case, asking our customers to update their delegation information in order to reflect the DNSSEC trust chain is problematic. One issue with this approach is that if CloudFlare were to ask hundreds of thousands of customers that own millions of domains to make manual updates to their records, there would be a huge chance of error. If records are updated incorrectly, it would not only cause frustration, it might cause the site to go down due to DNSSEC errors.</p><p>CloudFlare could try to minimize these errors by publishing <a href="https://tools.ietf.org/html/rfc7344">CDS and or CDNSKEY records</a> in each zone, that the registrar can pick up via DNS query and apply. But the long term solution is full automation with authorized updates to delegation information.</p><p>Some will say that the current system will work if the DNS operator is designated as Technical Contact (one of the roles defined in the ICANN model) but almost no Registrar offers a role based accounts for customers. All that does is to decrease the probability that phone call or email from Technical contact is dismissed as social engineering attack.</p>
    <div>
      <h3>JOIN US</h3>
      <a href="#join-us">
        
      </a>
    </div>
    <p>CloudFlare wants to team up with Registrars, Registries, and other DNS Operators to define and deploy more reliable methods for updating NS and DS records. We think this would be a big win for our customers, and, ultimately, for the internet as a whole. If you’re interested in participating in this process, you can sign up for this mailing list: <a href="#">dnssec-auto-ds@elists.isoc.org</a></p> ]]></content:encoded>
            <category><![CDATA[ICANN]]></category>
            <category><![CDATA[DNSSEC]]></category>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[Reliability]]></category>
            <guid isPermaLink="false">7DrGn3ATfkJqNCgi6l1foD</guid>
            <dc:creator>Ólafur Guðmundsson</dc:creator>
        </item>
        <item>
            <title><![CDATA[DNSSEC Done Right]]></title>
            <link>https://blog.cloudflare.com/dnssec-done-right/</link>
            <pubDate>Thu, 29 Jan 2015 20:10:54 GMT</pubDate>
            <description><![CDATA[ I’ve been working on DNSSEC evolution for a long time as implementor, IETF working group chair, protocol experimenter, DNS operator, consultant, and evangelist.  ]]></description>
            <content:encoded><![CDATA[ <p></p><p><i>This blog post is probably more personal than the usual posts here. It’s about </i><b><i>why I joined CloudFlare</i></b><i>.</i></p><p>I’ve been working on DNSSEC evolution for a long time as implementor, <a href="http://datatracker.ietf.org/wg/dnsext/charter/">IETF working group chair</a>, protocol experimenter, DNS operator, consultant, and evangelist. These different perspectives allow me to look at the protocol in a holistic way.</p><p>First and foremost, it’s important to realize the exact role of DNSSEC. <b>DNSSEC is actually a misnomer:</b> it’s from an era when the understanding of different security technologies, and what role each plays, was not as good as today. <b>Today, this protocol would be called DNSAUTH.</b> This is because all it does is to provide integrity protection to the answers from authoritative servers.</p><p>Over the years, the design of DNSSEC has changed. A number of people working on early versions of DNSSEC (myself included) didn’t know DNS all that well. Similarly, many DNS people at the time didn’t understand security, and in particular, cryptography all that well. To make things even more complex, general understanding of the DNS protocol was lacking in certain areas and needed to be clarified in order to do DNSSEC properly. This has led to <b>three major versions of the protocol.</b> The first two were not deployable for various reasons. Some of the decisions made, in hindsight, were sub-optimal. They were artifacts of constraints placed on the design by the <a href="https://www.cloudflare.com/learning/dns/what-is-dns/">DNS protocol</a> itself, understanding of DNS, and various operational realities. <a href="https://tools.ietf.org/html/rfc4033"><b>DNSSECv3 [RFC403x]</b></a><b>, however, is deployable.</b></p><p>Today, we have wide spread deployment of the crucial building blocks for DNSSEC:</p><ul><li><p>Root and <a href="https://www.cloudflare.com/learning/dns/top-level-domain/">TLDs</a>: over 2/3’rds of the TLDs are signed</p></li><li><p>Most DNS software is DNSSEC enabled</p></li><li><p>Many <a href="https://www.cloudflare.com/learning/dns/glossary/what-is-a-domain-name-registrar/">registrars</a> offer their customers DNSSEC support either by signing the customers zones or by adding DS records into the parent zones.</p></li></ul><p>What’s missing is having Enterprise zones signed, and turning on validation in resolvers and clients. It’s estimated that <a href="http://stats.labs.apnic.net/dnssec">over 10% of all user DNS answers today are validated</a>, but how much is validated in data centers is unknown.</p><p>DNSSEC deployment has been what I call <b>a game of “excuse elimination”</b>. First it was “com will never be signed”, then “the root will never be signed”, then “the answers will be too big”, and so on. Right now, the main excuse is, “this important domain is not signed”. Getting CDNs to sign is a great step towards getting the important domains signed. This is because <a href="https://www.cloudflare.com/learning/cdn/what-is-a-cdn/">CDNs</a> frequently act as DNS operators for such domains.</p><p>So what does all of this have to do with me joining CloudFlare? Well, when a friend mentioned to me that CloudFlare was looking for a DNS person I checked them out. <b>CloudFlare impressed me by wanting to do things correctly right from the beginning</b>, and people here are not afraid to do things differently if it’s better. CloudFlare had been thinking about doing DNSSEC, and wanted me to help them implement and deploy it. This is turning out to be a fun project not just because of the scale, but also because of <b>the ability to take a fresh perspective and questioning all prior assumptions</b>.</p><p>CloudFlare’s DNS servers provide answers from over 30 anycasted data centers all over the world. We operate lots of DNS servers—authoritative for millions of zones. Not all the servers return the same answers to all clients because of policies and locations. Furthermore, much of the DNS data we serve has geographical bias. Thus, some data centers never see a query for that data. In this environment the only realistic way to answer the question is to generate the signatures at the edge on demand. This is a radical departure from most DNSSEC implementations, but there are few implementations like <a href="https://www.powerdns.com/">PowerDNS</a> that have this capability. What online signing does is significantly reduce the volume of data that has to be transferred to the edge. We’ve designed our systems to only transfer signed DNSKEY (and CDS) records to the edges, while everything else is signed there. This requires transferring the zone signing keys to the edge.</p><p>CloudFlare is a frequent target of DNS attacks, both against our customers and as an reflector/amplifier. For that reason, <b>we are fanatical about keeping DNS answers as small as possible</b> to minimize the damage our systems can do to others when used as a reflector. This has directed us in a number of choices on how we do DNSSEC.</p><p>First, we use the Elliptic Curve algorithm ECDSA P-256. A ECDSA key is stronger than most RSA keys used today and the signatures are much smaller. Also, it takes fewer CPU cycles to generate the signatures than with RSA making this is a double win for us. When we started on the project, we found only one Validating Resolver implementation that did not support ECDSA. We reached out to them and now <a href="https://www.cloudflare.com/cloudflare-vs-google-dns/">Google Public DNS</a> correctly validates ECDSA!</p><p>Second, we do negative answers in a special way. Negative answers in DNSSEC can get large. For zones signed with NSEC, it’s not uncommon to have SOA + RRSIG(SOA) + 2 NSEC records + 2 RRSIG(NSEC) records in the negative answers. Even for the weakest RSA keys allowed, this results in an answer that is at least 635 bytes. NSEC3 signed answers require, in most cases, 3 NSEC3 and 3 RRSIG (NSEC3) records to deny the existence of the item asked for—that’s at least 1000 bytes. So we selected NSEC as our negative answer and use ECC keys. But the biggest saving comes from not having to prove that the covering wildcard exists at all, which is the role of the second NSEC record. We return an answer that says, “sure, the name exists, but the type you asked for does not”. This allows us to return only one NSEC record in negative answers!</p><p>In the past, NSEC records have been criticized for leaking information about the zone contents. Our implementation of negative answers allows us to provide negative answer with no value for a zone walker. Thus, our customers will gain the best possible defense against zone walking.The net result of our careful engineering of DNS answers is that we are able to keep most of our signed answers under 512 bytes. There are, however, exceptions, like when customers have large answers or long names but that is unavoidable.</p><p>Today's announcement regarding <a href="/help-us-test-our-dnssec-implementation/">CloudFlare's alpha DNSSEC support</a> is the first step towards providing a comprehensive DNSSEC offerings to our customers. We plan on offering DNSSEC to all our customers soon.</p> ]]></content:encoded>
            <category><![CDATA[DNSSEC]]></category>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[Life at Cloudflare]]></category>
            <category><![CDATA[Cloudflare History]]></category>
            <guid isPermaLink="false">7lKhWz4m8b84mpDli4ocYt</guid>
            <dc:creator>Ólafur Guðmundsson</dc:creator>
        </item>
    </channel>
</rss>