
<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>Mon, 13 Apr 2026 18:51:22 GMT</lastBuildDate>
        <item>
            <title><![CDATA[What came first: the CNAME or the A record?]]></title>
            <link>https://blog.cloudflare.com/cname-a-record-order-dns-standards/</link>
            <pubDate>Wed, 14 Jan 2026 00:00:00 GMT</pubDate>
            <description><![CDATA[ A recent change to 1.1.1.1 accidentally altered the order of CNAME records in DNS responses, breaking resolution for some clients. This post explores the technical root cause, examines the source code of affected resolvers, and dives into the inherent ambiguities of the DNS RFCs.   ]]></description>
            <content:encoded><![CDATA[ <p>On January 8, 2026, a routine update to 1.1.1.1 aimed at reducing memory usage accidentally triggered a wave of DNS resolution failures for users across the Internet. The root cause wasn't an attack or an outage, but a subtle shift in the order of records within our DNS responses.  </p><p>While most modern software treats the order of records in DNS responses as irrelevant, we discovered that some implementations expect CNAME records to appear before everything else. When that order changed, resolution started failing. This post explores the code change that caused the shift, why it broke specific DNS clients, and the 40-year-old protocol ambiguity that makes the "correct" order of a DNS response difficult to define.</p>
    <div>
      <h2>Timeline</h2>
      <a href="#timeline">
        
      </a>
    </div>
    <p><i>All timestamps referenced are in Coordinated Universal Time (UTC).</i></p><table><tr><th><p><b>Time</b></p></th><th><p><b>Description</b></p></th></tr><tr><td><p>2025-12-02</p></td><td><p>The record reordering is introduced to the 1.1.1.1 codebase</p></td></tr><tr><td><p>2025-12-10</p></td><td><p>The change is released to our testing environment</p></td></tr><tr><td><p>2026-01-07 23:48</p></td><td><p>A global release containing the change starts</p></td></tr><tr><td><p>2026-01-08 17:40</p></td><td><p>The release reaches 90% of servers</p></td></tr><tr><td><p>2026-01-08 18:19</p></td><td><p>Incident is declared</p></td></tr><tr><td><p>2026-01-08 18:27</p></td><td><p>The release is reverted</p></td></tr><tr><td><p>2026-01-08 19:55</p></td><td><p>Revert is completed. Impact ends</p></td></tr></table>
    <div>
      <h2>What happened?</h2>
      <a href="#what-happened">
        
      </a>
    </div>
    <p>While making some improvements to lower the memory usage of our cache implementation, we introduced a subtle change to CNAME record ordering. The change was introduced on December 2, 2025, released to our testing environment on December 10, and began deployment on January 7, 2026.</p>
    <div>
      <h3>How DNS CNAME chains work</h3>
      <a href="#how-dns-cname-chains-work">
        
      </a>
    </div>
    <p>When you query for a domain like <code>www.example.com</code>, you might get a <a href="https://www.cloudflare.com/learning/dns/dns-records/dns-cname-record/"><u>CNAME (Canonical Name)</u></a> record that indicates one name is an alias for another name. It’s the job of public resolvers, such as <a href="https://www.cloudflare.com/learning/dns/what-is-1.1.1.1/"><u>1.1.1.1</u></a>, to follow this chain of aliases until it reaches a final response:</p><p><code>www.example.com → cdn.example.com → server.cdn-provider.com → 198.51.100.1</code></p><p>As 1.1.1.1 traverses this chain, it caches every intermediate record. Each record in the chain has its own <a href="https://www.cloudflare.com/learning/cdn/glossary/time-to-live-ttl/"><u>TTL (Time-To-Live)</u></a>, indicating how long we can cache it. Not all the TTLs in a CNAME chain need to be the same:</p><p><code>www.example.com → cdn.example.com (TTL: 3600 seconds) # Still cached
cdn.example.com → 198.51.100.1    (TTL: 300 seconds)  # Expired</code></p><p>When one or more records in a CNAME chain expire, it’s considered partially expired. Fortunately, since parts of the chain are still in our cache, we don’t have to resolve the entire CNAME chain again — only the part that has expired. In our example above, we would take the still valid <code>www.example.com → cdn.example.com</code> chain, and only resolve the expired <code>cdn.example.com</code> <a href="https://www.cloudflare.com/learning/dns/dns-records/dns-a-record/"><u>A record</u></a>. Once that’s done, we combine the existing CNAME chain and the newly resolved records into a single response.</p>
    <div>
      <h3>The logic change</h3>
      <a href="#the-logic-change">
        
      </a>
    </div>
    <p>The code that merges these two chains is where the change occurred. Previously, the code would create a new list, insert the existing CNAME chain, and then append the new records:</p>
            <pre><code>impl PartialChain {
    /// Merges records to the cache entry to make the cached records complete.
    pub fn fill_cache(&amp;self, entry: &amp;mut CacheEntry) {
        let mut answer_rrs = Vec::with_capacity(entry.answer.len() + self.records.len());
        answer_rrs.extend_from_slice(&amp;self.records); // CNAMEs first
        answer_rrs.extend_from_slice(&amp;entry.answer); // Then A/AAAA records
        entry.answer = answer_rrs;
    }
}
</code></pre>
            <p>However, to save some memory allocations and copies, the code was changed to instead append the CNAMEs to the existing answer list:</p>
            <pre><code>impl PartialChain {
    /// Merges records to the cache entry to make the cached records complete.
    pub fn fill_cache(&amp;self, entry: &amp;mut CacheEntry) {
        entry.answer.extend(self.records); // CNAMEs last
    }
}
</code></pre>
            <p>As a result, the responses that 1.1.1.1 returned now sometimes had the CNAME records appearing at the bottom, after the final resolved answer.</p>
    <div>
      <h3>Why this caused impact</h3>
      <a href="#why-this-caused-impact">
        
      </a>
    </div>
    <p>When DNS clients receive a response with a CNAME chain in the answer section, they also need to follow this chain to find out that <code>www.example.com</code> points to <code>198.51.100.1</code>. Some DNS client implementations handle this by keeping track of the expected name for the records as they’re iterated sequentially. When a CNAME is encountered, the expected name is updated:</p>
            <pre><code>;; QUESTION SECTION:
;; www.example.com.        IN    A

;; ANSWER SECTION:
www.example.com.    3600   IN    CNAME  cdn.example.com.
cdn.example.com.    300    IN    A      198.51.100.1
</code></pre>
            <p></p><ol><li><p>Find records for <code>www.example.com</code></p></li><li><p>Encounter <code>www.example.com. CNAME cdn.example.com</code></p></li><li><p>Find records for <code>cdn.example.com</code></p></li><li><p>Encounter <code>cdn.example.com. A 198.51.100.1</code></p></li></ol><p>When the CNAME suddenly appears at the bottom, this no longer works:</p>
            <pre><code>;; QUESTION SECTION:
;; www.example.com.	       IN    A

;; ANSWER SECTION:
cdn.example.com.    300    IN    A      198.51.100.1
www.example.com.    3600   IN    CNAME  cdn.example.com.
</code></pre>
            <p></p><ol><li><p>Find records for <code>www.example.com</code></p></li><li><p>Ignore <code>cdn.example.com. A 198.51.100.1</code> as it doesn’t match the expected name</p></li><li><p>Encounter <code>www.example.com. CNAME cdn.example.com</code></p></li><li><p>Find records for <code>cdn.example.com</code></p></li><li><p>No more records are present, so the response is considered empty</p></li></ol><p>One such implementation that broke is the <a href="https://man7.org/linux/man-pages/man3/getaddrinfo.3.html"><code><u>getaddrinfo</u></code></a> function in glibc, which is commonly used on Linux for DNS resolution. When looking at its <code>getanswer_r</code> implementation, we can indeed see it expects to find the CNAME records before any answers:</p>
            <pre><code>for (; ancount &gt; 0; --ancount)
  {
    // ... parsing DNS records ...
    
    if (rr.rtype == T_CNAME)
      {
        /* Record the CNAME target as the new expected name. */
        int n = __ns_name_unpack (c.begin, c.end, rr.rdata,
                                  name_buffer, sizeof (name_buffer));
        expected_name = name_buffer;  // Update what we're looking for
      }
    else if (rr.rtype == qtype
             &amp;&amp; __ns_samebinaryname (rr.rname, expected_name)  // Must match!
             &amp;&amp; rr.rdlength == rrtype_to_rdata_length (type:qtype))
      {
        /* Address record matches - store it */
        ptrlist_add (list:addresses, item:(char *) alloc_buffer_next (abuf, uint32_t));
        alloc_buffer_copy_bytes (buf:abuf, src:rr.rdata, size:rr.rdlength);
      }
  }
</code></pre>
            <p>Another notable affected implementation was the DNSC process in three models of Cisco ethernet switches. In the case where switches had been configured to use 1.1.1.1 these switches experienced spontaneous reboot loops when they received a response containing the reordered CNAMEs. <a href="https://www.cisco.com/c/en/us/support/docs/smb/switches/Catalyst-switches/kmgmt3846-cbs-reboot-with-fatal-error-from-dnsc-process.html"><u>Cisco has published a service document describing the issue</u></a>.</p>
    <div>
      <h3>Not all implementations break</h3>
      <a href="#not-all-implementations-break">
        
      </a>
    </div>
    <p>Most DNS clients don’t have this issue. For example, <a href="https://www.freedesktop.org/software/systemd/man/latest/systemd-resolved.service.html"><u>systemd-resolved</u></a> first parses the records into an ordered set:</p>
            <pre><code>typedef struct DnsAnswerItem {
        DnsResourceRecord *rr; // The actual record
        DnsAnswerFlags flags;  // Which section it came from
        // ... other metadata
} DnsAnswerItem;


typedef struct DnsAnswer {
        unsigned n_ref;
        OrderedSet *items;
} DnsAnswer;
</code></pre>
            <p>When following a CNAME chain it can then search the entire answer set, even if the CNAME records don’t appear at the top.</p>
    <div>
      <h2>What the RFC says</h2>
      <a href="#what-the-rfc-says">
        
      </a>
    </div>
    <p><a href="https://datatracker.ietf.org/doc/html/rfc1034"><u>RFC 1034</u></a>, published in 1987, defines much of the behavior of the DNS protocol, and should give us an answer on whether the order of CNAME records matters. <a href="https://datatracker.ietf.org/doc/html/rfc1034#section-4.3.1"><u>Section 4.3.1</u></a> contains the following text:</p><blockquote><p>If recursive service is requested and available, the recursive response to a query will be one of the following:</p><p>- The answer to the query, possibly preface by one or more CNAME RRs that specify aliases encountered on the way to an answer.</p></blockquote><p>While "possibly preface" can be interpreted as a requirement for CNAME records to appear before everything else, it does not use normative key words, such as <a href="https://datatracker.ietf.org/doc/html/rfc2119"><u>MUST and SHOULD</u></a> that modern RFCs use to express requirements. This isn’t a flaw in RFC 1034, but simply a result of its age. <a href="https://datatracker.ietf.org/doc/html/rfc2119"><u>RFC 2119</u></a>, which standardized these key words, was published in 1997, 10 years <i>after</i> RFC 1034.</p><p>In our case, we did originally implement the specification so that CNAMEs appear first. However, we did not have any tests asserting the behavior remains consistent due to the ambiguous language in the RFC.</p>
    <div>
      <h3>The subtle distinction: RRsets vs RRs in message sections</h3>
      <a href="#the-subtle-distinction-rrsets-vs-rrs-in-message-sections">
        
      </a>
    </div>
    <p>To understand why this ambiguity exists, we need to understand a subtle but important distinction in DNS terminology.</p><p>RFC 1034 <a href="https://datatracker.ietf.org/doc/html/rfc1034#section-3.6"><u>section 3.6</u></a> defines Resource Record Sets (RRsets) as collections of records with the same name, type, and class. For RRsets, the specification is clear about ordering:</p><blockquote><p>The order of RRs in a set is not significant, and need not be preserved by name servers, resolvers, or other parts of the DNS.</p></blockquote><p>However, RFC 1034 doesn’t clearly specify how message sections relate to RRsets. While modern DNS specifications have shown that message sections can indeed contain multiple RRsets (consider <a href="https://www.cloudflare.com/learning/dns/dnssec/how-dnssec-works/">DNSSEC</a> responses with signatures), RFC 1034 doesn’t describe message sections in those terms. Instead, it treats message sections as containing individual Resource Records (RRs).</p><p>The problem is that the RFC primarily discusses ordering in the context of RRsets but doesn't specify the ordering of different RRsets relative to each other within a message section. This is where the ambiguity lives.</p><p>RFC 1034 <a href="https://datatracker.ietf.org/doc/html/rfc1034#section-6.2.1"><u>section 6.2.1</u></a> includes an example that demonstrates this ambiguity further. It mentions that the order of Resource Records (RRs) is not significant either:</p><blockquote><p>The difference in ordering of the RRs in the answer section is not significant.</p></blockquote><p>However, this example only shows two A records for the same name within the same RRset. It doesn't address whether this applies to different record types like CNAMEs and A records.</p>
    <div>
      <h2>CNAME chain ordering</h2>
      <a href="#cname-chain-ordering">
        
      </a>
    </div>
    <p>It turns out that this issue extends beyond putting CNAME records before other record types. Even when CNAMEs appear before other records, sequential parsing can still break if the CNAME chain itself is out of order. Consider the following response:</p>
            <pre><code>;; QUESTION SECTION:
;; www.example.com.              IN    A

;; ANSWER SECTION:
cdn.example.com.           3600  IN    CNAME  server.cdn-provider.com.
www.example.com.           3600  IN    CNAME  cdn.example.com.
server.cdn-provider.com.   300   IN    A      198.51.100.1
</code></pre>
            <p>Each CNAME belongs to a different RRset, as they have different owners, so the statement about RRset order being insignificant doesn’t apply here.</p><p>However, RFC 1034 doesn't specify that CNAME chains must appear in any particular order. There's no requirement that <code>www.example.com. CNAME cdn.example.com.</code> must appear before <code>cdn.example.com. CNAME server.cdn-provider.com.</code>. With sequential parsing, the same issue occurs:</p><ol><li><p>Find records for <code>www.example.com</code></p></li><li><p>Ignore <code>cdn.example.com. CNAME server.cdn-provider.com</code>. as it doesn’t match the expected name</p></li><li><p>Encounter <code>www.example.com. CNAME cdn.example.com</code></p></li><li><p>Find records for <code>cdn.example.com</code></p></li><li><p>Ignore <code>server.cdn-provider.com. A 198.51.100.1</code> as it doesn’t match the expected name</p></li></ol>
    <div>
      <h2>What should resolvers do?</h2>
      <a href="#what-should-resolvers-do">
        
      </a>
    </div>
    <p>RFC 1034 section 5 describes resolver behavior. <a href="https://datatracker.ietf.org/doc/html/rfc1034#section-5.2.2"><u>Section 5.2.2</u></a> specifically addresses how resolvers should handle aliases (CNAMEs): </p><blockquote><p>In most cases a resolver simply restarts the query at the new name when it encounters a CNAME.</p></blockquote><p>This suggests that resolvers should restart the query upon finding a CNAME, regardless of where it appears in the response. However, it's important to distinguish between different types of resolvers:</p><ul><li><p>Recursive resolvers, like 1.1.1.1, are full DNS resolvers that perform recursive resolution by querying authoritative nameservers</p></li><li><p>Stub resolvers, like glibc’s getaddrinfo, are simplified local interfaces that forward queries to recursive resolvers and process the responses</p></li></ul><p>The RFC sections on resolver behavior were primarily written with full resolvers in mind, not the simplified stub resolvers that most applications actually use. Some stub resolvers evidently don’t implement certain parts of the spec, such as the CNAME-restart logic described in the RFC. </p>
    <div>
      <h2>The DNSSEC specifications provide contrast</h2>
      <a href="#the-dnssec-specifications-provide-contrast">
        
      </a>
    </div>
    <p>Later DNS specifications demonstrate a different approach to defining record ordering. <a href="https://datatracker.ietf.org/doc/html/rfc4035"><u>RFC 4035</u></a>, which defines protocol modifications for <a href="https://www.cloudflare.com/learning/dns/dnssec/how-dnssec-works/"><u>DNSSEC</u></a>, uses more explicit language:</p><blockquote><p>When placing a signed RRset in the Answer section, the name server MUST also place its RRSIG RRs in the Answer section. The RRSIG RRs have a higher priority for inclusion than any other RRsets that may have to be included.</p></blockquote><p>The specification uses "MUST" and explicitly defines "higher priority" for <a href="https://www.cloudflare.com/learning/dns/dnssec/how-dnssec-works/"><u>RRSIG</u></a> records. However, "higher priority for inclusion" refers to whether RRSIGs should be included in the response, not where they should appear. This provides unambiguous guidance to implementers about record inclusion in DNSSEC contexts, while not mandating any particular behavior around record ordering.</p><p>For unsigned zones, however, the ambiguity from RFC 1034 remains. The word "preface" has guided implementation behavior for nearly four decades, but it has never been formally specified as a requirement.</p>
    <div>
      <h2>Do CNAME records come first?</h2>
      <a href="#do-cname-records-come-first">
        
      </a>
    </div>
    <p>While in our interpretation the RFCs do not require CNAMEs to appear in any particular order, it’s clear that at least some widely-deployed DNS clients rely on it. As some systems using these clients might be updated infrequently, or never updated at all, we believe it’s best to require CNAME records to appear in-order before any other records.</p><p>Based on what we have learned during this incident, we have reverted the CNAME re-ordering and do not intend to change the order in the future.</p><p>To prevent any future incidents or confusion, we have written a proposal in the form of an <a href="https://www.ietf.org/participate/ids/"><u>Internet-Draft</u></a> to be discussed at the IETF. If consensus is reached on the clarified behavior, this would become an RFC that explicitly defines how to correctly handle CNAMEs in DNS responses, helping us and the wider DNS community navigate the protocol. The proposal can be found at <a href="https://datatracker.ietf.org/doc/draft-jabley-dnsop-ordered-answer-section/">https://datatracker.ietf.org/doc/draft-jabley-dnsop-ordered-answer-section</a>. If you have suggestions or feedback we would love to hear your opinions, most usefully via the <a href="https://datatracker.ietf.org/wg/dnsop/about/"><u>DNSOP working group</u></a> at the IETF.</p> ]]></content:encoded>
            <category><![CDATA[1.1.1.1]]></category>
            <category><![CDATA[Post Mortem]]></category>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[Resolver]]></category>
            <category><![CDATA[Standards]]></category>
            <category><![CDATA[Bugs]]></category>
            <category><![CDATA[Consumer Services]]></category>
            <guid isPermaLink="false">3fP84BsxwSxKr7ffpmVO6s</guid>
            <dc:creator>Sebastiaan Neuteboom</dc:creator>
        </item>
        <item>
            <title><![CDATA[Addressing the unauthorized issuance of multiple TLS certificates for 1.1.1.1]]></title>
            <link>https://blog.cloudflare.com/unauthorized-issuance-of-certificates-for-1-1-1-1/</link>
            <pubDate>Thu, 04 Sep 2025 17:30:00 GMT</pubDate>
            <description><![CDATA[ Unauthorized TLS certificates were issued for 1.1.1.1 by a Certification Authority without permission from Cloudflare. These rogue certificates have now been revoked. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Over the past few days Cloudflare has been notified through our vulnerability disclosure program and the <a href="https://groups.google.com/g/certificate-transparency/c/we_8SNGqA3w/m/ILXqa0hzAgAJ?utm_medium=email&amp;utm_source=footer"><u>certificate transparency mailing list</u></a> that unauthorized certificates were issued by <a href="https://www.fina.hr/"><u>Fina CA</u></a> for 1.1.1.1, one of the IP addresses used by our <a href="https://one.one.one.one/"><u>public DNS resolver service</u></a>. From February 2024 to August 2025, Fina CA <a href="https://crt.sh/?iPAddress=1.1.1.1&amp;match=="><u>issued</u></a> twelve certificates for 1.1.1.1 without our permission. We did not observe unauthorized issuance for any properties managed by Cloudflare other than 1.1.1.1.</p><p>We have no evidence that bad actors took advantage of this error. To impersonate Cloudflare's public DNS resolver 1.1.1.1, an attacker would not only require an unauthorized certificate and its corresponding private key, but attacked users would also need to trust the Fina CA. Furthermore, traffic between the client and 1.1.1.1 would have to be intercepted.</p><p>While this unauthorized issuance is an unacceptable lapse in security by Fina CA, we should have caught and responded to it earlier. After speaking with Fina CA, it appears that they issued these certificates for the purposes of internal testing. However, no CA should be issuing certificates for domains and IP addresses without checking control. At present all certificates have been <a href="http://rdc.fina.hr/RDC2020/FinaRDCCA2020partc1.crl"><u>revoked</u></a>. We are awaiting a full post-mortem from Fina.</p><p>While we regret this situation, we believe it is a useful opportunity to walk through how trust works on the Internet between networks like ourselves, destinations like 1.1.1.1, CAs like Fina, and devices like the one you are using to read this. To learn more about the mechanics, please keep reading.</p>
    <div>
      <h3>Background</h3>
      <a href="#background">
        
      </a>
    </div>
    <p>Cloudflare operates a <a href="https://one.one.one.one/"><u>public DNS resolver 1.1.1.1 service</u></a> that millions of devices use to resolve domain names from a human-readable format such as example.com to an IP address like 192.0.2.42 or 2001:db8::2a.</p><p>The 1.1.1.1 service is accessible using various methods, across multiple domain names, such as <a href="https://cloudflare-dns.com"><u>cloudflare-dns.com</u></a> and <a href="https://one.one.one.one"><u>one.one.one.one</u></a>, and also using various IP addresses, such as 1.1.1.1, 1.0.0.1, 2606:4700:4700::1111, and 2606:4700:4700::1001. <a href="https://one.one.one.one/family/"><u>1.1.1.1 for Families</u></a> also provides public DNS resolver services and is hosted on different IP addresses — 1.1.1.2, 1.1.1.3, 1.0.0.2, 1.0.0.3, 2606:4700:4700::1112, 2606:4700:4700::1113, 2606:4700:4700::1002, 2606:4700:4700::1003.</p><p>As originally specified in <a href="https://datatracker.ietf.org/doc/html/rfc1034"><u>RFC 1034</u></a> and <a href="https://datatracker.ietf.org/doc/html/rfc1035"><u>RFC 1035</u></a>, the DNS protocol includes no privacy or authenticity protections. DNS queries and responses are exchanged between client and server in plain text over UDP or TCP. These represent around 60% of queries received by the Cloudflare 1.1.1.1 service. The lack of privacy or authenticity protection means that any intermediary can potentially read the DNS query and response and modify them without the client or the server being aware.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6zbEvgOCwZomZTbgSGFuEo/d638f36eebdbf2577ea0b8172dff843e/image1.png" />
          </figure><p>To address these shortcomings, we have helped develop and deploy multiple solutions at the IETF. The two of interest to this post are DNS over TLS (DoT, <a href="https://datatracker.ietf.org/doc/html/rfc7858"><u>RFC 7878</u></a>) and DNS over HTTPS (DoH, <a href="https://datatracker.ietf.org/doc/html/rfc8484"><u>RFC 8484</u></a>). In both cases the DNS protocol itself is mainly unchanged, and the desirable security properties are implemented in a lower layer, replacing the simple use of plain-text in UDP and TCP in the original specification. Both DoH and DoT use TLS to establish an authenticated, private, and encrypted channel over which DNS messages can be exchanged. To learn more you can read <a href="https://blog.cloudflare.com/dns-encryption-explained/"><u>DNS Encryption Explained</u></a>.</p><p>During the <a href="https://www.cloudflare.com/learning/ssl/transport-layer-security-tls/"><u>TLS handshake</u></a>, the server proves its identity to the client by presenting a certificate. The client validates this certificate by verifying that it is signed by a Certification Authority that it already trusts. Only then does it establish a connection with the server. Once connected, TLS provides encryption and integrity for the DNS messages exchanged between client and server. This protects DoH and DoT against eavesdropping and tampering between the client and server.</p>
          <figure>
          <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/21YeKS2nYIFDI9uC3uClXE/6115e00945458d42627d973aef75076c/image2.png" />
          </figure><p>The TLS certificates used in DoT and DoH are the same kinds of certificates HTTPS websites serve. Most website certificates are issued for domain names like <a href="http://example.com"><u>example.com</u></a>. When a client connects to that website, they resolve the name <a href="http://example.com"><u>example.com</u></a> to an IP like 192.0.2.42, then connect to the domain on that IP address. The server responds with a TLS certificate containing <a href="http://example.com"><u>example.com</u></a>, which the device validates.</p><p>However, DNS server certificates tend to be used slightly differently. Certificates used for DoT and DoH have to contain the service IP addresses, not just domain names. This is due to clients being unable to resolve a domain name in order to contact their resolver, like <a href="https://cloudflare-dns.com"><u>cloudflare-dns.com</u></a>. Instead, devices are first set up by connecting to their resolver via a known IP address, such as 1.1.1.1 in the case of Cloudflare public DNS resolver. When this connection uses DoT or DoH, the resolver responds with a TLS certificate issued for that IP address, which the client validates. If the certificate is valid, the client believes that it is talking to the owner of 1.1.1.1 and starts sending DNS queries.</p><p>You can see that the IP addresses are included in the certificate Cloudflare’s public resolver uses for DoT/DoH:</p>
            <pre><code>Certificate:
  Data:
      Version: 3 (0x2)
      Serial Number:
          02:7d:c8:c5:e1:72:94:ae:c9:ed:3f:67:72:8e:8a:08
      Signature Algorithm: sha256WithRSAEncryption
      Issuer: C=US, O=DigiCert Inc, CN=DigiCert Global G2 TLS RSA SHA256 2020 CA1
      Validity
          Not Before: Jan  2 00:00:00 2025 GMT
          Not After : Jan 21 23:59:59 2026 GMT
      Subject: C=US, ST=California, L=San Francisco, O=Cloudflare, Inc., CN=cloudflare-dns.com
      X509v3 extensions:
          X509v3 Subject Alternative Name:
              DNS:cloudflare-dns.com, DNS:*.cloudflare-dns.com, DNS:one.one.one.one, IP Address:1.0.0.1, IP Address:1.1.1.1, IP Address:162.159.36.1, IP Address:162.159.46.1, IP Address:2606:4700:4700:0:0:0:0:1001, IP Address:2606:4700:4700:0:0:0:0:1111, IP Address:2606:4700:4700:0:0:0:0:64, IP Address:2606:4700:4700:0:0:0:0:6400</code></pre>
            
    <div>
      <h3>Rogue certificate issuance</h3>
      <a href="#rogue-certificate-issuance">
        
      </a>
    </div>
    <p>The section above describes normal, expected use of Cloudflare public DNS resolver 1.1.1.1 service, using certificates managed by Cloudflare. However, Cloudflare has been made aware of other, unauthorized certificates being issued for 1.1.1.1. Since certificate validation is the mechanism by which DoH and DoT clients establish the authenticity of a DNS resolver, this is a concern. Let’s now dive a little further in the security model provided by DoH and DoT.</p><p>Consider a client that is preconfigured to use the 1.1.1.1 resolver service using DoT. The client must establish a TLS session with the configured server before it can send any DNS queries. To be trusted, the server needs to present a certificate issued by a CA that the client trusts. The collection of certificates trusted by the client is also called the root store.</p>
            <pre><code>Certificate:
  Data:
      Version: 3 (0x2)
      Serial Number:
          02:7d:c8:c5:e1:72:94:ae:c9:ed:3f:67:72:8e:8a:08
      Signature Algorithm: sha256WithRSAEncryption
      Issuer: C=US, O=DigiCert Inc, CN=DigiCert Global G2 TLS RSA SHA256 2020 CA1</code></pre>
            <p>A Certification Authority (CA) is an organisation, such as DigiCert in the section above, whose role is to receive requests to sign certificates and verify that the requester has control of the domain. In this incident, Fina CA issued certificates for 1.1.1.1 without Cloudflare's involvement. This means that Fina CA did not properly check whether the requestor had legitimate control over 1.1.1.1. According to Fina CA:</p><blockquote><p>“They were issued for the purpose of internal testing of certificate issuance in the production environment. An error occurred during the issuance of the test certificates when entering the IP addresses and as such they were published on Certificate Transparency log servers.”</p></blockquote><p>Although it’s not clear whether Fina CA sees it as an error, we emphasize that it is not an error to publish test certificates on Certificate Transparency (more about what that is later on). Instead, the error at hand is Fina CA using their production keys to sign a certificate for an IP address without permission of the controller. We have <a href="https://ripe84.ripe.net/archives/video/747/"><u>talked about</u></a> misuse of 1.1.1.1 in documentation, lab, and testing environments at length. Instead of the Cloudflare public DNS resolver 1.1.1.1 IP address, Fina should have used an IP address it controls itself.</p><p>Unauthorized certificates are unfortunately not uncommon, whether due to negligence — such as <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1930029"><u>IdenTrust</u></a> in November 2024 — or compromise. Famously in 2011, the Dutch CA DigiNotar was <a href="https://threatpost.com/final-report-diginotar-hack-shows-total-compromise-ca-servers-103112/77170/"><u>hacked</u></a>, and its keys were used to issue hundreds of certificates. This hack was a wake-up call and motivated the introduction of Certificate Transparency (CT), later formalised in <a href="https://datatracker.ietf.org/doc/html/rfc6962"><u>RFC 6962</u></a>. The goal of Certificate Transparency is not to directly prevent misissuance, but to be able to detect any misissuance once it has happened, by making sure every certificate issued by a CA is publicly available for inspection.</p><p>In certificate transparency several independent parties, including <a href="https://blog.cloudflare.com/introducing-certificate-transparency-monitoring/"><u>Cloudflare</u></a>, operate public logs of issued certificates. Many modern browsers do not accept certificates unless they provide proof in the form of signed certificate timestamps (<a href="https://certificate.transparency.dev/howctworks/"><u>SCT</u></a>s) that the certificate has been logged in at least two logs. Domain owners can therefore monitor all public CT logs for any certificate containing domains they care about. If they see a certificate for their domains that they did not authorize, they can raise the alarm. CT is also the data source for public services such as <a href="https://crt.sh"><u>crt.sh</u></a> and Cloudflare Radar’s <a href="https://radar.cloudflare.com/certificate-transparency"><u>certificate transparency page</u></a>.</p><p>Not all clients require proof of inclusion in certificate transparency. Browsers do, but most DNS clients don’t. We were fortunate that Fina CA did submit the unauthorized certificates to the CT logs, which allowed them to be discovered.</p>
    <div>
      <h3>Investigation into potential malicious use</h3>
      <a href="#investigation-into-potential-malicious-use">
        
      </a>
    </div>
    <p>Our immediate concern was that someone had maliciously used the certificates to impersonate the 1.1.1.1 service. Such an attack would require all the following:</p><ol><li><p>An attacker would require a rogue certificate and its corresponding private key.</p></li><li><p>Attacked clients would need to trust the Fina CA.</p></li><li><p>Traffic between the client and 1.1.1.1 would have to be intercepted.</p></li></ol><p>In light of this incident, we have reviewed these requirements one by one:</p><p>1. We know that a certificate was issued without Cloudflare's involvement. We must assume that a corresponding private key exists, which is not under Cloudflare's control. This could be used by an attacker. Fina CA wrote to us that the private keys were exclusively in Fina’s controlled environment and were immediately destroyed even before the certificates were revoked. As we have no way to verify this, we have and continue to take steps to detect malicious use as described in point 3.</p><p>2. Furthermore, some clients trust Fina CA. It is included by default in <a href="https://learn.microsoft.com/en-us/security/trusted-root/participants-list"><u>Microsoft’s root store</u></a> and in an <a href="https://eidas.ec.europa.eu/efda/trust-services/browse/eidas/tls"><u>EU Trust Service provider</u></a>. We can exclude some clients, as the CA certificate is not included by default in the root stores of <a href="https://android.googlesource.com/platform/system/ca-certificates/+/master/files/"><u>Android</u></a>, <a href="https://support.apple.com/en-us/HT209143"><u>Apple</u></a>, <a href="https://wiki.mozilla.org/CA/Included_Certificates"><u>Mozilla</u></a>, or <a href="https://g.co/chrome/root-policy"><u>Chrome</u></a>. These users cannot have been affected with these default settings. For these certificates to be used nefariously, the client’s root store must include the Certification Authority (CA) that issued them. Upon discovering the problem, we immediately reached out to Fina CA, Microsoft, and the <a href="https://eidas.ec.europa.eu/efda/trust-services/browse/eidas/tls/tl/HR"><u>EU Trust Service provider</u></a>. Microsoft responded quickly, and started rolling out an update to their <i>disallowed list</i>, which should cause clients that use it to stop trusting the certificate.</p><p>3. Finally, we have launched an investigation into possible interception between users and 1.1.1.1. The first way this could happen is when the attacker is on-path of the client request. Such man-in-the-middle attacks are likely to be invisible to us. Clients will get responses from their on-path middlebox and we have no reliable way of telling that is happening. On-path interference has been a persistent problem for 1.1.1.1, which we’ve been <a href="https://blog.cloudflare.com/fixing-reachability-to-1-1-1-1-globally/"><u>working on</u></a> ever since we announced 1.1.1.1.</p><p>A second scenario can occur when a malicious actor is off-path, but is able to hijack 1.1.1.1 routing via BGP. These are scenarios we have discussed in a<a href="https://blog.cloudflare.com/bgp-hijack-detection/"> <u>previous blog post</u></a>, and <a href="https://manrs.org/2024/05/rpki-rov-deployment-reaches-major-milestone/"><u>increasing adoption of RPKI route origin validation (ROV)</u></a> makes BGP hijacks with high penetration harder. We looked at the historical BGP announcements involving 1.1.1.1, and have found no evidence that such routing hijacks took place.</p><p>Although we cannot be certain, so far we have seen no evidence that these certificates have been used to impersonate Cloudflare public DNS resolver 1.1.1.1 traffic. In later sections we discuss the steps we have taken to prevent such impersonation in the future, as well as concrete actions you can take to protect your own systems and users.</p>
    <div>
      <h3>A closer look at the unauthorized certificates attributes</h3>
      <a href="#a-closer-look-at-the-unauthorized-certificates-attributes">
        
      </a>
    </div>
    <p>All unauthorized certificates for 1.1.1.1 were valid for exactly one year and included other domain names. Most of these domain names are not registered, which indicates that the certificates were issued without proper domain control validation. This violates sections 3.2.2.4 and 3.2.2.5 of the CA/Browser Forum’s <a href="https://cabforum.org/working-groups/server/baseline-requirements/requirements/#3224-validation-of-domain-authorization-or-control"><u>Baseline Requirements</u></a>, and sections 3.2.2.3 and 3.2.2.4 of the <a href="https://rdc.fina.hr/RDC2015/CPWSA1-12-en.pdf"><u>Fina CA Certificate Policy</u></a>.</p><p>The full list of domain names we identified on the unauthorized certificates are as follows:</p>
            <pre><code>fina.hr
ssltest5
test.fina.hr
test.hr
test1.hr
test11.hr
test12.hr
test5.hr
test6
test6.hr
testssl.fina.hr
testssl.finatest.hr
testssl.hr
testssl1.finatest.hr
testssl2.finatest.hr</code></pre>
            <p>It’s also worth noting that the Subject attribute points to a fictional organisation <b>TEST D.D.</b>, as can be seen on this unauthorized certificate:</p>
            <pre><code>        Serial Number:
            a5:30:a2:9c:c1:a5:da:40:00:00:00:00:56:71:f2:4c
        Signature Algorithm: sha256WithRSAEncryption
        Issuer: C=HR, O=Financijska agencija, CN=Fina RDC 2015
        Validity
            Not Before: Nov  2 23:45:15 2024 GMT
            Not After : Nov  2 23:45:15 2025 GMT
        Subject: C=HR, O=TEST D.D., L=ZAGREB, CN=testssl.finatest.hr, serialNumber=VATHR-32343828408.306
        X509v3 extensions:
            X509v3 Subject Alternative Name:
                DNS:testssl.finatest.hr, DNS:testssl2.finatest.hr, IP Address:1.1.1.1</code></pre>
            
    <div>
      <h3>Incident timeline and impact</h3>
      <a href="#incident-timeline-and-impact">
        
      </a>
    </div>
    <p><i>All timestamps are UTC. All certificates are identified by their date of validity.</i></p><p>The <a href="https://crt.sh/?id=12116084225"><u>first certificate</u></a> was issued to be valid starting February 2024, and revoked 33 min later. 11 certificate issuances with common name 1.1.1.1 followed from February 2024 to August 2025. Public reports have been made on <a href="https://news.ycombinator.com/item?id=45089708"><u>Hacker News</u></a> and on the <a href="https://groups.google.com/g/certificate-transparency/c/we_8SNGqA3w/m/ILXqa0hzAgAJ"><u>certificate-transparency mailing list</u></a> early in September 2025, which Cloudflare responded to.</p><p>While responding to the incident, we identified the full list of misissued certificates, their revocation status, and which clients trust them.</p><p>The full timeline for the incident is as follows.</p><table><tr><td><p><b>Date &amp; Time (UTC)</b></p></td><td><p><b>Event Description</b></p></td></tr><tr><td><p>2024-02-18 11:07:33</p></td><td><p><a href="https://crt.sh/?id=12116084225"><u>First certificate issuance</u></a> revoked on 2024-02-18 11:40:00</p></td></tr><tr><td><p>2024-09-25 08:04:03</p></td><td><p><a href="https://crt.sh/?id=14681939427"><u>Issuance</u></a> revoked on 2024-11-06 07:36:05</p></td></tr><tr><td><p>2024-10-04 07:55:38</p></td><td><p><a href="https://crt.sh/?id=14793030836"><u>Issuance</u></a> revoked on 2024-10-04 07:56:56</p></td></tr><tr><td><p>2024-10-04 08:05:48</p></td><td><p><a href="https://crt.sh/?id=14793121895"><u>Issuance</u></a> revoked on 2024-11-06 07:39:55</p></td></tr><tr><td><p>2024-10-15 06:28:48</p></td><td><p><a href="https://crt.sh/?id=14939369380"><u>Issuance</u></a> revoked on 2024-11-06 07:35:36</p></td></tr><tr><td><p>2024-11-02 23:45:15</p></td><td><p><a href="https://crt.sh/?id=15190039061"><u>Issuance</u></a> revoked on 2024-11-02 23:48:42</p></td></tr><tr><td><p>2025-03-05 09:12:23</p></td><td><p><a href="https://crt.sh/?id=16939550348"><u>Issuance</u></a> revoked on 2025-03-05 09:13:22</p></td></tr><tr><td><p>2025-05-24 22:56:21</p></td><td><p><a href="https://crt.sh/?id=18603461241"><u>Issuance</u></a> revoked on 2025-09-04 06:13:27</p></td></tr><tr><td><p>2025-06-28 23:05:32</p></td><td><p><a href="https://crt.sh/?id=19318694206"><u>Issuance</u></a> revoked on 2025-07-18 07:01:27</p></td></tr><tr><td><p>2025-07-18 07:05:23</p></td><td><p><a href="https://crt.sh/?id=19749594221"><u>Issuance</u></a> revoked on 2025-07-18 07:09:45</p></td></tr><tr><td><p>2025-07-18 07:13:14</p></td><td><p><a href="https://crt.sh/?id=19749721864"><u>Issuance</u></a> revoked on 2025-09-04 06:30:36</p></td></tr><tr><td><p>2025-08-26 07:49:00</p></td><td><p><a href="https://crt.sh/?id=20582951233"><u>Last certificate issuance</u></a> revoked on 2025-09-04 06:33:20</p></td></tr><tr><td><p>2025-09-01 05:23:00</p></td><td><p><a href="https://news.ycombinator.com/item?id=45089708"><u>HackerNews submission</u></a> about a possible unauthorized issuance</p></td></tr><tr><td><p>2025-09-02 04:50:00</p></td><td><p>Report shared with us on HackerOne, but was mistriaged</p></td></tr><tr><td><p>2025-09-03 02:35:00</p></td><td><p>Second report shared with us on HackerOne, but also mistriaged.</p></td></tr><tr><td><p>2025-09-03 10:59:00</p></td><td><p><a href="https://groups.google.com/g/certificate-transparency/c/we_8SNGqA3w/m/ILXqa0hzAgAJ?utm_medium=email&amp;utm_source=footer"><u>Report sent</u></a> on the public <a href="#"><u>certificate-transparency@googlegroups.com</u></a> mailing picked up by the team.</p></td></tr><tr><td><p>2025-09-03 11:33:00</p></td><td><p>First response by Cloudflare on the mailing list about starting the investigation</p></td></tr><tr><td><p>2025-09-03 12:08:00</p></td><td><p>Incident declared</p></td></tr><tr><td><p>2025-09-03 12:16:00</p></td><td><p>Notification of an unauthorised issuance sent to Fina CA, Microsoft Root Store, and EU Trust service provider</p></td></tr><tr><td><p>2025-09-03 12:23:00</p></td><td><p>Cloudflare identifies an initial list of nine rogue certificates</p></td></tr><tr><td><p>2025-09-03 12:24:00</p></td><td><p>Outreach to Fina CA to inform them about the unauthorized issuance, requesting revocation</p></td></tr><tr><td><p>2025-09-03 12:26:00</p></td><td><p>Identify the number of requests served on 1.1.1.1 IP address, and associated names/services</p></td></tr><tr><td><p>2025-09-03 12:42:00</p></td><td><p>As a precautionary measure, began investigation to rule out the possibility of a BGP hijack for 1.1.1.1</p></td></tr><tr><td><p>2025-09-03 18:48:00</p></td><td><p>Second notification of the incident to Fina CA</p></td></tr><tr><td><p>2025-09-03 21:27:00</p></td><td><p>Microsoft Root Store notifies us that they are preventing further use of the identified unauthorized certificates by using their quick-revocation mechanism.</p></td></tr><tr><td><p>2025-09-04 06:13:27</p></td><td><p>Fina revoked all certificates.</p></td></tr><tr><td><p>2025-09-04 12:44:00</p></td><td><p>Cloudflare receives a response from Fina indicating “an error occurred during the issuance of the test certificates when entering the IP addresses and as such they were published on Certificate Transparency log servers. [...] Fina will eliminate the possibility of such an error recurring.”</p></td></tr></table>
    <div>
      <h3>Remediation and follow-up steps</h3>
      <a href="#remediation-and-follow-up-steps">
        
      </a>
    </div>
    <p>Cloudflare has invested from the very start in the Certificate Transparency ecosystem. Not only do we operate CT logs ourselves, we also run a CT monitor that we use to <a href="https://developers.cloudflare.com/ssl/edge-certificates/additional-options/certificate-transparency-monitoring/"><u>alert customers when certificates are mis-issued for their domains</u></a>.</p><p>It is therefore disappointing that we failed to properly monitor certificates for our own domain. We failed three times. The first time because 1.1.1.1 is an IP certificate and our system failed to alert on these. The second time because even if we were to receive certificate issuance alerts, as any of our customers can, we did not implement sufficient filtering. With the sheer number of names and issuances we manage it has not been possible for us to keep up with manual reviews. Finally, because of this noisy monitoring, we did not enable alerting for all of our domains. We are addressing all three shortcomings.</p><p>We double-checked all certificates issued for our names, including but not limited to 1.1.1.1, using certificate transparency, and confirmed that as of 3 September, the Fina CA issued certificates are the only unauthorized issuances. We contacted Fina, and the root programs we know that trust them, to ask for revocation and investigation. The certificates have been revoked.</p><p>Despite no indication of usage of these certificates so far, we take this incident extremely seriously. We have identified several steps we can take to address the risk of these sorts of problems occurring in the future, and we plan to start working on them immediately:</p><p><b>Alerting</b>: Cloudflare will improve alerts and escalation for issuance of certificates for missing Cloudflare owned domains including 1.1.1.1 certificates.</p><p><b>Transparency</b>: The issuance of these unauthorised 1.1.1.1 certificates were detected because Fina CA used Certificate Transparency. Transparency inclusion is not enforced by most DNS clients, which implies that this detection was a lucky one. We are working on bringing transparency to non-browser clients, in particular DNS clients that rely on TLS.</p><p><b>Bug Bounty</b>: Our procedure for triaging reports made through our vulnerability disclosure program was the cause for a delayed response. We are working to revise our triaging process to ensure such reports get the right visibility.</p><p><b>Monitoring</b>: During this incident, our team relied on <a href="https://crt.sh"><u>crt.sh</u></a> to provide us a convenient UI to explore CA issued certificates. We’d like to give a shout to the <a href="https://www.sectigo.com/"><u>Sectigo team</u></a> for maintaining this tool. Given Cloudflare is an active CT Monitor, we have started to build a dedicated UI to explore our data <a href="https://radar.cloudflare.com/certificate-transparency"><u>in Radar</u></a>. We are looking to enable exploration of certs with IP addresses as common names to Radar as well.</p>
    <div>
      <h3>What steps should you take?</h3>
      <a href="#what-steps-should-you-take">
        
      </a>
    </div>
    <p>This incident demonstrates the disproportionate impact that the current root store model can have. It is enough for a single certification authority going rogue for everyone to be at risk.</p><p>If you are an IT manager with a fleet of managed devices, you should consider whether you need to take direct action to revoke these unauthorized certificates. We provide the list in the timeline section above. As the certificates have since been revoked, it is possible that no direct intervention should be required; however, system-wide revocation is not instantaneous and automatic and hence we recommend checking.</p><p>If you are tasked to review the policy of a root store that includes Fina CA, you should take immediate actions to review their inclusion in your program. The issue that has been identified through the course of this investigation raises concerns, and requires a clear report and follow-up from the CA. In addition, to make it possible to detect future such incidents, you should consider having a requirement for all CAs in your root store to participate in Certificate Transparency. Without CT logs, problems such as the one we describe here are impossible to address before they result in impact to end users.</p><p>We are not suggesting that you should stop using DoH or DoT. DNS over UDP and TCP are unencrypted, which puts every single query and response at risk of tampering and unauthorised surveillance. However, we believe that DoH and DoT client security could be improved if clients required that server certificates be included in a certificate transparency log.</p>
    <div>
      <h3>Conclusion</h3>
      <a href="#conclusion">
        
      </a>
    </div>
    <p>This event is the first time we have observed a rogue issuance of a certificate used by our public DNS resolver 1.1.1.1 service. While we have no evidence this was malicious, we know that there might be future attempts that are.</p><p>We plan to accelerate how quickly we discover and alert on these types of issues ourselves. We know that we can catch these earlier, and we plan to do so.</p><p>The identification of these kinds of issues rely on an ecosystem of partners working together to support Certificate Transparency. We are grateful for the monitors who noticed and reported this issue.</p> ]]></content:encoded>
            <category><![CDATA[1.1.1.1]]></category>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[Resolver]]></category>
            <category><![CDATA[DoH]]></category>
            <category><![CDATA[TLS]]></category>
            <category><![CDATA[Certificate Authority]]></category>
            <category><![CDATA[Security]]></category>
            <category><![CDATA[Certificate Transparency]]></category>
            <guid isPermaLink="false">6dgQ2aH6eirkXOANX0QikR</guid>
            <dc:creator>Joe Abley</dc:creator>
            <dc:creator>Thibault Meunier</dc:creator>
            <dc:creator>Vicky Shrestha</dc:creator>
            <dc:creator>Bas Westerbaan</dc:creator>
        </item>
        <item>
            <title><![CDATA[Some TXT about, and A PTR to, new DNS insights on Cloudflare Radar]]></title>
            <link>https://blog.cloudflare.com/new-dns-section-on-cloudflare-radar/</link>
            <pubDate>Thu, 27 Feb 2025 14:00:00 GMT</pubDate>
            <description><![CDATA[ The new Cloudflare Radar DNS page provides increased visibility into aggregate traffic and usage trends seen by our 1.1.1.1 resolver ]]></description>
            <content:encoded><![CDATA[ <p>No joke – Cloudflare's <a href="https://www.cloudflare.com/en-gb/learning/dns/what-is-1.1.1.1/"><u>1.1.1.1 resolver</u></a> was <a href="https://blog.cloudflare.com/dns-resolver-1-1-1-1"><u>launched</u></a> on April Fool's Day in 2018. Over the last seven years, this highly <a href="https://www.dnsperf.com/#!dns-resolvers"><u>performant</u></a> and <a href="https://developers.cloudflare.com/1.1.1.1/privacy/public-dns-resolver/"><u>privacy</u></a>-<a href="https://blog.cloudflare.com/announcing-the-results-of-the-1-1-1-1-public-dns-resolver-privacy-examination"><u>conscious</u></a> service has grown to handle an average of 1.9 Trillion queries per day from approximately 250 locations (countries/regions) around the world. Aggregated analysis of this traffic provides us with unique insight into Internet activity that goes beyond simple Web traffic trends, and we currently use analysis of 1.1.1.1 data to power Radar's <a href="https://radar.cloudflare.com/domains"><u>Domains</u></a> page, as well as the <a href="https://blog.cloudflare.com/radar-domain-rankings"><u>Radar Domain Rankings</u></a>.</p><p>In December 2022, Cloudflare <a href="https://blog.cloudflare.com/the-as112-project/"><u>joined the AS112 Project</u></a>, which helps the Internet deal with misdirected DNS queries. In March 2023, we launched an <a href="https://radar.cloudflare.com/as112"><u>AS112 statistics</u></a> page on Radar, providing insight into traffic trends and query types for this misdirected traffic. Extending the basic analysis presented on that page, and building on the analysis of resolver data used for the Domains page, today we are excited to launch a dedicated DNS page on Cloudflare Radar to provide increased visibility into aggregate traffic and usage trends seen across 1.1.1.1 resolver traffic. In addition to looking at global, location, and <a href="https://www.cloudflare.com/learning/network-layer/what-is-an-autonomous-system/"><u>autonomous system (ASN)</u></a> traffic trends, we are also providing perspectives on protocol usage, query and response characteristics, and <a href="https://www.cloudflare.com/learning/dns/dnssec/how-dnssec-works/"><u>DNSSEC</u></a> usage.</p><p>The traffic analyzed for this new page may come from users that have manually configured their devices or local routers to use 1.1.1.1 as a resolver, ISPs that set 1.1.1.1 as the default resolver for their subscribers, ISPs that use 1.1.1.1 as a resolver upstream from their own, or users that have installed Cloudflare’s <a href="https://one.one.one.one/"><u>1.1.1.1/WARP app</u></a> on their device. The traffic analysis is based on anonymised DNS query logs, in accordance with <a href="https://www.cloudflare.com/privacypolicy/"><u>Cloudflare’s Privacy Policy</u></a>, as well as our <a href="https://developers.cloudflare.com/1.1.1.1/privacy/public-dns-resolver/"><u>1.1.1.1 Public DNS Resolver privacy commitments</u></a>.</p><p>Below, we walk through the sections of Radar’s new DNS page, reviewing the included graphs and the importance of the metrics they present. The data and trends shown within these graphs will vary based on the location or network that the aggregated queries originate from, as well as on the selected time frame.</p>
    <div>
      <h3>Traffic trends</h3>
      <a href="#traffic-trends">
        
      </a>
    </div>
    <p>As with many Radar metrics, the <a href="https://radar.cloudflare.com/dns"><u>DNS page</u></a> leads with traffic trends, showing normalized query volume at a worldwide level (default), or from the selected location or <a href="https://www.cloudflare.com/learning/network-layer/what-is-an-autonomous-system/"><u>autonomous system (ASN)</u></a>. Similar to other Radar traffic-based graphs, the time period shown can be adjusted using the date picker, and for the default selections (last 24 hours, last 7 days, etc.), a comparison with traffic seen over the previous period is also plotted.</p><p>For location-level views (such as <a href="https://radar.cloudflare.com/dns/lv"><u>Latvia</u></a>, in the example below), a table showing the top five ASNs by query volume is displayed alongside the graph. Showing the network’s share of queries from the selected location, the table provides insights into the providers whose users are generating the most traffic to 1.1.1.1.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4tFv24QhHPReek393iHte7/03894de5973a1fed2805f69dcd9323c6/01.png" />
            
            </figure><p>When a country/region is selected, in addition to showing an aggregate traffic graph for that location, we also show query volumes for the <a href="https://en.wikipedia.org/wiki/Country_code_top-level_domain"><u>country code top level domain (ccTLD)</u></a> associated with that country. The graph includes a line showing worldwide query volume for that ccTLD, as well as a line showing the query volume based on queries from the associated location. <a href="https://radar.cloudflare.com/dns/ai#dns-query-volume-for-ai-domains"><u>Anguilla’s</u></a> ccTLD is .ai, and is a popular choice among the growing universe of AI-focused companies. While most locations see a gap between the worldwide and “local” query volume for their ccTLD, Anguilla’s is rather significant — as the graph below illustrates, this size of the gap is driven by both the popularity of the ccTLD and Anguilla’s comparatively small user base. (Traffic for <a href="https://www.cloudflare.com/application-services/products/registrar/buy-ai-domains/">.ai domains</a> from Anguilla is shown by the dark blue line at the bottom of the graph.) Similarly, sizable gaps are seen with other “popular” ccTLDs as well, such as .io (<a href="https://radar.cloudflare.com/dns/io#dns-query-volume-for-io-domains"><u>British Indian Ocean Territory</u></a>), .fm (<a href="https://radar.cloudflare.com/dns/fm#dns-query-volume-for-fm-domains"><u>Federated States of Micronesia</u></a>), and .co (<a href="https://radar.cloudflare.com/dns/co#dns-query-volume-for-co-domains"><u>Colombia</u></a>). A higher “local” ccTLD query volume in other locations results in smaller gaps when compared to the worldwide query volume.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6LXc2OLAoHqAVbgspo5cjb/c01b9f7e90d1d27f66eb3dcb35bf2622/02.png" />
            
            </figure><p>Depending on the strength of the signal (that is, the volume of traffic) from a given location or ASN, this data can also be used to corroborate reported Internet outages or shutdowns, or reported blocking of 1.1.1.1. For example, the <a href="https://radar.cloudflare.com/dns/as8048?dateStart=2025-01-10&amp;dateEnd=2025-02-06"><u>graph below</u></a> illustrates the result of Venezuelan provider <a href="https://radar.cloudflare.com/as8048"><u>CANTV</u></a> reportedly <a href="https://x.com/vesinfiltro/status/1879943715537711233"><u>blocking access to 1.1.1.1</u></a> for its subscribers. A <a href="https://radar.cloudflare.com/dns/as22313?dateStart=2025-01-10&amp;dateEnd=2025-01-23"><u>comparable drop</u></a> is visible for <a href="https://radar.cloudflare.com/as22313"><u>Supercable</u></a>, another Venezuelan provider that also reportedly blocked access to Cloudflare’s resolver around the same time.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1hR11TuJDhzWDFhoCo3Uh7/970ecbc951edd352f80a3b87f607e580/03.png" />
            
            </figure><p>Individual domain pages (like the one for <a href="https://radar.cloudflare.com/domains/domain/cloudflare.com"><u>cloudflare.com</u></a>, for example) have long had a choropleth map and accompanying table showing the <a href="https://radar.cloudflare.com/domains/domain/cloudflare.com#visitor-location"><u>popularity of the domain by location</u></a>, based on the share of DNS queries for that domain from each location. A <a href="https://radar.cloudflare.com/dns#geographical-distribution"><u>similar view</u></a> is included at the bottom of the worldwide overview page, based on the share of total global queries to 1.1.1.1 from each location.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2kchGpH4fmYxmX4up953VC/744632815d78a9a77526e97d8c4d1664/04.png" />
            
            </figure>
    <div>
      <h3>Query and response characteristics</h3>
      <a href="#query-and-response-characteristics">
        
      </a>
    </div>
    <p>While traffic trends are always interesting and important to track, analysis of the characteristics of queries to 1.1.1.1 and the associated responses can provide insights into the adoption of underlying transport protocols, record type popularity, cacheability, and security.</p><p>Published in November 1987, <a href="https://datatracker.ietf.org/doc/html/rfc1035#section-4.2"><u>RFC 1035 notes</u></a> that “<i>The Internet supports name server access using TCP [</i><a href="https://datatracker.ietf.org/doc/html/rfc793"><i><u>RFC-793</u></i></a><i>] on server port 53 (decimal) as well as datagram access using UDP [</i><a href="https://datatracker.ietf.org/doc/html/rfc768"><i><u>RFC-768</u></i></a><i>] on UDP port 53 (decimal).</i>” Over the subsequent three-plus decades, UDP has been the primary transport protocol for DNS queries, falling back to TCP for a limited number of use cases, such as when the response is too big to fit in a single UDP packet. However, as privacy has become a significantly greater concern, encrypted queries have been made possible through the specification of <a href="https://datatracker.ietf.org/doc/html/rfc7858"><u>DNS over TLS</u></a> (DoT) in 2016 and <a href="https://datatracker.ietf.org/doc/html/rfc8484"><u>DNS over HTTPS</u></a> (DoH) in 2018. Cloudflare’s 1.1.1.1 resolver has <a href="https://blog.cloudflare.com/announcing-1111/#toward-a-better-dns-infrastructure"><u>supported both of these privacy-preserving protocols since launch</u></a>. The <a href="https://radar.cloudflare.com/dns#dns-transport-protocol"><b><u>DNS transport protocol</u></b></a> graph shows the distribution of queries to 1.1.1.1 over these four protocols. (Setting up 1.1.1.1 <a href="https://one.one.one.one/dns/"><u>on your device or router</u></a> uses DNS over UDP by default, although recent versions of <a href="https://developers.cloudflare.com/1.1.1.1/setup/android/#configure-1111-manually"><u>Android</u></a> support DoT and DoH. The <a href="https://one.one.one.one/"><u>1.1.1.1 app</u></a> uses DNS over HTTPS by default, and users can also <a href="https://developers.cloudflare.com/1.1.1.1/encryption/dns-over-https/encrypted-dns-browsers/"><u>configure their browsers</u></a> to use DNS over HTTPS.)</p><p>Note that Cloudflare's resolver also services queries over DoH and <a href="https://blog.cloudflare.com/oblivious-dns/"><u>Oblivious DoH (ODoH)</u></a> for <a href="https://developers.cloudflare.com/1.1.1.1/privacy/cloudflare-resolver-firefox/"><u>Mozilla</u></a> and other large platforms, but this traffic is not currently included in our analysis. As such, DoH adoption is under-represented in this graph.</p><p>Aggregated worldwide between February 19 - February 26, distribution of transport protocols was 86.6% for UDP, 9.6% for DoT, 2.0% for TCP, and 1.7% for DoH. However, in some locations, these ratios may shift if users are more privacy conscious. For example, the graph below shows the distribution for <a href="https://radar.cloudflare.com/dns/eg"><u>Egypt</u></a> over the same time period. In that country, the UDP and TCP shares are significantly lower than the global level, while the DoT and DoH shares are significantly higher, suggesting that users there may be more concerned about the privacy of their DNS queries than the global average, or that there is a larger concentration of 1.1.1.1 users on Android devices who have set up 1.1.1.1 using DoT manually. (The 2024 Cloudflare Radar Year in Review found that <a href="https://radar.cloudflare.com/year-in-review/2024/eg#ios-vs-android"><u>Android had an 85% mobile device traffic share in Egypt</u></a>, so mobile device usage in the country leans very heavily toward Android.)</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1srd6prVQCUxHvxw8eFNjL/987f2d925120be867174fd04a8c7eb2c/05-b.png" />
            
            </figure><p>RFC 1035 also defined a number of <a href="https://datatracker.ietf.org/doc/html/rfc1035#section-3.3"><u>standard</u></a> and <a href="https://datatracker.ietf.org/doc/html/rfc1035#section-3.4"><u>Internet specific</u></a> resource record types that return the associated information about the submitted query name. The most common record types are <code>A</code> and <code>AAAA</code>, which return the hostname’s IPv4 and IPv6 addresses respectively (assuming they exist). The <a href="https://radar.cloudflare.com/dns#dns-query-type"><b><u>DNS query type</u></b></a> graph below shows that globally, these two record types comprise on the order of 80% of the queries received by 1.1.1.1. Among the others shown in the graph, <a href="https://blog.cloudflare.com/speeding-up-https-and-http-3-negotiation-with-dns/#service-bindings-via-dns"><code><u>HTTPS</u></code></a> records can be used to signal HTTP/3 and HTTP/2 support, <a href="https://www.cloudflare.com/learning/dns/dns-records/dns-ptr-record/"><code><u>PTR</u></code></a> records are used in reverse DNS records to look up a domain name based on a given IP address, and <a href="https://www.cloudflare.com/learning/dns/dns-records/dns-ns-record/"><code><u>NS</u></code></a> records indicate authoritative nameservers for a domain.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3LI2EW249EtFFX5FvlONDg/4b150dfbdd8de5c0e9def9eb18c81d70/06.png" />
            
            </figure><p>A response code is sent with each response from 1.1.1.1 to the client. Six possible values were <a href="https://datatracker.ietf.org/doc/html/rfc1035#section-4.1.1"><u>originally defined in RFC 1035</u></a>, with the list <a href="https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-6"><u>further extended</u></a> in <a href="https://datatracker.ietf.org/doc/html/rfc2136"><u>RFC 2136</u></a> and <a href="https://datatracker.ietf.org/doc/html/rfc2671"><u>RFC 2671</u></a>. <code>NOERROR</code>, as the name suggests, means that no error condition was encountered with the query. Others, such as <code>NXDOMAIN</code>, <code>SERVFAIL</code>, <code>REFUSED</code>, and <code>NOTIMP</code> define specific error conditions encountered when trying to resolve the requested query name. The response codes may be generated by 1.1.1.1 itself (like <code>REFUSED</code>) or may come from an upstream authoritative nameserver (like <code>NXDOMAIN</code>).</p><p>The <a href="https://radar.cloudflare.com/dns#dns-response-code"><b><u>DNS response code</u></b></a> graph shown below highlights that the vast majority of queries seen globally do not encounter an error during the resolution process (<code>NOERROR</code>), and that when errors are encountered, most are <a href="https://datatracker.ietf.org/doc/html/rfc8020"><code><u>NXDOMAIN</u></code></a> (no such record). It is worth noting that <code>NOERROR</code> also includes empty responses, which occur when there are no records for the query name and query type, but there are records for the query name and some other query type.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6ZXQ8kcT0H7zfb8najn42C/df8c8c2f54c492484bb5d59f437eee5d/07.png" />
            
            </figure><p>With DNS being a first-step dependency for many other protocols, the amount of queries of particular types can be used to indirectly measure the adoption of those protocols. But to effectively measure adoption, we should also consider the fraction of those queries that are met with useful responses, which are represented with the <a href="https://radar.cloudflare.com/dns#dns-record-adoption"><b><u>DNS record adoption</u></b></a> graphs.</p><p>The example below shows that queries for <code>A</code> records are met with a useful response nearly 88% of the time. As IPv4 is an established protocol, the remaining 12% are likely to be queries for valid hostnames that have no <code>A </code>records (e.g. email domains that only have MX records). But the same graph also shows that there’s still a <a href="https://blog.cloudflare.com/ipv6-from-dns-pov/"><u>significant adoption gap</u></a> where IPv6 is concerned.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6blxaHcK6UtPp67V3SGNML/daed03be6793aab32ec21b2bb2f08374/08.png" />
            
            </figure><p>When Cloudflare’s DNS resolver gets a response back from an upstream authoritative nameserver, it caches it for a specified amount of time — more on that below. By caching these responses, it can more efficiently serve subsequent queries for the same name. The <a href="https://radar.cloudflare.com/dns#dns-cache-hit-ratio"><b><u>DNS cache hit ratio</u></b></a> graph provides insight into how frequently responses are served from cache. At a global level, as seen below, over 80% of queries have a response that is already cached. These ratios will vary by location or ASN, as the query patterns differ across geographies and networks.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/sj0gBv53GdPF0slfGlKlr/fa86ff6fc610aefad2e675c5dc926f54/09.png" />
            
            </figure><p>As noted in the preceding paragraph, when an authoritative nameserver sends a response back to 1.1.1.1, each record inside it includes information about how long it should be cached/considered valid for. This piece of information is known as the <a href="https://developers.cloudflare.com/dns/manage-dns-records/reference/ttl/"><u>Time-To-Live (TTL)</u></a> and, as a response may contain multiple records, the smallest of these TTLs (the “minimum” TTL) defines how long 1.1.1.1 can cache the entire response for. The TTLs on each response served from 1.1.1.1’s cache decrease towards zero as time passes, at which point 1.1.1.1 needs to go back to the authoritative nameserver. Hostnames with relatively low TTL values suggest that the records may be somewhat dynamic, possibly due to traffic management of the associated resources; longer TTL values suggest that the associated resources are more stable and expected to change infrequently.</p><p>The <a href="https://radar.cloudflare.com/dns#dns-minimum-ttl"><b><u>DNS minimum TTL</u></b></a> graphs show the aggregate distribution of TTL values for five popular DNS record types, broken out across seven buckets ranging from under one minute to over one week. During the third week of February, for example, <code>A</code> and <code>AAAA</code> responses had a concentration of low TTLs, with over 80% below five minutes. In contrast, <code>NS</code> and <code>MX</code> responses were more concentrated across 15 minutes to one hour and one hour to one day. Because <code>MX</code> and <code>NS</code> records change infrequently, they are generally configured with higher TTLs. This allows them to be cached for longer periods in order to achieve faster DNS resolution.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3r6ppahpkqyfAHi89LWNA1/6dc6f52e92c1d7aa2dfaeaa411deb982/10.png" />
            
            </figure>
    <div>
      <h3>DNS security</h3>
      <a href="#dns-security">
        
      </a>
    </div>
    <p><a href="https://www.cloudflare.com/learning/dns/dns-security/"><u>DNS Security Extensions (DNSSEC)</u></a> add an extra layer of authentication to DNS establishing the integrity and authenticity of a DNS response. This ensures subsequent HTTPS requests are not routed to a spoofed domain. When sending a query to 1.1.1.1, a DNS client can indicate that it is DNSSEC-aware by setting a specific flag (the “DO” bit) in the query, which lets our resolver know that it is OK to return DNSSEC data in the response. The <a href="https://radar.cloudflare.com/dns#dnssec-client-awareness"><b><u>DNSSEC client awareness</u></b></a> graph breaks down the share of queries that 1.1.1.1 sees from clients that understand DNSSEC and can require validation of responses vs. those that don’t. (Note that by default, 1.1.1.1 tries to protect clients by always validating DNSSEC responses from authoritative nameservers and not forwarding invalid responses to clients, unless the client has explicitly told it not to by setting the “CD” (checking-disabled) bit in the query.)</p><p>Unfortunately, as the graph below shows, nearly 90% of the queries seen by Cloudflare’s resolver are made by clients that are not DNSSEC-aware. This broad lack of client awareness may be due to several factors. On the client side, DNSSEC is not enabled by default for most users, and enabling DNSSEC requires extra work, even for technically savvy and security conscious users. On the authoritative side, for domain owners, supporting DNSSEC requires extra operational maintenance and knowledge, and a mistake can cost your domain to <a href="https://blog.cloudflare.com/dnssec-issues-fiji/"><u>disappear from the Internet</u></a>, causing significant (including financial) issues.</p><p>The companion <a href="https://radar.cloudflare.com/dns#end-to-end-security"><b><u>End-to-end security</u></b></a> graph represents the fraction of DNS interactions that were protected from tampering, when considering the client’s DNSSEC capabilities and use of encryption (use of DoT or DoH). This shows an even greater imbalance at a global level, and highlights the importance of further adoption of encryption and DNSSEC.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6nErpp8o9tPuE0jt5PQ3fg/3e509065967a8f43c6679d400fd31454/11.png" />
            
            </figure><p>For DNSSEC validation to occur, the query name being requested must be part of a DNSSEC-enabled domain, and the <a href="https://radar.cloudflare.com/dns#dnssec-validation-status"><b><u>DNSSEC validation status</u></b></a> graph represents the share of queries where that was the case under the <b>Secure</b> and <b>Invalid</b> labels. Queries for domains without DNSSEC are labeled as <b>Insecure</b>, and queries where DNSSEC validation was not applicable (such as various kinds of errors) fall under the <b>Other</b> label. Although nearly 93% of generic Top Level Domains (TLDs) and 65% of country code Top Level Domains (ccTLDs) are <a href="https://ithi.research.icann.org/graph-m7.html"><u>signed with DNSSEC</u></a> (as of February 2025), the adoption rate across individual (child) domains lags significantly, as the graph below shows that over 80% of queries were labeled as <b>Insecure</b>.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3shBkfRYcpHKgXI6Y9jcjq/26929261c5c6800fa1fee562dad5ce53/12.png" />
            
            </figure>
    <div>
      <h3>Conclusion</h3>
      <a href="#conclusion">
        
      </a>
    </div>
    <p>DNS is a fundamental, foundational part of the Internet. While most Internet users don’t think of DNS beyond its role in translating easy-to-remember hostnames to IP addresses, there’s a lot going on to make even that happen, from privacy to performance to security. The new DNS page on Cloudflare Radar endeavors to provide visibility into what’s going on behind the scenes, at a global, national, and network level.</p><p>While the graphs shown above are taken from the DNS page, all the underlying data is available via the <a href="https://developers.cloudflare.com/api/resources/radar/subresources/dns/"><u>API</u></a> and can be interactively explored in more detail across locations, networks, and time periods using Radar’s <a href="https://radar.cloudflare.com/explorer?dataSet=dns"><u>Data Explorer and AI Assistant</u></a>. And as always, Radar and Data Assistant charts and graphs are downloadable for sharing, and embeddable for use in your own blog posts, websites, or dashboards.</p><p>If you share our DNS graphs on social media, be sure to tag us: <a href="https://x.com/CloudflareRadar"><u>@CloudflareRadar</u></a> and <a href="https://x.com/1111Resolver"><u>@1111Resolver</u></a> (X), <a href="https://noc.social/@cloudflareradar"><u>noc.social/@cloudflareradar</u></a> (Mastodon), and <a href="https://bsky.app/profile/radar.cloudflare.com"><u>radar.cloudflare.com</u></a> (Bluesky). If you have questions or comments, you can reach out to us on social media, or contact us via <a href="#"><u>email</u></a>.</p> ]]></content:encoded>
            <category><![CDATA[1.1.1.1]]></category>
            <category><![CDATA[Radar]]></category>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[Resolver]]></category>
            <category><![CDATA[DNSSEC]]></category>
            <category><![CDATA[DoH]]></category>
            <category><![CDATA[Traffic]]></category>
            <guid isPermaLink="false">2aI8Y4m36DD0HQghRNFZ2n</guid>
            <dc:creator>David Belson</dc:creator>
            <dc:creator>Carlos Rodrigues</dc:creator>
            <dc:creator>Vicky Shrestha</dc:creator>
            <dc:creator>Hannes Gerhart</dc:creator>
        </item>
        <item>
            <title><![CDATA[Remediating new DNSSEC resource exhaustion vulnerabilities]]></title>
            <link>https://blog.cloudflare.com/remediating-new-dnssec-resource-exhaustion-vulnerabilities/</link>
            <pubDate>Thu, 29 Feb 2024 14:00:57 GMT</pubDate>
            <description><![CDATA[ Cloudflare recently fixed two critical DNSSEC vulnerabilities: CVE-2023-50387 and CVE-2023-50868. Both of these vulnerabilities can exhaust computational resources of validating DNS resolvers. These vulnerabilities do not affect our Authoritative DNS or DNS firewall products ]]></description>
            <content:encoded><![CDATA[ <p></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4aQzvD1YJLHbGjaALKlC8e/23b4147ceed9f1d364101fe3fcbda244/image1-13.png" />
            
            </figure><p>Cloudflare has been part of a multivendor, industry-wide effort to mitigate two critical <a href="https://www.cloudflare.com/dns/dnssec/how-dnssec-works/">DNSSEC</a> vulnerabilities. These vulnerabilities exposed significant risks to critical infrastructures that provide DNS resolution services. Cloudflare provides DNS resolution for anyone to use for free with our <a href="/dns-resolver-1-1-1-1">public resolver 1.1.1.1 service</a>. Mitigations for Cloudflare’s public resolver 1.1.1.1 service were applied before these vulnerabilities were disclosed publicly. Internal resolvers using <a href="https://nlnetlabs.nl/projects/unbound/about/">unbound</a> (open source software) were upgraded promptly after a new software version fixing these vulnerabilities was released.</p><p>All Cloudflare DNS infrastructure was protected from both of these vulnerabilities before they were <a href="https://www.athene-center.de/fileadmin/content/PDF/Technical_Report_KeyTrap.pdf">disclosed</a> and is safe today. These vulnerabilities do not affect our <a href="https://www.cloudflare.com/application-services/products/dns/">Authoritative DNS</a> or <a href="https://www.cloudflare.com/dns/dns-firewall/">DNS firewall</a> products.</p><p>All major DNS software vendors have released new versions of their software. All other major DNS resolver providers have also applied appropriate mitigations. Please update your DNS resolver software immediately, if you haven’t done so already.</p>
    <div>
      <h2>Background</h2>
      <a href="#background">
        
      </a>
    </div>
    <p>Domain name system (DNS) security extensions, commonly known as <a href="https://www.cloudflare.com/learning/dns/dnssec/ecdsa-and-dnssec/">DNSSEC</a>, are extensions to the DNS protocol that add authentication and integrity capabilities. DNSSEC uses cryptographic keys and signatures that allow DNS responses to be validated as authentic. DNSSEC protocol specifications have certain requirements that prioritize availability at the cost of increased complexity and computational cost for the validating DNS resolvers. The mitigations for the vulnerabilities discussed in this blog require local policies to be applied that relax these requirements in order to avoid exhausting the resources of validators.</p><p>The design of the DNS and DNSSEC protocols follows the <a href="https://datatracker.ietf.org/doc/html/rfc761#section-2.10">Robustness principle</a>: “be conservative in what you do, be liberal in what you accept from others”. There have been many vulnerabilities in the past that have taken advantage of protocol requirements following this principle. Malicious actors can exploit these vulnerabilities to attack DNS infrastructure, in this case by causing additional work for DNS resolvers by crafting DNSSEC responses with complex configurations. As is often the case, we find ourselves having to create a pragmatic balance between the flexibility that allows a protocol to adapt and evolve and the need to safeguard the stability and security of the services we operate.</p><p>Cloudflare’s public resolver 1.1.1.1 is a <a href="https://developers.cloudflare.com/1.1.1.1/privacy/public-dns-resolver/">privacy-centric</a> public resolver service. We have been using stricter validations and limits aimed at protecting our own infrastructure in addition to shielding authoritative DNS servers operated outside our network. As a result, we often receive complaints about resolution failures. Experience shows us that strict validations and limits can impact availability in some edge cases, especially when DNS domains are improperly configured. However, these strict validations and limits are necessary to improve the overall reliability and resilience of the DNS infrastructure.</p><p>The vulnerabilities and how we mitigated them are described below.</p>
    <div>
      <h2>Keytrap vulnerability (<a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-50387">CVE-2023-50387</a>)</h2>
      <a href="#keytrap-vulnerability">
        
      </a>
    </div>
    
    <div>
      <h3>Introduction</h3>
      <a href="#introduction">
        
      </a>
    </div>
    <p>A DNSSEC signed zone can contain multiple keys (DNSKEY) to sign the contents of a DNS zone and a Resource Record Set (RRSET) in a DNS response can have multiple signatures (RRSIG). Multiple keys and signatures are required to support things like key rollover, algorithm rollover, and <a href="https://datatracker.ietf.org/doc/html/rfc8901">multi-signer DNSSEC</a>. DNSSEC protocol specifications require a validating DNS resolver to <a href="https://datatracker.ietf.org/doc/html/rfc4035#section-5.3.3">try every possible combination of keys and signatures</a> when validating a DNS response.</p><p>During validation, a resolver looks at the key tag of every signature and tries to find the associated key that was used to sign it. A key tag is an unsigned 16-bit number <a href="https://datatracker.ietf.org/doc/html/rfc4034#appendix-B">calculated as a checksum</a> over the key’s resource data (RDATA). Key tags are intended to allow efficient pairing of a signature with the key which has supposedly created it.  However, key tags are not unique, and it is possible that multiple keys can have the same key tag. A malicious actor can easily craft a DNS response with multiple keys having the same key tag together with multiple signatures, none of which might validate. A validating resolver would have to try every combination (number of keys multiplied by number of signatures) when trying to validate this response. This increases the computational cost of the validating resolver many-fold, degrading performance for all its users. This is known as the Keytrap vulnerability.</p><p>Variations of this vulnerability include using multiple signatures with one key, using one signature with multiple keys having colliding key tags, and using multiple keys with corresponding hashes added to the parent delegation signer record.</p>
    <div>
      <h3>Mitigation</h3>
      <a href="#mitigation">
        
      </a>
    </div>
    <p>We have limited the maximum number of keys we will accept at a zone cut. A zone cut is where a parent zone delegates to a child zone, e.g. where the .com zone delegates cloudflare.com to Cloudflare nameservers. Even with this limit already in place and various other protections built for our platform, we realized that it would still be computationally costly to process a malicious DNS answer from an authoritative DNS server.</p><p>To address and further mitigate this vulnerability, we added a signature validations limit per RRSET and a total signature validations limit per resolution task. One resolution task might include multiple recursive queries to external authoritative DNS servers in order to answer a single DNS question. Clients queries exceeding these limits will fail to resolve and will receive a response with an Extended DNS Error (<a href="/unwrap-the-servfail/">EDE</a>) <a href="https://datatracker.ietf.org/doc/html/rfc8914#name-extended-dns-error-code-0-o">code 0</a>. Furthermore, we added metrics which will allow us to detect attacks attempting to exploit this vulnerability.</p>
    <div>
      <h2>NSEC3 iteration and closest encloser proof vulnerability (<a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-50868">CVE-2023-50868</a>)</h2>
      <a href="#nsec3-iteration-and-closest-encloser-proof-vulnerability">
        
      </a>
    </div>
    
    <div>
      <h3>Introduction</h3>
      <a href="#introduction">
        
      </a>
    </div>
    <p><a href="https://datatracker.ietf.org/doc/html/rfc5155">NSEC3</a> is an alternative approach for authenticated denial of existence. You can learn more about authenticated denial of existence <a href="/black-lies/">here</a>. NSEC3 uses a hash derived from DNS names instead of the DNS names directly in an attempt to prevent zone enumeration and the standard supports multiple iterations for hash calculations. However, because the full DNS name is used as input to the hash calculation, increasing hashing iterations beyond the initial doesn’t provide any additional value and is not recommended in <a href="https://datatracker.ietf.org/doc/html/rfc9276#name-iterations">RFC9276</a>. This complication is further inflated while finding the <a href="https://datatracker.ietf.org/doc/html/rfc5155#section-8.3">closest enclosure proof</a>. A malicious DNS response from an authoritative DNS server can set a high NSEC3 iteration count and long DNS names with multiple DNS labels to exhaust the computing resources of a validating resolver by making it do unnecessary hash computations.</p>
    <div>
      <h3>Mitigation</h3>
      <a href="#mitigation">
        
      </a>
    </div>
    <p>For this vulnerability, we applied a similar mitigation technique as we did for Keytrap. We added a limit for total hash calculations per resolution task to answer a single DNS question. Similarly, clients queries exceeding this limit will fail to resolve and will receive a response with an EDE <a href="https://datatracker.ietf.org/doc/html/rfc9276.html#section-6">code 27</a>. We also added metrics to track hash calculations allowing early detection of attacks attempting to exploit this vulnerability.</p>
    <div>
      <h2>Timeline</h2>
      <a href="#timeline">
        
      </a>
    </div>
    <table>
	<tbody>
		<tr>
			<td>
			<p><strong><span><span><span><span>Date and time in UTC</span></span></span></span></strong></p>
			</td>
			<td>
			<p><strong><span><span><span><span>Event</span></span></span></span></strong></p>
			</td>
		</tr>
		<tr>
			<td>
			<p><span><span><span><span>2023-11-03 16:05</span></span></span></span></p>
			</td>
			<td>
			<p><span><span><span><span>John Todd from </span></span></span></span><a href="https://quad9.net/"><span><span><span><span><u>Quad9</u></span></span></span></span></a><span><span><span><span> invites Cloudflare to participate in a joint task force to discuss a new DNS vulnerability. </span></span></span></span></p>
			</td>
		</tr>
		<tr>
			<td>
			<p><span><span><span>2023-11-07 14:30</span></span></span></p>
			</td>
			<td>
			<p><span><span><span><span>A group of DNS vendors and service providers meet to discuss the vulnerability during </span></span></span></span><a href="https://www.ietf.org/blog/ietf118-highlights/"><span><span><span><span><u>IETF 118</u></span></span></span></span></a><span><span><span><span>. Discussions and collaboration continues in a closed chat group hosted at </span></span></span></span><a href="https://dns-oarc.net/oarc/services/chat"><span><span><span><span><u>DNS-OARC</u></span></span></span></span></a></p>
			</td>
		</tr>
		<tr>
			<td>
			<p><span><span><span>2023-12-08 20:20</span></span></span></p>
			</td>
			<td>
			<p><span><span><span><span>Cloudflare public resolver 1.1.1.1 is fully patched to mitigate Keytrap vulnerability (</span></span></span></span><a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-50387"><span><span><span><u>CVE-2023-50387</u></span></span></span></a><span><span><span><span>)</span></span></span></span></p>
			</td>
		</tr>
		<tr>
			<td>
			<p><span><span><span><span>2024-01-17 22:39</span></span></span></span></p>
			</td>
			<td>
			<p><span><span><span><span>Cloudflare public resolver 1.1.1.1 is fully patched to mitigate NSEC3 iteration count and closest encloser vulnerability (</span></span></span></span><a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-50868"><span><span><span><u>CVE-2023-50868</u></span></span></span></a><span><span><span><span>)</span></span></span></span></p>
			</td>
		</tr>
		<tr>
			<td>
			<p><span><span><span>2024-02-13 13:04</span></span></span></p>
			</td>
			<td>
			<p><a href="https://nlnetlabs.nl/news/2024/Feb/13/unbound-1.19.1-released/"><span><span><span><span><u>Unbound</u></span></span></span></span></a><span><span><span><span> package is released </span></span></span></span></p>
			</td>
		</tr>
		<tr>
			<td>
			<p><span><span><span>2024-02-13 23:00</span></span></span></p>
			</td>
			<td>
			<p><span><span><span><span>Cloudflare internal CDN resolver is fully patched to mitigate both </span></span></span></span><a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-50387"><span><span><span><u>CVE-2023-50387</u></span></span></span></a><span><span><span><span> and </span></span></span></span><a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-50868"><span><span><span><u>CVE-2023-50868</u></span></span></span></a></p>
			</td>
		</tr>
	</tbody>
</table>
    <div>
      <h2>Credits</h2>
      <a href="#credits">
        
      </a>
    </div>
    <p>We would like to thank Elias Heftrig, Haya Schulmann, Niklas Vogel, Michael Waidner from the German National Research Center for Applied Cybersecurity <a href="https://www.athene-center.de/en/">ATHENE</a>, for discovering the <a href="https://www.athene-center.de/fileadmin/content/PDF/Technical_Report_KeyTrap.pdf">Keytrap vulnerability</a> and doing a responsible disclosure.</p><p>We would like to thank Petr Špaček from Internet Systems Consortium (<a href="https://www.isc.org/">ISC</a>) for discovering the <a href="https://www.isc.org/blogs/2024-bind-security-release/">NSEC3 iteration and closest encloser proof vulnerability</a> and doing a responsible disclosure.</p><p>We would like to thank John Todd from <a href="https://quad9.net/">Quad9</a>  and the DNS Operations Analysis and Research Center (<a href="https://dns-oarc.net/">DNS-OARC</a>) for facilitating coordination amongst various stakeholders.</p><p>And finally, we would like to thank the DNS-OARC community members, representing various DNS vendors and service providers, who all came together and worked tirelessly to fix these vulnerabilities, working towards a common goal of making the internet resilient and secure.</p> ]]></content:encoded>
            <category><![CDATA[DNSSEC]]></category>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[Resolver]]></category>
            <category><![CDATA[1.1.1.1]]></category>
            <category><![CDATA[Vulnerabilities]]></category>
            <category><![CDATA[KeyTrap]]></category>
            <category><![CDATA[NSEC3]]></category>
            <category><![CDATA[CVE-2023-50387]]></category>
            <guid isPermaLink="false">5KGfAQ21FRucS2X625z4FX</guid>
            <dc:creator>Vicky Shrestha</dc:creator>
            <dc:creator>Anbang Wen</dc:creator>
        </item>
        <item>
            <title><![CDATA[How Rust and Wasm power Cloudflare's 1.1.1.1]]></title>
            <link>https://blog.cloudflare.com/big-pineapple-intro/</link>
            <pubDate>Tue, 28 Feb 2023 14:00:00 GMT</pubDate>
            <description><![CDATA[ Introducing a new DNS platform that powers 1.1.1.1 and various other products. ]]></description>
            <content:encoded><![CDATA[ <p></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4tun8W7xGXu4HnA6zxJK7b/07afefd11804c7b7b441a4b102650465/image1-11.png" />
            
            </figure><p>On April 1, 2018, Cloudflare <a href="/dns-resolver-1-1-1-1/">announced</a> the 1.1.1.1 public DNS resolver. Over the years, we added the <a href="https://1.1.1.1/help">debug page</a> for troubleshooting, global <a href="https://1.1.1.1/purge-cache/">cache purge</a>, 0 TTL for zones on Cloudflare, <a href="/encrypting-dns-end-to-end/">Upstream TLS</a>, and <a href="/introducing-1-1-1-1-for-families/">1.1.1.1 for families</a> to the platform. In this post, we would like to share some behind the scenes details and changes.</p><p>When the project started, <a href="https://www.knot-resolver.cz/">Knot Resolver</a> was chosen as the DNS resolver. We started building a whole system on top of it, so that it could fit Cloudflare's use case. Having a battle tested DNS recursive resolver, as well as a DNSSEC validator, was fantastic because we could spend our energy elsewhere, instead of worrying about the DNS protocol implementation.</p><p>Knot Resolver is quite flexible in terms of its Lua-based plugin system. It allowed us to quickly extend the core functionality to support various product features, like DoH/DoT, logging, BPF-based attack mitigation, cache sharing, and iteration logic override. As the <a href="https://mobile.twitter.com/eastdakota/status/1103800276102729729">traffic grew</a>, we reached certain limitations.</p>
    <div>
      <h2>Lessons we learned</h2>
      <a href="#lessons-we-learned">
        
      </a>
    </div>
    <p>Before going any deeper, let’s first have a bird’s-eye view of a simplified Cloudflare data center setup, which could help us understand what we are going to talk about later. At Cloudflare, every server is identical: the software stack running on one server is exactly the same as on another server, only the configuration may be different. This setup greatly reduces the complexity of fleet maintenance.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/346cYMKrtotPKZx6GcoDMX/e9ab5a9834ace47e28faee2c198dca50/colo_kresd.png" />
            
            </figure><p>Figure 1 Data center layout</p><p>The resolver runs as a daemon process, kresd, and it doesn’t work alone. Requests, specifically DNS requests, are load-balanced to the servers inside a data center by <a href="/unimog-cloudflares-edge-load-balancer/">Unimog</a>. DoH requests are terminated at our TLS terminator. Configs and other small pieces of data can be delivered worldwide by <a href="/introducing-quicksilver-configuration-distribution-at-internet-scale/">Quicksilver</a> in seconds. With all the help, the resolver can concentrate on its own goal - resolving DNS queries, and not worrying about transport protocol details. Now let’s talk about 3 key areas we wanted to improve here - blocking I/O in plugins, a more efficient use of cache space, and plugin isolation.</p>
    <div>
      <h3>Callbacks blocking the event loop</h3>
      <a href="#callbacks-blocking-the-event-loop">
        
      </a>
    </div>
    <p>Knot Resolver has a very flexible plugin system for extending its core functionality. The plugins are called modules, and they are based on callbacks. At certain points during request processing, these callbacks will be invoked with current query context. This gives a module the ability to inspect, modify, and even produce requests / responses. By design, these callbacks are supposed to be simple, in order to avoid blocking the underlying event loop. This matters because the service is single threaded, and the event loop is in charge of serving many requests at the same time. So even just one request being held up in a callback means that no other concurrent requests can be progressed until the callback finishes.</p><p>The setup worked well enough for us until we needed to do blocking operations, for example, to pull data from Quicksilver before responding to the client.</p>
    <div>
      <h3>Cache efficiency</h3>
      <a href="#cache-efficiency">
        
      </a>
    </div>
    <p>As requests for a domain could land on any node inside a data center, it would be wasteful to repetitively resolve a query when another node already has the answer. By intuition, the latency could be improved if the cache could be shared among the servers, and so we created a cache module which multicasted the newly added cache entries. Nodes inside the same data center could then subscribe to the events and update their local cache.</p><p>The default cache implementation in Knot Resolver is <a href="https://www.symas.com/lmdb">LMDB</a>. It is fast and reliable for small to medium deployments. But in our case, cache eviction shortly became a problem. The cache itself doesn’t track for any TTL, popularity, etc. When it’s full, it just clears all the entries and starts over. Scenarios like zone enumeration could fill the cache with data that is unlikely to be retrieved later.</p><p>Furthermore, our multicast cache module made it worse by amplifying the less useful data to all the nodes, and led them to the cache high watermark at the same time. Then we saw a latency spike because all the nodes dropped the cache and started over around the same time.</p>
    <div>
      <h3>Module isolation</h3>
      <a href="#module-isolation">
        
      </a>
    </div>
    <p>With the list of Lua modules increasing, debugging issues became increasingly difficult. This is because a single Lua state is shared among all the modules, so one misbehaving module could affect another. For example, when something went wrong inside the Lua state, like having too many coroutines, or being out of memory, we got lucky if the program just crashed, but the resulting stack traces were hard to read. It is also difficult to forcibly tear down, or upgrade, a running module as it not only has state in the Lua runtime, but also FFI, so memory safety is not guaranteed.</p>
    <div>
      <h2>Hello BigPineapple</h2>
      <a href="#hello-bigpineapple">
        
      </a>
    </div>
    <p>We didn’t find any existing software that would meet our somewhat niche requirements, so eventually we started building something ourselves. The first attempt was to <a href="https://github.com/vavrusa/rust-kres">wrap Knot Resolver's core</a> with a thin service written in Rust (modified <a href="https://github.com/jedisct1/edgedns">edgedns</a>).</p><p>This proved to be difficult due to having to constantly convert between the storage, and C/FFI types, and some other quirks (for example, the ABI for looking up records from cache expects the returned records to be immutable until the next call, or the end of the read transaction). But we learned a lot from trying to implement this sort of split functionality where the host (the service) provides some resources to the guest (resolver core library), and how we would make that interface better.</p><p>In the later iterations, we replaced the entire recursive library with a new one based around an async runtime; and a redesigned module system was added to it, sneakily rewriting the service into Rust over time as we swapped out more and more components. That async runtime was <a href="https://tokio.rs/">tokio</a>, which offered a neat thread pool interface for running both non-blocking and blocking tasks, as well as a good ecosystem for working with other crates (Rust libraries).</p><p>After that, as the futures combinators became tedious, we started converting everything to async/await. This was before the async/await feature that landed in Rust 1.39, which led us to use nightly (Rust beta) for a while and had <a href="https://areweasyncyet.rs/">some hiccups</a>. When the async/await stabilized, it enabled us to write our request processing routine ergonomically, similar to Go.</p><p>All the tasks can be run concurrently, and certain I/O heavy ones can be broken down into smaller pieces, to benefit from a more granular scheduling. As the runtime executes tasks on a threadpool, instead of a single thread, it also benefits from work stealing. This avoids a problem we previously had, where a single request taking a lot of time to process, that blocks all the other requests on the event loop.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/72roTqirnpOZTjQpp36q4t/ec16e695ef22b93f475df0eed9e21f9e/blog_server.png" />
            
            </figure><p>Figure 2 Components overview</p><p>Finally, we forged a platform that we are happy with, and we call it <b>BigPineapple</b>. The figure above shows an overview of its main components and the data flow between them. Inside BigPineapple, the server module gets inbound requests from the client, validates and transforms them into unified frame streams, which can then be processed by the worker module. The worker module has a set of workers, whose task is to figure out the answer to the question in the request. Each worker interacts with the cache module to check if the answer is there and still valid, otherwise it drives the recursor module to recursively iterate the query. The recursor doesn’t do any I/O, when it needs anything, it delegates the sub-task to the conductor module. The conductor then uses outbound queries to get the information from upstream nameservers. Through the whole process, some modules can interact with the Sandbox module, to extend its functionality by running the plugins inside.</p><p>Let’s look at some of them in more detail, and see how they helped us overcome the problems we had before.</p>
    <div>
      <h3>Updated I/O architecture</h3>
      <a href="#updated-i-o-architecture">
        
      </a>
    </div>
    <p>A DNS resolver can be seen as an agent between a client and several authoritative nameservers: it receives requests from the client, recursively fetches data from the upstream nameservers, then composes the responses and sends them back to the client. So it has both inbound and outbound traffic, which are handled by the server and the conductor component respectively.</p><p>The server listens on a list of interfaces using different transport protocols. These are later abstracted into streams of “frames”. Each frame is a high level representation of a DNS message, with some extra metadata. Underneath, it can be a UDP packet, a segment of TCP stream, or the payload of a HTTP request, but they are all processed the same way. The frame is then converted into an asynchronous task, which in turn is picked up by a set of workers in charge of resolving these tasks. The finished tasks are converted back into responses, and sent back to the client.</p><p>This “frame” abstraction over the protocols and their encodings simplified the logic used to regulate the frame sources, such as enforcing fairness to prevent starving and controlling pacing to protect the server from being overwhelmed. One of the things we’ve learned with the previous implementations is that, for a service open to the public, a peak performance of the I/O matters less than the ability to pace clients fairly. This is mainly because the time and computational cost of each recursive request is vastly different (for example a cache hit from a cache miss), and it’s difficult to guess it beforehand. The cache misses in recursive service not only consume Cloudflare’s resources, but also the resources of the authoritative nameservers being queried, so we need to be mindful of that.</p><p>On the other side of the server is the conductor, which manages all the outbound connections. It helps to answer some questions before reaching out to the upstream: Which is the fastest nameserver to connect to in terms of latency? What to do if all the nameservers are not reachable? What protocol to use for the connection, and are there any <a href="https://engineering.fb.com/2018/12/21/security/dns-over-tls/">better options</a>? The conductor is able to make these decisions by tracking the upstream server’s metrics, such as <a href="https://www.cloudflare.com/learning/cdn/glossary/round-trip-time-rtt/">RTT</a>, QoS, etc. With that knowledge, it can also guess for things like upstream capacity, UDP packet loss, and take necessary actions, e.g. retry when it thinks the previous UDP packet didn’t reach the upstream.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3oLCVKn5GkZd5SmRnuYSmL/fd8c90e52308efd01698c40d09c724d6/conductor-1-.png" />
            
            </figure><p>Figure 3 I/O conductor</p><p>Figure 3 shows a simplified data flow about the conductor. It is called by the exchanger mentioned above, with upstream requests as input. The requests will be deduplicated first: meaning in a small window, if a lot of requests come to the conductor and ask for the same question, only one of them will pass, the others are put into a waiting queue. This is common when a cache entry expires, and can reduce unnecessary network traffic. Then based on the request and upstream metrics, the connection instructor either picks an open connection if available, or generates a set of parameters. With these parameters, the I/O executor is able to connect to the upstream directly, or even take a route via another Cloudflare data center using our <a href="/argo/">Argo Smart Routing technology</a>!</p>
    <div>
      <h3>The cache</h3>
      <a href="#the-cache">
        
      </a>
    </div>
    <p>Caching in a recursive service is critical as a server can return a cached response in under one millisecond, while it will be hundreds of milliseconds to respond on a cache miss. As the memory is a finite resource (and also a shared resource in Cloudflare’s architecture), more efficient use of space for cache was one of the key areas we wanted to improve. The new cache is implemented with a cache replacement data structure (<a href="https://en.wikipedia.org/wiki/Adaptive_replacement_cache">ARC</a>), instead of a KV store. This makes good use of the space on a single node, as less popular entries are progressively evicted, and the data structure is resistant to scans.</p><p>Moreover, instead of duplicating the cache across the whole data center with multicast, as we did before, BigPineapple is aware of its peer nodes in the same data center, and relays queries from one node to another if it cannot find an entry in its own cache. This is done by consistent hashing the queries onto the healthy nodes in each data center. So, for example, queries for the same registered domain go through the same subset of nodes, which not only increases the cache hit ratio, but also helps the infrastructure cache, which stores information about performance and features of nameservers.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5Ddu8jHnfdToCysh4urr1V/d7634e09dfb853c862f75af3b7c33cca/colo_3_bp.png" />
            
            </figure><p>Figure 4 Updated data center layout</p>
    <div>
      <h3>Async recursive library</h3>
      <a href="#async-recursive-library">
        
      </a>
    </div>
    <p>The recursive library is the DNS brain of BigPineapple, as it knows how to find the answer to the question in the query. Starting from the root, it breaks down the client query into subqueries, and uses them to collect knowledge recursively from various authoritative nameservers on the internet. The product of this process is the answer. Thanks to the async/await it can be abstracted as a function like such:</p>
            <pre><code>async fn resolve(Request, Exchanger) → Result&lt;Response&gt;;</code></pre>
            <p>The function contains all the logic necessary to generate a response to a given request, but it doesn’t do any I/O on its own. Instead, we pass an Exchanger trait (Rust interface) that knows how to exchange DNS messages with upstream authoritative nameservers asynchronously. The exchanger is usually called at various await points - for example, when a recursion starts, one of the first things it does is that it looks up the closest cached delegation for the domain. If it doesn’t have the final delegation in cache, it needs to ask what nameservers are responsible for this domain and wait for the response, before it can proceed any further.</p><p>Thanks to this design, which decouples the “waiting for some responses” part from the recursive DNS logic, it is much easier to test by providing a mock implementation of the exchanger. In addition, it makes the recursive iteration code (and DNSSEC validation logic in particular) much more readable, as it’s written sequentially instead of being scattered across many callbacks.</p><p>Fun fact: writing a DNS recursive resolver from scratch is not fun at all!</p><p>Not only because of the complexity of DNSSEC validation, but also because of the necessary “workarounds” needed for various RFC incompatible servers, forwarders, firewalls, etc. So we ported <a href="https://github.com/CZ-NIC/deckard">deckard</a> into Rust to help test it. Additionally, when we started migrating over to this new async recursive library, we first ran it in “shadow” mode: processing real world query samples from the production service, and comparing differences. We’ve done this in the past on Cloudflare’s authoritative DNS service as well. It is slightly more difficult for a recursive service due to the fact that a recursive service has to look up all the data over the Internet, and authoritative nameservers often give different answers for the same query due to localization, load balancing and such, leading to many false positives.</p><p>In December 2019, we finally enabled the new service on a public test endpoint (see the <a href="https://community.cloudflare.com/t/help-us-test-a-new-version-of-1-1-1-1-public-dns-resolver/137078">announcement</a>) to iron out remaining issues before slowly migrating the production endpoints to the new service. Even after all that, we continued to find edge cases with the DNS recursion (and DNSSEC validation in particular), but fixing and reproducing these issues has become much easier due to the new architecture of the library.</p>
    <div>
      <h3>Sandboxed plugins</h3>
      <a href="#sandboxed-plugins">
        
      </a>
    </div>
    <p>Having the ability to extend the core DNS functionality on the fly is important for us, thus BigPineapple has its redesigned plugin system. Before, the Lua plugins run in the same memory space as the service itself, and are generally free to do what they want. This is convenient, as we can freely pass memory references between the service and modules using C/FFI. For example, to read a response directly from cache without having to copy to a buffer first. But it is also dangerous, as the module can read uninitialized memory, call a host ABI using a wrong function signature, block on a local socket, or do other undesirable things, in addition the service doesn’t have a way to restrict these behaviors.</p><p>So we looked at replacing the embedded Lua runtime with JavaScript, or native modules, but around the same time, embedded runtimes for WebAssembly (Wasm for short) started to appear. Two nice properties of WebAssembly programs are that it allows us to write them in the same language as the rest of the service, and that they run in an isolated memory space. So we started modeling the guest/host interface around the limitations of WebAssembly modules, to see how that would work.</p><p>BigPineapple’s Wasm runtime is currently powered by <a href="https://wasmer.io/">Wasmer</a>. We tried several runtimes over time like <a href="https://wasmtime.dev/">Wasmtime</a>, <a href="https://wavm.github.io/">WAVM</a> in the beginning, and found Wasmer was simpler to use in our case. The runtime allows each module to run in its own instance, with an isolated memory and a signal trap, which naturally solved the module isolation problem we described before. In addition to this, we can have multiple instances of the same module running at the same time. Being controlled carefully, the apps can be hot swapped from one instance to another without missing a single request! This is great because the apps can be upgraded on the fly without a server restart. Given that the Wasm programs are distributed via Quicksilver, BigPineapple’s functionality can be safely changed worldwide within a few seconds!</p><p>To better understand the WebAssembly sandbox, several terms need to be introduced first:</p><ul><li><p>Host: the program which runs the Wasm runtime. Similar to a kernel, it has full control through the runtime over the guest applications.</p></li><li><p>Guest application: the Wasm program inside the sandbox. Within a restricted environment, it can only access its own memory space, which is provided by the runtime, and call the imported Host calls. We call it an app for short.</p></li><li><p>Host call: the functions defined in the host that can be imported by the guest. Comparable to syscall, it’s the only way guest apps can access the resources outside the sandbox.</p></li><li><p>Guest runtime: a library for guest applications to easily interact with the host. It implements some common interfaces, so an app can just use async, socket, log and tracing without knowing the underlying details.</p></li></ul><p>Now it’s time to dive into the sandbox, so stay awhile and listen. First let’s start from the guest side, and see what a common app lifespan looks like. With the help of the guest runtime, guest apps can be written similar to regular programs. So like other executables, an app begins with a start function as an entrypoint, which is called by the host upon loading. It is also provided with arguments as from the command line. At this point, the instance normally does some initialization, and more importantly, registers callback functions for different query phases. This is because in a recursive resolver, a query has to go through several phases before it gathers enough information to produce a response, for example a cache lookup, or making subrequests to resolve a delegation chain for the domain, so being able to tie into these phases is necessary for the apps to be useful for different use cases. The start function can also run some background tasks to supplement the phase callbacks, and store global state. For example - report metrics, or pre-fetch shared data from external sources, etc. Again, just like how we write a normal program.</p><p>But where do the program arguments come from? How could a guest app send log and metrics? The answer is, external functions.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2rMKxgaKCweGenTEf3kQ9U/07adc8e464df9662c2633fe5f36dd315/sandbox-1-.png" />
            
            </figure><p>Figure 5 Wasm based Sandbox</p><p>In figure 5, we can see a barrier in the middle, which is the sandbox boundary, that separates the guest from the host. The only way one side can reach out to the other, is via a set of functions exported by the peer beforehand. As in the picture, the “hostcalls” are exported by the host, imported and called by the guest; while the “trampoline” are guest functions that the host has knowledge of.</p><p>It is called <a href="https://en.wikipedia.org/wiki/Trampoline_(computing)">trampoline</a> because it is used to invoke a function or a closure inside a guest instance that’s not exported. The phase callbacks are one example of why we need a trampoline function: each callback returns a closure, and therefore can’t be exported on instantiation. So a guest app wants to register a callback, it calls a host call with the callback address “<code>hostcall_register_callback(pre_cache, #30987)</code>”, when the callback needs to be invoked, the host cannot just call that pointer as it’s pointing to the guest’s memory space. What it can do instead is, to leverage one of the aforementioned trampolines, and give it the address of the callback closure: “<code>trampoline_call(#30987)</code>”.</p>
    <div>
      <h4>Isolation overhead</h4>
      <a href="#isolation-overhead">
        
      </a>
    </div>
    <p>Like a coin that has two sides, the new sandbox does come with some additional overhead. The portability and isolation that WebAssembly offers bring extra cost. Here, we'll list two examples.</p><p>Firstly, guest apps are not allowed to read host memory. The way it works is the guest provides a memory region via a host call, then the host writes the data into the guest memory space. This introduces a memory copy that would not be needed if we were outside the sandbox. The bad news is, in our use case, the guest apps are supposed to do something on the query and/or the response, so they almost always need to read data from the host on every single request. The good news, on the other hand, is that during a request life cycle, the data won’t change. So we pre-allocate a bulk of memory in the guest memory space right after the guest app instantiates. The allocated memory is not going to be used, but instead serves to occupy a hole in the address space. Once the host gets the address details, it maps a shared memory region with the common data needed by the guest into the guest’s space. When the guest code starts to execute, it can just access the data in the shared memory overlay, and no copy is needed.</p><p>Another issue we ran into was when we wanted to add support for a modern protocol, <a href="/oblivious-dns/">oDoH</a>, into BigPineapple. The main job of it is to decrypt the client query, resolve it, then encrypt the answers before sending it back. By design, this doesn’t belong to core DNS, and should instead be extended with a Wasm app. However, the WebAssembly instruction set doesn’t provide some crypto primitives, such as AES and SHA-2, which prevents it from getting the benefit of host hardware. There is ongoing work to bring this functionality to Wasm with <a href="https://github.com/WebAssembly/wasi-crypto">WASI-crypto</a>. Until then, our solution for this is to simply delegate the <a href="/hybrid-public-key-encryption/">HPKE</a> to the host via host calls, and we already saw 4x performance improvements, compared to doing it inside Wasm.</p>
    <div>
      <h4>Async in Wasm</h4>
      <a href="#async-in-wasm">
        
      </a>
    </div>
    <p>Remember the problem we talked about before that the callbacks could block the event loop? Essentially, the problem is how to run the sandboxed code asynchronously. Because no matter how complex the request processing callback is, if it can yield, we can put an upper bound on how long it is allowed to block. Luckily, Rust’s async framework is both elegant and lightweight. It gives us the opportunity to use a set of guest calls to implement the “Future”s.</p><p>In Rust, a Future is a building block for asynchronous computations. From the user’s perspective, in order to make an asynchronous program, one has to take care of two things: implement a pollable function that drives the state transition, and place a waker as a callback to wake itself up, when the pollable function should be called again due to some external event (e.g. time passes, socket becomes readable, and so on). The former is to be able to progress the program gradually, e.g. read buffered data from I/O and return a new state indicating the status of the task: either finished, or yielded. The latter is useful in case of task yielding, as it will trigger the Future to be polled when the conditions that the task was waiting for are fulfilled, instead of busy looping until it’s complete.</p><p>Let’s see how this is implemented in our sandbox. For a scenario when the guest needs to do some I/O, it has to do so via the host calls, as it is inside a restricted environment. Assuming the host provides a set of simplified host calls which mirror the basic socket operations: open, read, write, and close, the guest can have its pseudo poller defined as below:</p>
            <pre><code>fn poll(&amp;mut self, wake: fn()) -&gt; Poll {
	match hostcall_socket_read(self.sock, self.buffer) {
    	    HostOk  =&gt; Poll::Ready,
    	    HostEof =&gt; Poll::Pending,
	}
}</code></pre>
            <p>Here the host call reads data from a socket into a buffer, depending on its return value, the function can move itself to one of the states we mentioned above: finished(Ready), or yielded(Pending). The magic happens inside the host call. Remember in figure 5, that it is the only way to access resources? The guest app doesn’t own the socket, but it can acquire a “<code>handle” via “hostcall_socket_open</code>”, which will in turn create a socket on the host side, and return a handle. The handle can be anything in theory, but in practice using integer socket handles map well to file descriptors on the host side, or indices in a <a href="https://www.cloudflare.com/learning/ai/what-is-vector-database/">vector</a> or slab. By referencing the returned handle, the guest app is able to remotely control the real socket. As the host side is fully asynchronous, it can simply relay the socket state to the guest. If you noticed that the waker function isn’t used above, well done! That’s because when the host call is called, it not only starts opening a socket, but also registers the current waker to be called then the socket is opened (or fails to do so). So when the socket becomes ready, the host task will be woken up, it will find the corresponding guest task from its context, and wakes it up using the trampoline function as shown in figure 5. There are other cases where a guest task needs to wait for another guest task, an async mutex for example. The mechanism here is similar: using host calls to register wakers.</p><p>All of these complicated things are encapsulated in our guest async runtime, with easy to use API, so the guest apps get access to regular async functions without having to worry about the underlying details.</p>
    <div>
      <h2>(Not) The End</h2>
      <a href="#not-the-end">
        
      </a>
    </div>
    <p>Hopefully, this blog post gave you a general idea of the innovative platform that powers 1.1.1.1. It is still evolving. As of today, several of our products, such as <a href="/introducing-1-1-1-1-for-families/">1.1.1.1 for Families</a>, <a href="/the-as112-project/">AS112</a>, and <a href="https://www.cloudflare.com/products/zero-trust/gateway/">Gateway DNS</a>, are supported by guest apps running on BigPineapple. We are looking forward to bringing new technologies into it. If you have any ideas, please let us know in the <a href="https://community.cloudflare.com/c/zero-trust/dns-1111/47">community</a> or via <a href="#">email</a>.</p> ]]></content:encoded>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[Resolver]]></category>
            <category><![CDATA[1.1.1.1]]></category>
            <guid isPermaLink="false">5DFx3mQoYWDfRP0BgOJ7fV</guid>
            <dc:creator>Anbang Wen</dc:creator>
            <dc:creator>Marek Vavruša</dc:creator>
        </item>
        <item>
            <title><![CDATA[Cloudflare is joining the AS112 project to help the Internet deal with misdirected DNS queries]]></title>
            <link>https://blog.cloudflare.com/the-as112-project/</link>
            <pubDate>Thu, 15 Dec 2022 14:00:00 GMT</pubDate>
            <description><![CDATA[ Cloudflare is participating in the AS112 project, becoming an operator of the loosely coordinated, distributed sink of the reverse lookup (PTR) queries for RFC 1918 addresses, dynamic DNS updates and other ambiguous addresses. ]]></description>
            <content:encoded><![CDATA[ <p><i></i></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4tZd1TslTV8TrWBKEVNuyC/35c4b6994eacbafc2d95970133781d0b/image2-32.png" />
            
            </figure><p>Today, we’re excited to announce that Cloudflare is participating in the <a href="https://www.as112.net/">AS112 project</a>, becoming an operator of this community-operated, loosely-coordinated anycast deployment of DNS servers that primarily answer reverse DNS lookup queries that are misdirected and create significant, unwanted load on the Internet.</p><p>With the addition of Cloudflare global network, we can make huge improvements to the stability, reliability and performance of this distributed public service.</p>
    <div>
      <h2>What is AS112 project</h2>
      <a href="#what-is-as112-project">
        
      </a>
    </div>
    <p>The AS112 project is a community effort to run an important network service intended to handle reverse DNS lookup queries for private-only use addresses that should never appear in the public DNS system. In the seven days leading up to publication of this blog post, for example, Cloudflare’s 1.1.1.1 resolver received more than 98 billion of these queries -- <i>all of which have no useful answer in the </i><a href="https://www.cloudflare.com/learning/dns/what-is-dns/"><i>Domain Name System</i></a>.</p><p>Some history is useful for context. Internet Protocol (IP) addresses are essential to network communication. Many networks make use of IPv4 addresses that are reserved for private use, and devices in the network are able to connect to the Internet with the use of network address translation (NAT), a process that maps one or more local private addresses to one or more global IP addresses and vice versa before transferring the information.</p><p>Your home Internet router most likely does this for you. You will likely find that, when at home, your computer has an IP address like 192.168.1.42. That’s an example of a private use address that is fine to use at home, but can’t be used on the public Internet. Your home router translates it, through NAT, to an address your ISP assigned to your home and that can be used on the Internet.</p><p>Here are the reserved “private use” addresses designated in <a href="https://www.rfc-editor.org/rfc/rfc1918">RFC 1918</a>.</p><table>
<thead>
  <tr>
    <th>Address block</th>
    <th>Address range</th>
    <th>Number of addresses</th>
  </tr>
</thead>
<tbody>
  <tr>
    <td>10.0.0.0/8</td>
    <td>10.0.0.0 – 10.255.255.255</td>
    <td>16,777,216</td>
  </tr>
  <tr>
    <td>172.16.0.0/12</td>
    <td>172.16.0.0 – 172.31.255.255</td>
    <td>1,048,576</td>
  </tr>
  <tr>
    <td>192.168.0.0/16</td>
    <td>192.168.0.0 – 192.168.255.255</td>
    <td>65,536</td>
  </tr>
</tbody>
</table>
<small>(Reserved private IPv4 network ranges)</small><p>Although the reserved addresses themselves are blocked from ever appearing on the public Internet, devices and programs in private environments may occasionally originate DNS queries corresponding to those addresses. These are called “reverse lookups'' because they ask the DNS if there is a name associated with an address.</p>
    <div>
      <h3>Reverse DNS lookup</h3>
      <a href="#reverse-dns-lookup">
        
      </a>
    </div>
    <p>A reverse DNS lookup is an opposite process of the more commonly used DNS lookup (which is used every day to translate a name like <a href="http://www.cloudflare.com">www.cloudflare.com</a> to its corresponding IP address). It is a query to look up the <a href="https://www.cloudflare.com/learning/dns/glossary/what-is-a-domain-name/">domain name</a> associated with a given IP address, in particular those addresses associated with routers and switches. For example, network administrators and researchers use reverse lookups to help understand paths being taken by data packets in the network, and it’s much easier to understand meaningful names than a meaningless number.</p><p>A reverse lookup is accomplished by querying DNS servers for a pointer record (<a href="https://www.cloudflare.com/learning/dns/dns-records/dns-ptr-record/">PTR</a>). PTR records store IP addresses with their segments reversed, and by appending ".in-addr.arpa" to the end. For example, the IP address 192.0.2.1 will have the PTR record stored as 1.2.0.192.in-addr.arpa. In IPv6, PTR records are stored within the ".ip6.arpa" domain instead of ".in-addr.arpa.". Below are some query examples using the dig command line tool.</p>
            <pre><code># Lookup the domain name associated with IPv4 address 172.64.35.46
# “+short” option make it output the short form of answers only
$ dig @1.1.1.1 PTR 46.35.64.172.in-addr.arpa +short
hunts.ns.cloudflare.com.

# Or use the shortcut “-x” for reverse lookups
$ dig @1.1.1.1 -x 172.64.35.46 +short
hunts.ns.cloudflare.com.

# Lookup the domain name associated with IPv6 address 2606:4700:58::a29f:2c2e
$ dig @1.1.1.1 PTR e.2.c.2.f.9.2.a.0.0.0.0.0.0.0.0.0.0.0.0.8.5.0.0.0.0.7.4.6.0.6.2.ip6.arpa. +short
hunts.ns.cloudflare.com.

# Or use the shortcut “-x” for reverse lookups
$ dig @1.1.1.1 -x 2606:4700:58::a29f:2c2e +short  
hunts.ns.cloudflare.com.</code></pre>
            
    <div>
      <h3>The problem that private use addresses cause for DNS</h3>
      <a href="#the-problem-that-private-use-addresses-cause-for-dns">
        
      </a>
    </div>
    <p>The private use addresses concerned have only local significance and cannot be resolved by the public DNS. In other words, there is no way for the public DNS to provide a useful answer to a question that has no global meaning. It is therefore a good practice for network administrators to ensure that queries for private use addresses are answered locally. However, it is not uncommon for such queries to follow the normal delegation path in the public DNS instead of being answered within the network. That creates unnecessary load.</p><p>By definition of being private use, they have no ownership in the public sphere, so there are no authoritative DNS servers to answer the queries. At the very beginning, root servers respond to all these types of queries since they serve the IN-ADDR.ARPA zone.</p><p>Over time, due to the wide deployment of private use addresses and the continuing growth of the Internet, traffic on the IN-ADDR.ARPA DNS infrastructure grew and the load due to these junk queries started to cause some concern. Therefore, the idea of offloading IN-ADDR.ARPA queries related to private use addresses was proposed. Following that, the use of anycast for distributing authoritative DNS service for that idea was subsequently proposed at a private meeting of root server operators. And eventually the AS112 service was launched to provide an alternative target for the junk.</p>
    <div>
      <h3>The AS112 project is born</h3>
      <a href="#the-as112-project-is-born">
        
      </a>
    </div>
    <p>To deal with this problem, the Internet community set up special DNS servers called “blackhole servers” as the authoritative name servers that respond to the reverse lookup of the private use address blocks 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 and the link-local address block 169.254.0.0/16 (which also has only local significance). Since the relevant zones are directly delegated to the blackhole servers, this approach has come to be known as Direct Delegation.</p><p>The first two blackhole servers set up by the project are: blackhole-1.iana.org and blackhole-2.iana.org.</p><p>Any server, including DNS name server, needs an IP address to be reachable. The IP address must also be associated with an Autonomous System Number (ASN) so that networks can recognize other networks and route data packets to the IP address destination. To solve this problem, a new authoritative DNS service would be created but, to make it work, the community would have to designate IP addresses for the servers and, to facilitate their availability, an AS number that network operators could use to reach (or provide) the new service.</p><p>The selected AS number (provided by American Registry for Internet Numbers) and namesake of the project, was 112. It was started by a small subset of root server operators, later grown to a group of volunteer name server operators that include many other organizations. They run anycasted instances of the blackhole servers that, together, form a distributed sink for the reverse DNS lookups for private network and link-local addresses sent to the public Internet.</p><p>A reverse DNS lookup for a private use address would see responses like in the example below, where the name server blackhole-1.iana.org is authoritative for it and says the name does not exist, represented in DNS responses by <b>NXDOMAIN</b>.</p>
            <pre><code>$ dig @blackhole-1.iana.org -x 192.168.1.1 +nord

;; Got answer:
;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NXDOMAIN, id: 23870
;; flags: qr aa; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;1.1.168.192.in-addr.arpa.	IN	PTR

;; AUTHORITY SECTION:
168.192.in-addr.arpa.	10800	IN	SOA	168.192.in-addr.arpa. nobody.localhost. 42 86400 43200 604800 10800</code></pre>
            <p>At the beginning of the project, node operators set up the service in the direct delegation fashion (<a href="https://datatracker.ietf.org/doc/html/rfc7534">RFC 7534</a>). However, adding delegations to this service requires all AS112 servers to be updated, which is difficult to ensure in a system that is only loosely-coordinated. An alternative approach using DNAME redirection was subsequently introduced by <a href="https://datatracker.ietf.org/doc/html/rfc7535">RFC 7535</a> to allow new zones to be added to the system without reconfiguring the blackhole servers.</p>
    <div>
      <h4><b>Direct delegation</b></h4>
      <a href="#direct-delegation">
        
      </a>
    </div>
    <p>DNS zones are directly delegated to the blackhole servers in this approach.</p><p><a href="https://datatracker.ietf.org/doc/html/rfc7534">RFC 7534</a> defines the static set of reverse lookup zones for which AS112 name servers should answer authoritatively. They are as follows:</p><ul><li><p>10.in-addr-arpa</p></li><li><p>16.172.in-addr.arpa</p></li><li><p>17.172.in-addr.arpa</p></li><li><p>18.172.in-addr.arpa</p></li><li><p>19.172.in-addr.arpa</p></li><li><p>20.172.in-addr.arpa</p></li><li><p>21.172.in-addr.arpa</p></li><li><p>22.172.in-addr.arpa</p></li><li><p>23.172.in-addr.arpa</p></li><li><p>24.172.in-addr.arpa</p></li><li><p>25.172.in-addr.arpa</p></li><li><p>26.172.in-addr.arpa</p></li><li><p>27.172.in-addr.arpa</p></li><li><p>28.172.in-addr.arpa</p></li><li><p>29.172.in-addr.arpa</p></li><li><p>30.172.in-addr.arpa</p></li><li><p>31.172.in-addr.arpa</p></li><li><p>168.192.in-addr.arpa</p></li><li><p>254.169.in-addr.arpa (corresponding to the IPv4 link-local address block)</p></li></ul><p>Zone files for these zones are quite simple because essentially they are empty apart from the required  SOA and NS records. A template of the zone file is defined as:</p>
            <pre><code>  ; db.dd-empty
   ;
   ; Empty zone for direct delegation AS112 service.
   ;
   $TTL    1W
   @  IN  SOA  prisoner.iana.org. hostmaster.root-servers.org. (
                                  1         ; serial number
                                  1W      ; refresh
                                  1M      ; retry
                                  1W      ; expire
                                  1W )    ; negative caching TTL
   ;
          NS     blackhole-1.iana.org.
          NS     blackhole-2.iana.org.</code></pre>
            <p>IP addresses of the direct delegation name servers are covered by the single IPv4 prefix 192.175.48.0/24 and the IPv6 prefix 2620:4f:8000::/48.</p><table>
<thead>
  <tr>
    <th>Name server</th>
    <th>IPv4 address</th>
    <th>IPv6 address</th>
  </tr>
</thead>
<tbody>
  <tr>
    <td>blackhole-1.iana.org</td>
    <td>192.175.48.6</td>
    <td>2620:4f:8000::6</td>
  </tr>
  <tr>
    <td>blackhole-2.iana.org</td>
    <td>192.175.48.42</td>
    <td>2620:4f:8000::42</td>
  </tr>
</tbody>
</table>
    <div>
      <h4><b>DNAME redirection</b></h4>
      <a href="#dname-redirection">
        
      </a>
    </div>
    <p>Firstly, what is DNAME? Introduced by <a href="https://www.rfc-editor.org/rfc/rfc6672">RFC 6672</a>, a DNAME record or Delegation Name Record creates an alias for an entire subtree of the domain name tree. In contrast, the CNAME record creates an alias for a single name and not its subdomains. For a received DNS query, the DNAME record instructs the name server to substitute all those appearing in the left hand (owner name) with the right hand (alias name). The substituted query name, like the CNAME, may live within the zone or may live outside the zone.</p><p>Like the CNAME record, the DNS lookup will continue by retrying the lookup with the substituted name. For example, if there are two DNS zone as follows:</p>
            <pre><code># zone: example.com
www.example.com.	A		203.0.113.1
foo.example.com.	DNAME	example.net.

# zone: example.net
example.net.		A		203.0.113.2
bar.example.net.	A		203.0.113.3</code></pre>
            <p>The query resolution scenarios would look like this:</p><table>
<thead>
  <tr>
    <th>Query (Type + Name)</th>
    <th>Substitution</th>
    <th>Final result</th>
  </tr>
</thead>
<tbody>
  <tr>
    <td>A www.example.com</td>
    <td>(no DNAME, don’t apply)</td>
    <td>203.0.113.1</td>
  </tr>
  <tr>
    <td>DNAME foo.example.com</td>
    <td>(don’t apply to the owner name itself)</td>
    <td>example.net</td>
  </tr>
  <tr>
    <td>A foo.example.com</td>
    <td>(don’t apply to the owner name itself)</td>
    <td>&lt;NXDOMAIN&gt;</td>
  </tr>
  <tr>
    <td>A bar.foo.example.com</td>
    <td>bar.example.net</td>
    <td>203.0.113.2</td>
  </tr>
</tbody>
</table><p><a href="https://datatracker.ietf.org/doc/html/rfc7535">RFC 7535</a> specifies adding another special zone, empty.as112.arpa, to support DNAME redirection for AS112 nodes. When there are new zones to be added, there is no need for AS112 node operators to update their configuration: instead, the zones’ parents will set up DNAME records for the new domains with the target domain empty.as112.arpa. The redirection (which can be cached and reused) causes clients to send future queries to the blackhole server that is authoritative for the target zone.</p><p>Note that blackhole servers do not have to support DNAME records themselves, but they do need to configure the new zone to which root servers will redirect queries at. Considering there may be existing node operators that do not update their name server configuration for some reasons and in order to not cause interruption to the service, the zone was delegated to a new blackhole server instead - blackhole.as112.arpa.</p><p>This name server uses a new pair of IPv4 and IPv6 addresses, 192.31.196.1 and 2001:4:112::1, so queries involving DNAME redirection will only land on those nodes operated by entities that also set up the new name server. Since it is not necessary for all AS112 participants to reconfigure their servers to serve empty.as112.arpa from this new server for this system to work, it is compatible with the loose coordination of the system as a whole.</p><p>The zone file for empty.as112.arpa is defined as:</p>
            <pre><code>   ; db.dr-empty
   ;
   ; Empty zone for DNAME redirection AS112 service.
   ;
   $TTL    1W
   @  IN  SOA  blackhole.as112.arpa. noc.dns.icann.org. (
                                  1         ; serial number
                                  1W      ; refresh
                                  1M      ; retry
                                  1W      ; expire
                                  1W )    ; negative caching TTL
   ;
          NS     blackhole.as112.arpa.</code></pre>
            <p>The addresses of the new DNAME redirection name server are covered by the single IPv4 prefix 192.31.196.0/24 and the IPv6 prefix 2001:4:112::/48.</p><table>
<thead>
  <tr>
    <th>Name server</th>
    <th>IPv4 address</th>
    <th>IPv6 address</th>
  </tr>
</thead>
<tbody>
  <tr>
    <td>blackhole.as112.arpa</td>
    <td>192.31.196.1</td>
    <td>2001:4:112::1</td>
  </tr>
</tbody>
</table>
    <div>
      <h4><b>Node identification</b></h4>
      <a href="#node-identification">
        
      </a>
    </div>
    <p><a href="https://datatracker.ietf.org/doc/html/rfc7534">RFC 7534</a> recommends every AS112 node also to host the following metadata zones as well: hostname.as112.net and hostname.as112.arpa.</p><p>These zones only host TXT records and serve as identifiers for querying metadata information about an AS112 node. At Cloudflare nodes, the zone files look like this:</p>
            <pre><code>$ORIGIN hostname.as112.net.
;
$TTL    604800
;
@       IN  SOA     ns3.cloudflare.com. dns.cloudflare.com. (
                       1                ; serial number
                       604800           ; refresh
                       60               ; retry
                       604800           ; expire
                       604800 )         ; negative caching TTL
;
            NS      blackhole-1.iana.org.
            NS      blackhole-2.iana.org.
;
            TXT     "Cloudflare DNS, &lt;DATA_CENTER_AIRPORT_CODE&gt;"
            TXT     "See http://www.as112.net/ for more information."
;

$ORIGIN hostname.as112.arpa.
;
$TTL    604800
;
@       IN  SOA     ns3.cloudflare.com. dns.cloudflare.com. (
                       1                ; serial number
                       604800           ; refresh
                       60               ; retry
                       604800           ; expire
                       604800 )         ; negative caching TTL
;
            NS      blackhole.as112.arpa.
;
            TXT     "Cloudflare DNS, &lt;DATA_CENTER_AIRPORT_CODE&gt;"
            TXT     "See http://www.as112.net/ for more information."
;</code></pre>
            
    <div>
      <h2>Helping AS112 helps the Internet</h2>
      <a href="#helping-as112-helps-the-internet">
        
      </a>
    </div>
    <p>As the AS112 project helps reduce the load on public DNS infrastructure, it plays a vital role in maintaining the stability and efficiency of the Internet. Being a part of this project aligns with Cloudflare’s mission to help build a better Internet.</p><p>Cloudflare is one of the fastest global anycast networks on the planet, and operates one of the largest, highly performant and reliable DNS services. We run authoritative DNS for millions of Internet properties globally. We also operate the privacy- and performance-focused public DNS resolver 1.1.1.1 service. Given our network presence and scale of operations, we believe we can make a meaningful contribution to the AS112 project.</p>
    <div>
      <h2>How we built it</h2>
      <a href="#how-we-built-it">
        
      </a>
    </div>
    <p>We’ve publicly talked about the Cloudflare in-house built authoritative DNS server software, rrDNS, several times in the past, but haven’t talked much about the software we built to power the Cloudflare public resolver - 1.1.1.1. This is an opportunity to shed some light on the technology we used to build 1.1.1.1, because this AS112 service is built on top of the same platform.</p>
    <div>
      <h3>A platform for DNS workloads</h3>
      <a href="#a-platform-for-dns-workloads">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5ezojvBvFXv64k6SUenjVH/2d39e517025c093302b393d90debf668/image1-32.png" />
            
            </figure><p>We’ve created a platform to run DNS workloads. Today, it powers 1.1.1.1, 1.1.1.1 for Families, Oblivious DNS over HTTPS (ODoH), Cloudflare WARP and Cloudflare Gateway.</p><p>The core part of the platform is a non-traditional DNS server, which has a built-in DNS recursive resolver and a forwarder to forward queries to other servers. It consists of four key modules:</p><ol><li><p>A highly efficient listener module that accepts connections for incoming requests.</p></li><li><p>A query router module that decides how a query should be resolved.</p></li><li><p>A conductor module that figures out the best way of exchanging DNS messages with upstream servers.</p></li><li><p>A sandbox environment to host guest applications.</p></li></ol><p>The DNS server itself doesn’t include any business logic, instead the guest applications run in the sandbox environment can implement concrete business logic such as request filtering, query processing, logging, attack mitigation, cache purging, etc.</p><p>The server is written in Rust and the sandbox environment is built on top of a WebAssembly runtime. The combination of Rust and WebAssembly allow us to implement high efficient connection handling, request filtering and query dispatching modules, while having the flexibility of implementing custom business logic in a safe and efficient manner.</p><p>The host exposes a set of APIs, called hostcalls, for the guest applications to accomplish a variety of tasks. You can think of them like syscalls on Linux. Here are few examples functions provided by the hostcalls:</p><ul><li><p>Obtain the current UNIX timestamp</p></li><li><p>Lookup geolocation data of IP addresses</p></li><li><p>Spawn async tasks</p></li><li><p>Create local sockets</p></li><li><p>Forward DNS queries to designated servers</p></li><li><p>Register callback functions of the sandbox hooks</p></li><li><p>Read current request information, and write responses</p></li><li><p>Emit application logs, metric data points and tracing spans/events</p></li></ul><p>The DNS request lifecycle is broken down into phases. A request phase is a point in processing at which sandboxed apps can be called to change the course of request resolution. And each guest application can register callbacks for each phase.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4qQfSG8CCIgFK2qLoO53yw/76dc10939b88d5efb9c4a7cb2e273ee9/image3-20.png" />
            
            </figure>
    <div>
      <h3>AS112 guest application</h3>
      <a href="#as112-guest-application">
        
      </a>
    </div>
    <p>The AS112 service is built as a guest application written in Rust and compiled to WebAssembly. The zones listed in <a href="https://www.rfc-editor.org/rfc/rfc7534">RFC 7534</a> and <a href="https://www.rfc-editor.org/rfc/rfc7535">RFC 7535</a> are loaded as static zones in memory and indexed as a tree data structure. Incoming queries are answered locally by looking up entries in the zone tree.</p><p>A router setting in the app manifest is added to tell the host what kind of DNS queries should be processed by the guest application, and a fallback_action setting is added to declare the expected fallback behavior.</p>
            <pre><code># Declare what kind of queries the app handles.
router = [
    # The app is responsible for all the AS112 IP prefixes.
    "dst in { 192.31.196.0/24 192.175.48.0/24 2001:4:112::/48 2620:4f:8000::/48 }",
]

# If the app fails to handle the query, servfail should be returned.
fallback_action = "fail"</code></pre>
            <p>The guest application, along with its manifest, is then compiled and deployed through a deployment pipeline that leverages <a href="/introducing-quicksilver-configuration-distribution-at-internet-scale/">Quicksilver</a> to store and replicate the assets worldwide.</p><p>The guest application is now up and running, but how does the DNS query traffic destined to the new IP prefixes reach the DNS server? Do we have to restart the DNS server every time we add a new guest application? Of course there is no need. We use software we developed and deployed earlier, called <a href="/tubular-fixing-the-socket-api-with-ebpf/">Tubular</a>. It allows us to change the addresses of a service on the fly. With the help of Tubular, incoming packets destined to the AS112 service IP prefixes are dispatched to the right DNS server process without the need to make any change or release of the DNS server itself.</p><p>Meanwhile, in order to make the misdirected DNS queries land on the Cloudflare network in the first place, we use <a href="https://developers.cloudflare.com/byoip/">BYOIP</a> (Bringing Your Own IPs to Cloudflare), a Cloudflare product that can announce customer’s own IP prefixes in all our locations. The four AS112 IP prefixes are boarded onto the BYOIP system, and will be announced by it globally.</p>
    <div>
      <h3>Testing</h3>
      <a href="#testing">
        
      </a>
    </div>
    <p>How can we ensure the service we set up does the right thing before we announce it to the public Internet? 1.1.1.1 processes more than 13 billion of these misdirected queries every day, and it has logic in place to directly return NXDOMAIN for them locally, which is a recommended practice per <a href="https://www.rfc-editor.org/rfc/rfc7534">RFC 7534</a>.</p><p>However, we are able to use a dynamic rule to change how the misdirected queries are handled in Cloudflare testing locations. For example, a rule like following:</p><blockquote><p><code>phase = post-cache and qtype in { PTR } and colo in { test1 test2 } and qname-suffix in { 10.in-addr.arpa 16.172.in-addr.arpa 17.172.in-addr.arpa 18.172.in-addr.arpa 19.172.in-addr.arpa 20.172.in-addr.arpa 21.172.in-addr.arpa 22.172.in-addr.arpa 23.172.in-addr.arpa 24.172.in-addr.arpa 25.172.in-addr.arpa 26.172.in-addr.arpa 27.172.in-addr.arpa 28.172.in-addr.arpa 29.172.in-addr.arpa 30.172.in-addr.arpa 31.172.in-addr.arpa 168.192.in-addr.arpa 254.169.in-addr.arpa } forward 192.175.48.6:53</code></p></blockquote><p>The rule instructs that in data center test1 and test2, when the DNS query type is PTR, and the query name ends with those in the list, forward the query to server 192.175.48.6 (one of the AS112 service IPs) on port 53.</p><p>Because we’ve provisioned the AS112 IP prefixes in the same node, the new AS112 service will receive the queries and respond to the resolver.</p><p>It's worth mentioning that the above-mentioned dynamic rule that intercepts a query at the post-cache phase, and changes how the query gets processed, is executed by a guest application too, which is named override. This app loads all dynamic rules, parses the DSL texts and registers callback functions at phases declared by each rule. And when an incoming query matches the expressions, it executes the designated actions.</p>
    <div>
      <h2>Public reports</h2>
      <a href="#public-reports">
        
      </a>
    </div>
    <p>We collect the following metrics to generate the public statistics that an AS112 operator is expected to share to the operator community:</p><ul><li><p>Number of queries by query type</p></li><li><p>Number of queries by response code</p></li><li><p>Number of queries by protocol</p></li><li><p>Number of queries by IP versions</p></li><li><p>Number of queries with EDNS support</p></li><li><p>Number of queries with DNSSEC support</p></li><li><p>Number of queries by ASN/Data center</p></li></ul><p>We’ll serve the public statistics page on the <a href="https://radar.cloudflare.com/">Cloudflare Radar</a> website. We are still working on implementing the required backend API and frontend of the page – we’ll share the link to this page once it is available.</p>
    <div>
      <h2>What’s next?</h2>
      <a href="#whats-next">
        
      </a>
    </div>
    <p>We are going to announce the AS112 prefixes starting December 15, 2022.</p><p>After the service is launched, you can run a dig command to check if you are hitting an AS112 node operated by Cloudflare, like:</p>
            <pre><code>$ dig @blackhole-1.iana.org TXT hostname.as112.arpa +short

"Cloudflare DNS, SFO"
"See http://www.as112.net/ for more information."</code></pre>
            <p></p> ]]></content:encoded>
            <category><![CDATA[Impact Week]]></category>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[Resolver]]></category>
            <category><![CDATA[Speed & Reliability]]></category>
            <category><![CDATA[Privacy]]></category>
            <guid isPermaLink="false">1zMRKaFO35qhbwDRWx115i</guid>
            <dc:creator>Hunts Chen</dc:creator>
        </item>
        <item>
            <title><![CDATA[Dig through SERVFAILs with EDE]]></title>
            <link>https://blog.cloudflare.com/dig-through-servfails-with-ede/</link>
            <pubDate>Wed, 25 May 2022 12:59:18 GMT</pubDate>
            <description><![CDATA[ Now we’re happy to announce we will return more error code types and include additional helpful information to further improve your debugging experience. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>It can be frustrating to get errors (SERVFAIL response codes) returned from your DNS queries. It can be even more frustrating if you don’t get enough information to understand why the error is occurring or what to do next. That’s why back in 2020, we <a href="/unwrap-the-servfail/">launched support</a> for Extended DNS Error (EDE) Codes to 1.1.1.1.</p><p>As a quick refresher, EDE codes are a <a href="https://www.rfc-editor.org/rfc/rfc8914.html">proposed</a> IETF standard enabled by the Extension Mechanisms for DNS (EDNS) spec. The codes return extra information about DNS or <a href="https://www.cloudflare.com/learning/dns/dnssec/ecdsa-and-dnssec/">DNSSEC</a> issues without touching the RCODE so that debugging is easier.</p><p>Now we’re happy to announce we will return more error code types and include additional helpful information to further improve your debugging experience. Let’s run through some examples of how these error codes can help you better understand the issues you may face.</p><p>To try for yourself, you’ll need to run the dig or kdig command in the terminal. For dig, please ensure you have <a href="http://ftp.swin.edu.au/isc/bind/9.11.20/RELEASE-NOTES-bind-9.11.20.html">v9.11.20</a> or above. If you are on macOS 12.1, by default you only have dig 9.10.6. <a href="https://formulae.brew.sh/formula/bind">Install</a> an updated version of BIND to fix that.</p><p>Let’s start with the output of an example dig command without EDE support.</p>
            <pre><code>% dig @1.1.1.1 dnssec-failed.org +noedns

; &lt;&lt;&gt;&gt; DiG 9.18.0 &lt;&lt;&gt;&gt; @1.1.1.1 dnssec-failed.org +noedns
; (1 server found)
;; global options: +cmd
;; Got answer:
;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: SERVFAIL, id: 8054
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;dnssec-failed.org.		IN	A

;; Query time: 23 msec
;; SERVER: 1.1.1.1#53(1.1.1.1) (UDP)
;; WHEN: Thu Mar 17 10:12:57 PDT 2022
;; MSG SIZE  rcvd: 35</code></pre>
            <p>In the output above, we tried to do DNSSEC validation on <code>dnssec-failed.org</code>. It returns a <code>SERVFAIL</code>, but we don’t have context as to why.</p><p>Now let’s try that again with 1.1.1.1’s EDE support.</p>
            <pre><code>% dig @1.1.1.1 dnssec-failed.org +dnssec

; &lt;&lt;&gt;&gt; DiG 9.18.0 &lt;&lt;&gt;&gt; @1.1.1.1 dnssec-failed.org +dnssec
; (1 server found)
;; global options: +cmd
;; Got answer:
;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: SERVFAIL, id: 34492
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags: do; udp: 1232
; EDE: 9 (DNSKEY Missing): (no SEP matching the DS found for dnssec-failed.org.)
;; QUESTION SECTION:
;dnssec-failed.org.		IN	A

;; Query time: 15 msec
;; SERVER: 1.1.1.1#53(1.1.1.1) (UDP)
;; WHEN: Fri Mar 04 12:53:45 PST 2022
;; MSG SIZE  rcvd: 103</code></pre>
            <p>We can see there is still a <code>SERVFAIL</code>. However, this time there is also an EDE Code 9 which stands for “DNSKey Missing”. Accompanying that, we also have additional information saying “no SEP matching the DS found” for <code>dnssec-failed.org</code>. That’s better!</p><p>Another nifty feature is that we will return multiple errors when appropriate, so you can debug each one separately. In the example below, we returned a <code>SERVFAIL</code> with three different error codes: “Unsupported DNSKEY Algorithm”, “No Reachable Authority”, and “Network Error”.</p>
            <pre><code>dig @1.1.1.1 [domain] +dnssec

; &lt;&lt;&gt;&gt; DiG 9.18.0 &lt;&lt;&gt;&gt; @1.1.1.1 [domain] +dnssec
; (1 server found)
;; global options: +cmd
;; Got answer:
;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: SERVFAIL, id: 55957
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags: do; udp: 1232
; EDE: 1 (Unsupported DNSKEY Algorithm): (no supported DNSKEY algorithm for [domain].)
; EDE: 22 (No Reachable Authority): (at delegation [domain].)
; EDE: 23 (Network Error): (135.181.58.79:53 rcode=REFUSED for [domain] A)
;; QUESTION SECTION:
;[domain].		IN	A

;; Query time: 1197 msec
;; SERVER: 1.1.1.1#53(1.1.1.1) (UDP)
;; WHEN: Wed Mar 02 13:41:30 PST 2022
;; MSG SIZE  rcvd: 202</code></pre>
            <p>Here’s a list of the additional codes we now support:</p><table><tr><td><p><b>Error Code Number</b></p></td><td><p><b>Error Code Name</b></p></td></tr><tr><td><p>1</p></td><td><p>Unsupported DNSKEY Algorithm</p></td></tr><tr><td><p>2</p></td><td><p>Unsupported DS Digest Type</p></td></tr><tr><td><p>5</p></td><td><p>DNSSEC Indeterminate</p></td></tr><tr><td><p>7</p></td><td><p>Signature Expired</p></td></tr><tr><td><p>8</p></td><td><p>Signature Not Yet Valid</p></td></tr><tr><td><p>9</p></td><td><p>DNSKEY Missing</p></td></tr><tr><td><p>10</p></td><td><p>RRSIGs Missing</p></td></tr><tr><td><p>11</p></td><td><p>No Zone Key Bit Set</p></td></tr><tr><td><p>12</p></td><td><p>NSEC Missing</p></td></tr></table><p>We have documented all the error codes we currently support with additional information you may find helpful. Refer to our <a href="https://developers.cloudflare.com/1.1.1.1/infrastructure/extended-dns-error-codes/">dev docs</a> for more information.</p> ]]></content:encoded>
            <category><![CDATA[1.1.1.1]]></category>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[Resolver]]></category>
            <guid isPermaLink="false">1XKZPR2pJUZRG5bcY6CAqU</guid>
            <dc:creator>Stanley Chiang</dc:creator>
            <dc:creator>Marek Vavruša</dc:creator>
            <dc:creator>Anbang Wen</dc:creator>
        </item>
        <item>
            <title><![CDATA[Unwrap the SERVFAIL]]></title>
            <link>https://blog.cloudflare.com/unwrap-the-servfail/</link>
            <pubDate>Fri, 30 Oct 2020 12:00:00 GMT</pubDate>
            <description><![CDATA[ We recently released a new version of Cloudflare Resolver, which adds a piece of information called “Extended DNS Errors” (EDE) along with the response code under certain circumstances. This will be helpful in tracing DNS resolution errors and figure out what went wrong behind the scenes. ]]></description>
            <content:encoded><![CDATA[ <p>We recently released a new version of <a href="https://1.1.1.1/dns/">Cloudflare Resolver</a> which adds a piece of information called “<a href="https://datatracker.ietf.org/doc/draft-ietf-dnsop-extended-error/">Extended DNS Errors</a>” (EDE) along with the response code under certain circumstances. This will be helpful in tracing DNS resolution errors and figuring out what went wrong behind the scenes.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6pI28dXSUFpxeVT9fbOtXN/cf7d24e9340ec93201ecafa232370d5b/image1-1.jpg" />
            
            </figure><p>(image from: <a href="https://www.pxfuel.com/en/free-photo-expka">https://www.pxfuel.com/en/free-photo-expka</a>)</p>
    <div>
      <h3>A tight-lipped agent</h3>
      <a href="#a-tight-lipped-agent">
        
      </a>
    </div>
    <p>The DNS protocol was designed to map domain names to IP addresses. To inform the client about the result of the lookup, the protocol has a 4 bit field, called response code/RCODE. The logic to serve a response might look something like this:</p>
            <pre><code>function lookup(domain) {
    ...
    switch result {
    case "No error condition":
        return NOERROR with client expected answer
    case "No record for the request type":
        return NOERROR
    case "The request domain does not exist":
        return NXDOMAIN
    case "Refuse to perform the specified operation for policy reasons":
        return REFUSE
    default("Server failure: unable to process this query due to a problem with the name server"):
        return SERVFAIL
    }
}

try {
    lookup(domain)
} catch {
    return SERVFAIL
}</code></pre>
            <p>Although the context hasn't changed much, protocol extensions such as DNSSEC have been added, which makes the RCODE run out of space to express the server's internal status. To keep backward compatibility, DNS servers have to squeeze various statuses into existing ones. This behavior could confuse the client, especially with the "catch-all" SERVFAIL: something went wrong but what exactly?</p><p>Most often, end users don't talk to authoritative name servers directly, but use a <a href="https://tools.ietf.org/html/rfc8499#section-6">stub</a> and/or a recursive resolver as an agent to acquire the information it needs. When a user receives  SERVFAIL, the failure can be one of the following:</p><ul><li><p>The stub resolver fails to send the request.</p></li><li><p>The stub resolver doesn’t get a response.</p></li><li><p>The recursive resolver, which the stub resolver sends its query to, is overloaded.</p></li><li><p>The recursive resolver is unable to communicate with upstream authoritative servers.</p></li><li><p>The recursive resolver fails to verify the DNSSEC chain.</p></li><li><p>The authoritative server takes too long to respond.</p></li><li><p>...</p></li></ul><p>In such cases, it is nearly impossible for the user to know exactly what’s wrong. The resolver is usually the one to be blamed, because, as an agent, it fails to get back the answer, and doesn’t return a clear reason for the failure in the response.</p>
    <div>
      <h3>Keep backward compatibility</h3>
      <a href="#keep-backward-compatibility">
        
      </a>
    </div>
    <p>It seems we need to return more information, but (there's always a but) we also need to keep the behavior of existing clients unchanged.</p><p>One way is to extend the RCODE space, which came out with the <a href="https://www.ietf.org/rfc/rfc6891.txt">Extension mechanisms for DNS</a> or EDNS. It defines a 8 bit EXTENDED-RCODE, as high-order bits to current 4 bit RCODE. Together they make up a 12 bit integer. This changes the processing of RCODE, requires both client and server to fully support the logic unfortunately.</p><p>Another approach is to provide out-of-band data without touching the current RCODE. This is how Extended DNS Errors is defined. It introduces a <a href="https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-11">new option</a> to EDNS, containing an INFO-CODE to describe error details with an EXTRA-TEXT as an optional supplement. The option can be repeated as many times as needed, so it's possible for the client to get a full error chain with detailed messages. The INFO-CODE is just something like RCODE, but is 16 bits wide, while the EXTRA-TEXT is an utf-8 encoded string. For example, let’s say a client sends a request to a resolver, and the requested domain has two name servers. The client may receive a SERVFAIL response with an OPT record (see below) which contains two extended errors, one from one of the authoritative servers that shows it's not ready to serve, and the other from the resolver, showing it cannot connect to the other name server.</p>
            <pre><code>;; OPT PSEUDOSECTION:
; ...
; EDE: 14 (Not Ready)
; EDE: 23 (Network Error): (cannot reach upstream 192.0.2.1)
; ...</code></pre>
            <p>Google has something similar in their <a href="https://developers.google.com/speed/public-dns/docs/doh/json">DoH JSON API</a>, which provides diagnostic information in the "Comment" field.</p>
    <div>
      <h3>Let's dig into it</h3>
      <a href="#lets-dig-into-it">
        
      </a>
    </div>
    <p>Our 1.1.1.1 service has an initial support of the draft version of Extended DNS Errors, while we are still trying to find the best practice. As we mentioned above, this is not a breaking change, and existing clients will not be affected. The additional options can be safely ignored without any problem, since the RCODE stays the same.</p><p>If you have a <a href="https://downloads.isc.org/isc/bind9/9.16.4/doc/arm/html/notes.html#new-features">newer version of dig</a>, you can simply check it out with a known problematic domain. As you can see, due to DNSSEC verification failing, the RCODE is still SERVFAIL, but the extended error shows the failure is "DNSSEC Bogus".</p>
            <pre><code>$ dig @1.1.1.1 dnssec-failed.org

; &lt;&lt;&gt;&gt; DiG 9.16.4-Debian &lt;&lt;&gt;&gt; @1.1.1.1 dnssec-failed.org
; (1 server found)
;; global options: +cmd
;; Got answer:
;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: SERVFAIL, id: 1111
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
; EDE: 6 (DNSSEC Bogus)
;; QUESTION SECTION:
;dnssec-failed.org.		IN	A

;; Query time: 111 msec
;; SERVER: 1.1.1.1#53(1.1.1.1)
;; WHEN: Wed Sep 01 00:00:00 PDT 2020
;; MSG SIZE  rcvd: 52</code></pre>
            <p>Note that Extended DNS Error relies on EDNS. So to be able to get one, the client needs to support EDNS, and needs to enable it in the request. At the time of writing this blog post, we see about 17% of queries that 1.1.1.1 received had EDNS enabled within a short time range. We hope this information will help you uncover the root cause of a SERVFAIL in the future.</p> ]]></content:encoded>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[Resolver]]></category>
            <guid isPermaLink="false">5CQiO0YvIBrAfgTCkEB3ru</guid>
            <dc:creator>Anbang Wen</dc:creator>
        </item>
        <item>
            <title><![CDATA[The Mistake that Caused 1.1.1.3 to Block LGBTQIA+ Sites Today]]></title>
            <link>https://blog.cloudflare.com/the-mistake-that-caused-1-1-1-3-to-block-lgbtqia-sites-today/</link>
            <pubDate>Thu, 02 Apr 2020 03:32:47 GMT</pubDate>
            <description><![CDATA[ Today we made a mistake. The mistake caused a number of LGBTQIA+ sites to inadvertently be blocked by the new 1.1.1.1 for Families service. I wanted to walk through what happened, why, and what we've done to fix it. ]]></description>
            <content:encoded><![CDATA[ <p>Today we made a mistake. The mistake caused a number of LGBTQIA+ sites to inadvertently be blocked by the new 1.1.1.1 for Families service. I wanted to walk through what happened, why, and what we've done to fix it.</p><p>As is our tradition for the last three years, we roll out new products for the general public that uses the Internet on April 1. This year, one of those products was a filtered DNS service, <a href="/introducing-1-1-1-1-for-families/">1.1.1.1 for Families</a>. The service allows anyone who chooses to use it to restrict certain categories of sites.</p>
    <div>
      <h2>Filtered vs Unfiltered DNS</h2>
      <a href="#filtered-vs-unfiltered-dns">
        
      </a>
    </div>
    <p>Nothing about our new filtered DNS service changes the unfiltered nature of our original 1.1.1.1 service. However, we recognized that some people want a way to control what content is in their home. For instance, I block social media sites from resolving while I am trying to get work done because it makes me more productive. The number one request from users of 1.1.1.1 was that we create a version of the service for home use to block certain categories of sites. And so, earlier today, we launched 1.1.1.1 for Families.</p><p>Over time, we'll provide the ability for users of 1.1.1.1 for Families to customize exactly what categories they block (e.g., do what I do with social media sites to stay productive). But, initially, we created two default settings that were the most requested types of content people wanted to block: Malware (which you can block by setting 1.1.1.2 and 1.0.0.2 as your DNS resolvers) and Malware + Adult Content (which you can block by setting 1.1.1.3 and 1.0.0.3 as your DNS resolvers).</p>
    <div>
      <h2>Licensed Categorization Data</h2>
      <a href="#licensed-categorization-data">
        
      </a>
    </div>
    <p>To get data for 1.1.1.1 for Families  we licensed feeds from multiple different providers who specialize in site categorization. We spent the last several months reviewing classification providers to choose the ones that had the highest accuracy and lowest false positives.</p><p>Malware, encompassing a range of widely agreed upon cyber security threats, was the easier of the two categories to define. For Adult Content, we aimed to mirror the Google SafeSearch criteria. Google has been thoughtful in this area and their SafeSearch tool is designed to limit search results for "sexually explicit content." The definition is focused on pornography and largely follows the requirements of the <a href="http://ifea.net/cipa.pdf">US Children's Internet Protection Act (CIPA)</a>, which schools and libraries in the United States are required to follow.</p><p>Because it was the default for the 1.1.1.3 service, and because we planned in the future to allow individuals to set their own specifications beyond the default, we intended the Adult Content category to be narrow. What we did not intend to include in the Adult Content category was LGBTQIA+ content. And yet, when it launched, we were horrified to receive reports that those sites were being filtered.</p>
    <div>
      <h2>Choosing the Wrong Feed</h2>
      <a href="#choosing-the-wrong-feed">
        
      </a>
    </div>
    <p>So what went wrong? The data providers that we license content from have different categorizations; those categorizations do not line up perfectly between different providers. One of the providers has multiple "Adult Content" categories. One “Adult Content” category includes content that mirrors the Google SafeSearch/CIPA definition. Another “Adult Content” content category includes a broader set of topics, including LGBTQIA+ sites.</p><p>While we had specifically reviewed the Adult Content category to ensure that it was narrowly tailored to mirror the Google SafeSearch/CIPA definition, when we released the production version this morning we included the wrong “Adult Content” category from the provider in the build. As a result, the first users who tried 1.1.1.3 saw a broader set of sites being filtered than was intended, including LGBTQIA+ content. We immediately worked to fix the issue.</p>
    <div>
      <h2>Slow to Update Data Structures</h2>
      <a href="#slow-to-update-data-structures">
        
      </a>
    </div>
    <p>In order to distribute the list of sites quickly to all our data centers we use a compact data structure. The upside is that we can replicate the data structure worldwide very efficiently. The downside is that generating a new version of the data structure takes several hours. The minute we saw that we'd made a mistake we pulled the incorrect data provider and began recreating the new data structure.</p><p>While the new data structure replicated across our network we pushed individual sites to an allow list immediately. We began compiling lists both from user reports as well as from other LGBTQIA+ resources. These updates went out instantly. We continuously added sites to the allow list as they were reported or we discovered them.</p><p>By 16:51 UTC, approximately two hours after we’d received the first report of the mistaken blocking, the data structure with the intended definition of Adult Content had been generated and we pushed it out live. The only users that would have seen over-broad blocking are those that had already switched to the 1.1.1.3 service. Users of 1.1.1.1 — which will remain unfiltered — and 1.1.1.2 would not have experienced this inadvertent blocking.</p><p>As of now, the filtering provided by the default setting of 1.1.1.3 is what we intended it to be, and should roughly match what you find if you use Google SafeSearch and LGBTQIA+ sites are not being blocked. If you see site being blocked that should not be, please report them to us here.</p><p><a href="https://report.teams.cloudflare.com/">https://report.teams.cloudflare.com/</a></p>
    <div>
      <h2>Protections for the Future</h2>
      <a href="#protections-for-the-future">
        
      </a>
    </div>
    <p>Going forward, we've set up a number of checks of known sites that should fall outside the intended categories, including many that we mistakenly listed today. Before defaults are updated in the future, our build system will confirm that none of these sites are listed. We hope this will help catch mistakes like this in the future.</p><p>I'm sorry for the error. While I understand how it happened, it should never have happened. I appreciate our team responding quickly to fix the mistake we made.</p> ]]></content:encoded>
            <category><![CDATA[1.1.1.1]]></category>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[Resolver]]></category>
            <guid isPermaLink="false">3xmDWrUarfI0gZkJr6mqJK</guid>
            <dc:creator>Matthew Prince</dc:creator>
        </item>
        <item>
            <title><![CDATA[Announcing the Beta for WARP for macOS and Windows]]></title>
            <link>https://blog.cloudflare.com/announcing-the-beta-for-warp-for-macos-and-windows/</link>
            <pubDate>Wed, 01 Apr 2020 13:00:00 GMT</pubDate>
            <description><![CDATA[ While WARP started as an option within the 1.1.1.1 app, it's really a technology that can benefit any device connected to the Internet. In fact, one of the most common requests we've gotten over the last year is support for WARP for macOS and Windows. Today we're announcing exactly that. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Last April 1 we announced WARP — an option within the 1.1.1.1 iOS and Android app to secure and speed up Internet connections. Today, millions of users have secured their mobile Internet connections with WARP.</p><p>While WARP started as an option within the 1.1.1.1 app, it's really a technology that can benefit any device connected to the Internet. In fact, one of the most common requests we've gotten over the last year is support for WARP for macOS and Windows. Today we're announcing exactly that: the start of the WARP beta for macOS and Windows.</p>
    <div>
      <h3>What's The Same: Fast, Secure, and Free</h3>
      <a href="#whats-the-same-fast-secure-and-free">
        
      </a>
    </div>
    <p>We always wanted to build a WARP client for macOS and Windows. We started with mobile because it was the hardest challenge. And it turned out to be a lot harder than we anticipated. While we announced the beta of 1.1.1.1 with WARP on April 1, 2019 it took us until late September before we were able to open it up to general availability. We don't expect the wait for macOS and Windows WARP to be nearly as long.</p><p>The WARP client for macOS and Windows relies on the same fast, efficient Wireguard protocol to secure Internet connections and keep them safe from being spied on by your ISP. Also, just like WARP on the 1.1.1.1 mobile app, the basic service will be free on macOS and Windows.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2f9xd6DKnT1pbycvX25WmS/ecf9495a96e32589fb1fc99589b4f8f7/warp-desktop.png" />
            
            </figure>
    <div>
      <h3>WARP+ Gets You There Faster</h3>
      <a href="#warp-gets-you-there-faster">
        
      </a>
    </div>
    <p>We plan to add WARP+ support in the coming months to allow you to leverage Cloudflare's <a href="https://www.cloudflare.com/products/argo-smart-routing/">Argo</a> network for even faster Internet performance. We will provide a plan option for existing WARP+ subscribers to add additional devices at a discount. In the meantime, existing WARP+ users will be among the first to be invited to try WARP for macOS and Windows. If you are a WARP+ subscriber, check your 1.1.1.1 app over the coming weeks for a link to an invitation to try the new WARP for macOS and Windows clients.</p><p>If you're not a WARP+ subscriber, you can add yourself to the waitlist by signing up on the page linked below. We'll email as soon as it's ready for you to try.</p><p><a href="https://one.one.one.one">https://one.one.one.one</a></p>
    <div>
      <h3>Linux Support</h3>
      <a href="#linux-support">
        
      </a>
    </div>
    <p>We haven't forgotten about Linux. About 10% of Cloudflare's employees run Linux on their desktops. As soon as we get the macOS and Windows clients out we’ll turn our attention to building a WARP client for Linux.</p><p>Thank you to everyone who helped us make WARP fast, efficient, and reliable on mobile. It's incredible how far it's come over the last year. If you tried it early in the beta last year but aren't using it now, I encourage you to give it another try. We're looking forward to bringing WARP speed and security to even more devices.</p> ]]></content:encoded>
            <category><![CDATA[WARP]]></category>
            <category><![CDATA[1.1.1.1]]></category>
            <category><![CDATA[Security]]></category>
            <category><![CDATA[Speed & Reliability]]></category>
            <category><![CDATA[Privacy]]></category>
            <category><![CDATA[Beta]]></category>
            <category><![CDATA[Resolver]]></category>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[Product News]]></category>
            <guid isPermaLink="false">1izZY0mpIxETwEJk40hMwJ</guid>
            <dc:creator>Matthew Prince</dc:creator>
        </item>
        <item>
            <title><![CDATA[Announcing the Results of the 1.1.1.1 Public DNS Resolver Privacy Examination]]></title>
            <link>https://blog.cloudflare.com/announcing-the-results-of-the-1-1-1-1-public-dns-resolver-privacy-examination/</link>
            <pubDate>Tue, 31 Mar 2020 13:01:00 GMT</pubDate>
            <description><![CDATA[ We took a big step toward improving Internet privacy and security with the launch of the 1.1.1.1 public DNS resolver. And we really meant privacy first. We were not satisfied with the status quo and believed that secure DNS resolution with transparent privacy practices should be the new normal.  ]]></description>
            <content:encoded><![CDATA[ <p></p><p>On April 1, 2018, we took a big step toward improving Internet privacy and security with the <a href="/announcing-1111/">launch of the 1.1.1.1 public DNS resolver</a> — the Internet's <a href="https://www.dnsperf.com/#!dns-resolvers">fastest</a>, privacy-first public DNS resolver. And we really meant privacy first. We were not satisfied with the status quo and believed that secure DNS resolution with transparent privacy practices should be the new normal. So we committed to our public resolver users that we would not retain any personal data about requests made using our 1.1.1.1 resolver. We also built in technical measures to facilitate DNS over HTTPS to help keep your <a href="https://www.cloudflare.com/learning/dns/what-is-dns/">DNS queries</a> secure. We’ve never wanted to know what individuals do on the Internet, and we took technical steps to ensure we can’t know.</p><p>We knew there would be skeptics. Many consumers believe that if they aren’t paying for a product, then they are the product. We don’t believe that has to be the case. So we committed to retaining a Big 4 accounting firm to perform an examination of our 1.1.1.1 resolver privacy commitments.</p><p>Today we’re excited to announce that the 1.1.1.1 resolver examination has been completed and a copy of the independent accountants’ report can be obtained from our <a href="https://www.cloudflare.com/compliance/">compliance page</a>.</p>
    <div>
      <h3>The examination process</h3>
      <a href="#the-examination-process">
        
      </a>
    </div>
    <p>We gained a number of observations and lessons from the privacy examination of the 1.1.1.1 resolver. First, we learned that it takes much longer to agree on terms and complete an examination when you ask an accounting firm to do what we believe is the first of its kind examination of custom privacy commitments for a recursive resolver.</p><p>We also observed that privacy by design works. Not that we were surprised -- we use privacy by design principles in all our products and services. Because we baked anonymization best practices into the 1.1.1.1 resolver when we built it, we were able to demonstrate that we didn’t have any personal data to sell. More specifically, in accordance with <a href="https://tools.ietf.org/html/rfc6235">RFC 6235</a>, we decided to truncate the client/source IP at our edge data centers so that we never store in non-volatile storage the full IP address of the 1.1.1.1 resolver user.</p><p>We knew that a truncated IP address would be enough to help us understand general Internet trends and where traffic is coming from. In addition, we also further improved our privacy-first approach by replacing the truncated IP address with the network number (the ASN) for our internal logs. On top of that, we committed to only retaining those anonymized logs for a limited period of time. It’s the privacy version of belt plus suspenders plus another belt.</p><p>Finally, we learned that aligning our examination of the 1.1.1.1 resolver with our SOC 2 report most efficiently demonstrated that we had the appropriate change control procedures and audit logs in place to confirm that our IP truncation logic and limited data retention periods were in effect during the examination period. The 1.1.1.1 resolver examination period of February 1, 2019, through October 31, 2019, was the earliest we could go back to while relying on our SOC 2 report.</p>
    <div>
      <h3>Details on the examination</h3>
      <a href="#details-on-the-examination">
        
      </a>
    </div>
    <p>When we launched the 1.1.1.1 resolver, we committed that we would not track what individual users of our 1.1.1.1 resolver are searching for online. The examination validated that our system is configured to achieve what we think is the most important part of this commitment -- we never write the querying IP addresses together with the DNS query to disk and therefore have no idea who is making a specific request using the 1.1.1.1 resolver. This means we don’t track which sites any individual visits, and we won't sell your personal data, ever.</p><p>We want to be fully transparent that during the examination we uncovered that our routers randomly capture up to 0.05% of all requests that pass through them, including the querying IP address of resolver users. We do this separately from the 1.1.1.1 service for all traffic passing into our network and we retain such data for a limited period of time for use in connection with network troubleshooting and mitigating denial of service attacks.</p><p>To explain -- if a specific IP address is flowing through one of our data centers a large number of times, then it is often associated with malicious requests or a botnet. We need to keep that information to mitigate attacks against our network and to prevent our network from being used as an attack vector itself. This limited subsample of data is not linked up with DNS queries handled by the 1.1.1.1 service and does not have any impact on user privacy.</p><p>We also want to acknowledge that when we made our privacy promises about how we would handle non-personally identifiable log data for 1.1.1.1 resolver requests, we made what we now see were some confusing statements about how we would handle those anonymous logs.</p><p>For example, we learned that our blog post commitment about retention of anonymous log data was not written clearly enough and our previous statements were not as clear because we referred to temporary logs, transactional logs, and permanent logs in ways that could have been better defined. For example, our 1.1.1.1 resolver privacy FAQs stated that we would not retain transactional logs for more than 24 hours but that some anonymous logs would be retained indefinitely. However, our blog post announcing the public resolver didn’t capture that distinction. You can see a clearer statement about our handling of anonymous logs on our privacy commitments page mentioned below.</p><p>With this in mind, we updated and clarified our <a href="https://developers.cloudflare.com/1.1.1.1/privacy/public-dns-resolver/">privacy commitments</a> for the 1.1.1.1 resolver as outlined below. The most critical part of these commitments remains unchanged: We don’t want to know what you do on the Internet — it’s none of our business — and we’ve taken the technical steps to ensure we can’t.</p>
    <div>
      <h3>Our 1.1.1.1 public DNS resolver commitments</h3>
      <a href="#our-1-1-1-1-public-dns-resolver-commitments">
        
      </a>
    </div>
    <p>We have refined our commitments to 1.1.1.1 resolver privacy as part of our examination effort. The nature and intent of our commitments remain consistent with our original commitments. These updated commitments are what was included in the examination:</p><ol><li><p>Cloudflare will not sell or share public resolver users’ personal data with third parties or use personal data from the public resolver to target any user with advertisements.</p></li><li><p>Cloudflare will only retain or use what is being asked, not information that will identify who is asking it. Except for randomly sampled network packets captured from at most 0.05% of all traffic sent to Cloudflare’s network infrastructure, Cloudflare will not retain the source IP from DNS queries to the public resolver in non-volatile storage (more on that below). The randomly sampled packets are solely used for network troubleshooting and DoS mitigation purposes.</p></li><li><p>A public resolver user’s IP address (referred to as the client or source IP address) will not be stored in non-volatile storage. Cloudflare will anonymize source IP addresses via IP truncation methods (last octet for IPv4 and last 80 bits for IPv6). Cloudflare will delete the truncated IP address within 25 hours.</p></li><li><p>Cloudflare will retain only the limited transaction and debug log data (“Public Resolver Logs”) for the legitimate operation of our Public Resolver and research purposes, and Cloudflare will delete the Public Resolver Logs within 25 hours.</p></li><li><p>Cloudflare will not share the Public Resolver Logs with any third parties except for APNIC pursuant to a Research Cooperative Agreement. APNIC will only have limited access to query the anonymized data in the Public Resolver Logs and conduct research related to the operation of the DNS system.</p></li></ol>
    <div>
      <h3>Proving privacy commitments</h3>
      <a href="#proving-privacy-commitments">
        
      </a>
    </div>
    <p>We created the 1.1.1.1 resolver because we recognized significant privacy problems: ISPs, WiFi networks you connect to, your mobile network provider, and anyone else listening in on the Internet can see every site you visit and every app you use — even if the content is encrypted. Some DNS providers even sell data about your Internet activity or use it to target you with ads. DNS can also be used as a tool of censorship against many of the groups we protect through our <a href="https://www.cloudflare.com/galileo/">Project Galileo</a>.</p><p>If you use DNS-over-HTTPS or DNS-over-TLS to our 1.1.1.1 resolver, your DNS lookup request will be sent over a secure channel. This means that if you use the 1.1.1.1 resolver then in addition to our privacy guarantees an eavesdropper can’t see your DNS requests. We promise we won’t be looking at what you’re doing.</p><p>We strongly believe that consumers should expect their service providers to be able to show proof that they are actually abiding by their privacy commitments. If we were able to have our 1.1.1.1 resolver privacy commitments examined by an independent accounting firm, we think other organizations can do the same. We encourage other providers to follow suit and help improve privacy and transparency for Internet users globally. And for our part, we will continue to engage well-respected auditing firms to audit our 1.1.1.1 resolver privacy commitments. We also appreciate the work that <a href="https://blog.mozilla.org/netpolicy/2019/12/09/trusted-recursive-resolvers-protecting-your-privacy-with-policy-technology/">Mozilla</a> has undertaken to encourage entities that operate recursive resolvers to adopt data handling practices that protect the privacy of user data.</p><p>Details of the 1.1.1.1 resolver privacy examination and our accountant’s opinion can be found on <a href="https://www.cloudflare.com/compliance/">Cloudflare’s Compliance page</a>.</p><p>Visit <a href="https://developers.cloudflare.com/1.1.1.1/">https://developers.cloudflare.com/1.1.1.1/</a> from any device to get started with the Internet's fastest, privacy-first DNS service.</p><p>PS Cloudflare has traditionally used tomorrow, April 1, to release new products. Two years ago we launched the <a href="/announcing-1111/">1.1.1.1 free, fast, privacy-focused public DNS resolver</a>. One year ago we launched <a href="/1111-warp-better-vpn/">WARP</a> our way of securing and accelerating mobile Internet access.</p><p>And tomorrow?</p><p><i>Then three key changes</i><i>One before the weft, also</i><i>Safety to the roost</i></p> ]]></content:encoded>
            <category><![CDATA[1.1.1.1]]></category>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[Resolver]]></category>
            <category><![CDATA[Privacy]]></category>
            <category><![CDATA[DoH]]></category>
            <category><![CDATA[Policy & Legal]]></category>
            <guid isPermaLink="false">1BYDWDCT1PtaeQD75NqKRZ</guid>
            <dc:creator>John Graham-Cumming</dc:creator>
        </item>
        <item>
            <title><![CDATA[Protect your team with Cloudflare Gateway]]></title>
            <link>https://blog.cloudflare.com/protect-your-team-with-cloudflare-gateway/</link>
            <pubDate>Thu, 12 Mar 2020 12:00:00 GMT</pubDate>
            <description><![CDATA[ Announcing Cloudflare for Teams, a new way to protect organizations and their employees, without sacrificing performance. Cloudflare for Teams centers around Cloudflare Access and Cloudflare Gateway. ]]></description>
            <content:encoded><![CDATA[ <p>On January 7th, we <a href="https://www.cloudflare.com/press-releases/2020/cloudflare-enters-new-security-market-launches-cloudflare-for-teams-to-make/">announced</a> Cloudflare for Teams, a new way to protect organizations and their employees globally, without sacrificing performance. Cloudflare for Teams centers around two core products - Cloudflare Access and Cloudflare Gateway. Cloudflare Access is already available and used by thousands of teams around the world to <a href="https://www.cloudflare.com/application-services/solutions/">secure internal applications</a>. Cloudflare Gateway solves the other end of the problem by <a href="https://www.cloudflare.com/products/zero-trust/threat-defense/">protecting those teams from security threats</a> without sacrificing performance.</p><p>Today, we’re excited to announce new secure DNS filtering capabilities in Cloudflare Gateway. Cloudflare Gateway protects teams from threats like malware, phishing, ransomware, crypto-mining and other security threats. You can start using Cloudflare Gateway at <a href="https://dash.teams.cloudflare.com">dash.teams.cloudflare.com</a>. Getting started takes less than five minutes.</p>
    <div>
      <h2>Why Cloudflare Gateway?</h2>
      <a href="#why-cloudflare-gateway">
        
      </a>
    </div>
    <p>We built Cloudflare Gateway to address key challenges our customers experience with <a href="https://www.cloudflare.com/network-security/">managing and securing global networks</a>. The root cause of these challenges is architecture and inability to scale. Legacy network security models solved problems in the 1990s, but teams have continued to attempt to force the Internet of the 2020s through them.</p><p>Historically, branch offices sent all of their Internet-bound traffic to one centralized data center at or  near corporate headquarters. Administrators configured that to make sure all requests passed through a secure hardware firewall. The hardware firewall observed each request, performed inline SSL inspection, applied DNS filtering and made sure that the corporate network was safe from security threats. This solution worked when employees accessed business critical applications from the office, and when applications were not on the cloud.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4HCYjlo96gO2l25olEdxHW/27e9d2eb5af5c72beb8b1f0dd8750ccb/image1-4.png" />
            
            </figure><p>Average SaaS spending per company since 2008 (<a href="https://www.blissfully.com/saas-trends/2019-annual/">source</a>)</p><p>SaaS broke this model when cloud-delivered applications became the new normal for workforce applications. As business critical applications moved to the cloud, the number of Internet bound requests from all the offices went up. Costs went up, too. In the last 10 years, SaaS spending across all company size segments  grew by more than <b>1615%</b>. The legacy model of backhauling all Internet traffic through centralized locations could not keep up with the digital transformation that all businesses are still going through.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6lym9DYYf2dNZIpWJpsgcR/314594f4b1424db2402393a447eb6bcf/image6-2.png" />
            
            </figure>
    <div>
      <h2>The challenge of backhauling traffic for a global workforce</h2>
      <a href="#the-challenge-of-backhauling-traffic-for-a-global-workforce">
        
      </a>
    </div>
    
    <div>
      <h3>Expensive and slow</h3>
      <a href="#expensive-and-slow">
        
      </a>
    </div>
    <p>SaaS adoption is only one element that is breaking traditional network models. Geographically distributed offices and <a href="https://www.cloudflare.com/products/zero-trust/remote-workforces/">remote workers</a> are playing a role, too.</p><p>Cloudflare Gateway has been in beta use for some of our customers over the last few months. One of those customers had more than 50 branch offices, and sent all of their <a href="https://www.cloudflare.com/learning/dns/what-is-dns/">DNS traffic</a> through one location. The customer’s headquarters is in New York, but they have offices all over the world, including in India. When someone from the office in India visits google.com, DNS requests travel all the way to New York.</p><p>As a result, employees in India have a terrible experience using the Internet. The legacy approach to solve this problem is to add <a href="https://www.cloudflare.com/learning/network-layer/what-is-mpls/">MPLS links</a> from branch offices to the headquarters. But MPLS links are expensive, and can take a long time to configure and deploy. Businesses end up spending millions of dollars on legacy solutions, or they remain slow, driving down employee productivity.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/56KduMw759bHJUBPwCyZ6s/9db7a5d611250754b65b8d7f3c69b414/image2-6.png" />
            
            </figure>
    <div>
      <h3>Slow to react to security threats</h3>
      <a href="#slow-to-react-to-security-threats">
        
      </a>
    </div>
    <p>When businesses backhaul traffic to a single location to inspect and filter malicious traffic using a hardware firewall. But, the legacy hardware appliances were not built for the modern Internet. The threat landscape for the Internet is constantly changing.</p><p>For example: about 84% of phishing sites exist for less than 24 hours (<a href="https://www.infosecurity-magazine.com/news/84-of-phishing-sites-last-for-less/">source</a>) and legacy hardware firewalls are not fast enough to update their static rules to thwart phishing attacks. When security threats on the Internet act like moving targets, legacy hardware appliances that rely on static models to filter malicious traffic cannot keep up. As a result, employees remain <a href="https://www.cloudflare.com/learning/email-security/what-is-email-fraud/">vulnerable to new threats</a> even when businesses backhaul Internet bound traffic to a single location.</p>
    <div>
      <h3>Cloudflare Gateway</h3>
      <a href="#cloudflare-gateway">
        
      </a>
    </div>
    <p>Starting today, businesses of all sizes can secure all their Internet-bound traffic and make it faster with  Cloudflare Gateway. Cloudflare has data centers in more than 200 cities around the world and all of our services run in every single data center. Therefore, when a business uses Cloudflare Gateway, instead of backhauling traffic to a single location (slow), all Internet-bound requests <a href="https://www.cloudflare.com/learning/network-layer/what-is-branch-networking/">travel to the nearest data center</a> (fast) from the end user where Cloudflare Gateway applies security policies to protect businesses from security threats. All of this is done without the need for expensive MPLS links.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/U5JtESBJQiFZTjvZ2hPYj/489b75a170e8b32a05c33db7bcb59eb3/image7-2.png" />
            
            </figure><p>(<a href="https://www.dnsperf.com/#!dns-resolvers">Source</a>)</p><p>Gateway’s secure DNS filtering capabilities are built on top of 1.1.1.1, the fastest public DNS resolver in the world. We took the pieces that made the 1.1.1.1 public DNS resolver the fastest and built Cloudflare Gateway’s secure DNS filtering capabilities for customers who want to secure their connection to the Internet. Combined with Cloudflare’s global presence of data centers in more than 200 cities and the fastest public DNS resolver in the world, Cloudflare Gateway secures every connection from every device to every destination on the Internet without sacrificing performance.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/797aIlRBWUhiHnPOCZfUn5/443da29928a16a64545c3762d707ae6a/image11-1.png" />
            
            </figure>
    <div>
      <h2>Why Secure DNS Filtering?</h2>
      <a href="#why-secure-dns-filtering">
        
      </a>
    </div>
    <p>More than <a href="https://www.infosecurity-magazine.com/webinars/dns-based-attacks-1-1-1-1-1-1-1/">90%</a> of malware use DNS to perform command &amp; control attacks and exfiltrate sensitive data. Here’s an example of how a malware can infect a device or a data center and perform a command &amp; control (also known as C2C or C&amp;C) attack:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4i4Gyr9P2k9duO8L3npuDI/2c25bc76915eebf2434b71a7aec0d24a/Screen-Shot-2020-03-16-at-5.55.30-PM.png" />
            
            </figure><ol><li><p>Imagine Bob receives an email from someone impersonating his manager with a link to ‘Box’ that looks harmless. The email looks legitimate but in reality it is a phishing email intended to steal valuable information from Bob’s computer or infected with malware.</p></li><li><p>When Bob clicks on the link, the website phishing ‘Box’ delivers an exploit and installs malware onto Bob’s computer.</p></li><li><p>The downloaded malware sends a request to the Command &amp; Control server signaling that the malware is ready to receive instructions from the server.</p></li><li><p>Once the connection between the malware and Command &amp; Control server is established, the server sends instructions to the malware to steal proprietary data, control the state of the machine to reboot it, shut it down or perform DDoS attacks against other websites.</p></li></ol><p>If Bob’s computer was using DNS filtering, it could have prevented the attack in two places.</p><p>First, when Bob clicked on the phishing link (2). The browser sends a DNS request to resolve the domain of the phishing link. If that domain was identified by DNS filtering as a phishing domain, it would have blocked it right away.</p><p>Second, when malware initiated the connection with the Command &amp; Control server, the malware also needed to make a DNS request to learn about the Command &amp; Control server’s IP address. This is another place where a secure DNS filtering service can detect the domain as malware and block access to it.</p><p>Secure DNS filtering acts as the first layer of defence against most security threats and prevents corporate networks and devices from getting infected by malicious software in the first place. According to a <a href="https://www.darkreading.com/network-and-perimeter-security/dns-firewalls-could-save-companies-billions/d/d-id/1334965">security report</a> by Global Cyber Alliance, companies could have prevented losses of more than <b>$200B</b> using DNS filtering.</p>
    <div>
      <h2>How does Gateway’s secure DNS filtering work?</h2>
      <a href="#how-does-gateways-secure-dns-filtering-work">
        
      </a>
    </div>
    <p>The primary difference between the 1.1.1.1 public DNS resolver and Gateway’s secure DNS filtering is that the 1.1.1.1 public DNS resolver does not block any DNS queries. When a browser requests <a href="http://example.com">example.com</a>, the 1.1.1.1 public DNS resolver simply looks up the answer for the DNS query either in cache or by performing a full recursive query.</p><p>Cloudflare Gateway adds one new step to introduce security into this flow. Instead of allowing all DNS queries, Gateway first checks the name being queried against the intelligence Cloudflare has about threats on the Internet. If that query matches a known threat, or is requesting a blocked category, Gateway stops it before the site could load for the user - and potentially execute code or phish that team member.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/33cp6n2YSAmbzPtm5H8KVs/bbaec33a18697c7d3df1d658e0deb556/image10-1.png" />
            
            </figure><p>For example, if a customer is using Cloudflare Gateway, and sends a DNS query to <a href="http://example.com">example.com</a>, first, Gateway checks if the DNS query is coming from a customer. Second, if it is coming from a customer Gateway checks if the DNS query matches with any of the policies setup by the customer. The policy could be a domain that the customer is manually blocking or it could be part of a broader security category that the customer enabled. If the domain matches one of those cases, Cloudflare Gateway will block access to the domain. This will prevent the end user from going to example.com.</p>
    <div>
      <h2>Encrypted DNS from day one</h2>
      <a href="#encrypted-dns-from-day-one">
        
      </a>
    </div>
    <p>Gateway supports DNS over HTTPS today and will also support DNS over TLS in the future. You can use <a href="https://developers.cloudflare.com/gateway/locations/setup-instructions/firefox/">Firefox</a> to start sending DNS queries to Gateway in an encrypted fashion. It will also support other DNS over HTTPS clients as long as you can change the hostname in your preferred DNS over HTTPS client.</p><p>Here’s how DNS over HTTPS for Cloudflare Gateway works:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/27FR8rI0RVKTGAATu6lOBn/9d321a6af617de0b6141d140845cae98/image5-4.png" />
            
            </figure><p>The DNS over HTTPS client encrypts the DNS request and sends it to the closest Cloudflare’s data center. Upon receiving the encrypted DNS request, it will decrypt it and send it to Cloudflare Gateway. Cloudflare Gateway will apply the required security policies and return the response to our edge. Our edge will encrypt the response and send it back to the DNS over HTTPS client.</p><p>By encrypting your DNS queries you will make sure that ISPs cannot snoop on your DNS queries and at the same time filter DNS requests that are malicious.</p>
    <div>
      <h2>Cloudflare Gateway is for everyone</h2>
      <a href="#cloudflare-gateway-is-for-everyone">
        
      </a>
    </div>
    <p>One of our customers, Algolia, is a fast growing startup. Algolia grew by 1005% in 2019 (<a href="https://www.globenewswire.com/news-release/2019/11/07/1943413/0/en/Algolia-Ranked-Number-125-Fastest-Growing-Company-in-North-America-on-Deloitte-s-2019-Technology-Fast-500.html">source</a>). As the company experienced rapid growth, Cloudflare Gateway helped maintain their corporate security without slowing them down:</p><blockquote><p>“<i>Algolia is growing pretty fast. At Algolia, we needed a way to have visibility across our corporate network without slowing things down for our employees. Cloudflare Gateway gave us a simple way to do that</i>”<b>Adam Surak</b> (Director of Infrastructure &amp; Security Algolia)</p></blockquote><p>But Gateway isn’t just for fast growing startups. Anyone with a Cloudflare account can start using Cloudflare Gateway today. Gateway has a free tier where we wanted to make sure even <a href="https://www.cloudflare.com/small-business/">small businesses</a>, teams and <a href="https://www.cloudflare.com/personal/">households</a> who cannot afford expensive security solutions can use Cloudflare Gateway to protect themselves from security threats on the Internet. We offer a free plan to our customers because we have a paid tier for this product with additional functionality that are more suited towards super users. Features like longer data retention for analytics, more granular security and content categories, individual DNS query logs, logpush to a cloud storage bucket etc. are features that are only available to our paid customers. You can learn more about Gateway in our <a href="https://teams.cloudflare.com/gateway/">product page</a>.</p>
    <div>
      <h2>How can you get started?</h2>
      <a href="#how-can-you-get-started">
        
      </a>
    </div>
    <p>If you already have a Cloudflare account get started by visiting the <a href="https://dash.teams.cloudflare.com/">Teams dashboard</a>.</p><p>The onboarding will walk you through how to configure your router, or device to send DNS queries to Gateway. The onboarding will help you setup a location. A location is usually a physical entity like your office, retail location, data center or home.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1m7XdgcUqe68OSTB9SkxLz/c6f2126d0a4493a1b712e0b084034cfc/image9.gif" />
            
            </figure><p>Once you finish onboarding, start by configuring a policy. A policy will allow you to block access to malicious websites when anyone is using the Internet from the location that you just created.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/63HlO6ByuEvlRwfSRm1AGd/dfca2f85e8f807295b34b23b6587b5c8/image4.gif" />
            
            </figure><p>You can choose from the categories of policy that we have created. You can also manually add a domain to block it using Gateway.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2Jim8l3kK9S8aWVYwgzEZi/3b57abf523c3e7c1014d09f751d54ce0/image3-4.png" />
            
            </figure><p>Once you start sending DNS queries to Gateway, you will see analytics on the team's dashboard. The analytics dashboard will help you understand if there are any anomalies in your network.</p>
    <div>
      <h3>What’s next</h3>
      <a href="#whats-next">
        
      </a>
    </div>
    <p>Cloudflare's mission is to help create a better Internet. We have achieved this by protecting millions of websites around the world and securing millions of devices using WARP. With Cloudflare Access, we helped secure and protect internal applications. Today, with Cloudflare Gateway’s secure DNS filtering capabilities we have extended our mission to also protect the people who use the Internet every day. The product you are seeing today is a glimpse of what we are building for the future. Our team is incredibly proud of what we have built and we are just getting started.</p> ]]></content:encoded>
            <category><![CDATA[Cloudflare Zero Trust]]></category>
            <category><![CDATA[Cloudflare Gateway]]></category>
            <category><![CDATA[Security]]></category>
            <category><![CDATA[Product News]]></category>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[Resolver]]></category>
            <category><![CDATA[1.1.1.1]]></category>
            <guid isPermaLink="false">7nmm4XKti6UeqrWISOn3ds</guid>
            <dc:creator>Irtefa</dc:creator>
        </item>
        <item>
            <title><![CDATA[Encrypting DNS end-to-end]]></title>
            <link>https://blog.cloudflare.com/encrypting-dns-end-to-end/</link>
            <pubDate>Fri, 21 Dec 2018 16:00:59 GMT</pubDate>
            <description><![CDATA[ Over the past few months, we have been running a pilot with Facebook to test the feasibility of securing the connection between 1.1.1.1 and Facebook’s authoritative name servers.  ]]></description>
            <content:encoded><![CDATA[ <p>Over the past few months, we have been <a href="https://code.fb.com/security/dns-over-tls/">running a pilot with Facebook</a> to test the feasibility of securing the connection between 1.1.1.1 and Facebook’s authoritative name servers. Traditionally, the connection between a resolver and an authoritative name server is unencrypted i.e. over UDP.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2Aw0fH5ga1YAaBhsEsiRYP/76eee714955f8ec94c38de7e8b19893a/Code-Blog-Pilot-Post-1.png" />
            
            </figure><p>In this pilot we tested how an encrypted connection using TLS impacts the end-to-end latency between 1.1.1.1 and Facebook’s authoritative name servers. Even though the initial connection adds some latency, the overhead is amortized over many queries. The resulting DNS latency between 1.1.1.1 and Facebook’s authoritative name servers is on par with the average UDP connections.</p><p>To learn more about how the pilot went, and to see more detailed results, check out the <a href="https://code.fb.com/security/dns-over-tls/">complete breakdown over on Code, Facebook's Engineering blog</a>.</p> ]]></content:encoded>
            <category><![CDATA[1.1.1.1]]></category>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[Resolver]]></category>
            <category><![CDATA[Speed & Reliability]]></category>
            <category><![CDATA[TLS]]></category>
            <guid isPermaLink="false">79Uh3HuEtL51HnXPZBT4Ef</guid>
            <dc:creator>Irtefa</dc:creator>
        </item>
        <item>
            <title><![CDATA[1 Thing You Can Do To Make Your Internet Safer And Faster]]></title>
            <link>https://blog.cloudflare.com/1-thing-you-can-do-to-make-your-internet-safer-and-faster/</link>
            <pubDate>Sun, 11 Nov 2018 13:00:00 GMT</pubDate>
            <description><![CDATA[ On April 1st, 2018, we announced 1.1.1.1, the fastest public DNS resolver in the world. Today, we are launching the 1.1.1.1 mobile app to make it incredibly easy to use 1.1.1.1 on your phone. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>On April 1st, 2018, we announced <a href="/announcing-1111/">1.1.1.1</a>, the fastest public DNS resolver in the world ???. Today, we are launching the 1.1.1.1 mobile app to make it incredibly easy to use 1.1.1.1 on your phone.</p>
    <div>
      <h3>TL;DR</h3>
      <a href="#tl-dr">
        
      </a>
    </div>
    <p>Any time you are on a public internet connection people can see what sites you visit. Even worse, your Internet Service Provider is very possibly selling all of your browsing history to the highest bidder. We have a tool called 1.1.1.1 which makes it easy to get a faster, more private, Internet experience, but it’s historically been too complex for many people to use, particularly on mobile devices. Today, we’re launching an app you (and everyone you know) can use to use 1.1.1.1 every time your mobile phone connects to the Internet. It’s a free, it’s easy, download it now.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6mDDCWpzXKLTIzY4JfSncM/91df9a707705b2671710f51676fb8963/1.1.1.1-Screen-Record.gif" />
            
            </figure><div>
<a href="https://play.google.com/store/apps/details?id=com.cloudflare.onedotonedotonedotone">

</a>
<a href="https://itunes.apple.com/us/app/1-1-1-1-faster-internet/id1423538627?mt=8">
</a>
</div>
    <div>
      <h3>Fastest Public Resolver</h3>
      <a href="#fastest-public-resolver">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6YrDCxkfXtonK0ecAVKEsB/f63d7e6213b1a8f6da3df29714047e1f/DNS-Perf.png" />
            
            </figure><p><a href="https://www.dnsperf.com/#!dns-resolvers">DNSPerf</a> data</p><p>We launched 1.1.1.1 on April 1st. Frankly, we’ve been blown away by how many people actually made the switch. Changing your network settings is not easy, but if our traffic amount is any indication, many of you made the effort. Thank you!</p><p>That said, even more people are not able to make those changes, particularly on mobile devices. We want everyone to have access to faster and more private Internet, and the millions of sites on Cloudflare value the performance boost they get when visited by 1.1.1.1 users.</p><p>A month ago, we <a href="https://twitter.com/1111Resolver/status/1049785508342030336">announced</a> the public beta of a new, easier, way to install 1.1.1.1, a mobile app.</p>
    <div>
      <h3>What did we learn from the beta?</h3>
      <a href="#what-did-we-learn-from-the-beta">
        
      </a>
    </div>
    <p>We learned a lesson it seems we discover again with every product we launch: our beta customers are incredible! They discovered bugs and configuration issues, not just with the app but also with mobile carriers.</p><p>Particularly given its role as the first app we will release on any mobile app store, we were energized (and shocked) by the excitement we received. We saw what we always hoped for, a faster Internet, all around the world:</p><blockquote><p>Damn <a href="https://twitter.com/Cloudflare?ref_src=twsrc%5Etfw">@Cloudflare</a> your 1.1.1.1 app is incredible. Things that normally takes 5 to 7 seconds to load in Vietnam are taking 3.</p><p>— Chris Walton (@ChrisWalton10) <a href="https://twitter.com/ChrisWalton10/status/1058040496528928769?ref_src=twsrc%5Etfw">November 1, 2018</a></p></blockquote><p>Our heartfelt thanks to every user who showed us ❤️and helped us make 1.1.1.1 available to the world.</p>
    <div>
      <h3>1 App, Free for Everyone</h3>
      <a href="#1-app-free-for-everyone">
        
      </a>
    </div>
    <p>The 1.1.1.1. app makes your Internet faster and more private. It is darn easy to set up. And, the best part: it’s free!</p><p>It is the right thing to do. We are making it easier for everyone to make their experience when they use the Internet more private. People should not have to pay to have a more private Internet.</p><p>Beyond that, millions of websites rely on Cloudflare for performance and security. By getting more users on 1.1.1.1, we make those sites faster. That makes Cloudflare better, and it makes the <a href="https://blog.cloudflare.com/50-years-of-the-internet-work-in-progress-to-a-better-internet/">Internet better</a>, a win-win.</p><p>Download today to have a safer and faster Internet ✌️✌️.</p><div>
<a href="https://play.google.com/store/apps/details?id=com.cloudflare.onedotonedotonedotone">

</a>
<a href="https://itunes.apple.com/us/app/1-1-1-1-faster-internet/id1423538627?mt=8">
</a>
</div><p></p> ]]></content:encoded>
            <category><![CDATA[1.1.1.1]]></category>
            <category><![CDATA[Resolver]]></category>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[Privacy]]></category>
            <category><![CDATA[Product News]]></category>
            <category><![CDATA[Mobile]]></category>
            <category><![CDATA[Speed & Reliability]]></category>
            <guid isPermaLink="false">5ZF7Rob2S6AnDhgQCwJQ6K</guid>
            <dc:creator>Irtefa</dc:creator>
        </item>
        <item>
            <title><![CDATA[Refresh Stale DNS Records on 1.1.1.1]]></title>
            <link>https://blog.cloudflare.com/refresh-stale-dns-records-on-1-1-1-1/</link>
            <pubDate>Tue, 21 Aug 2018 21:58:00 GMT</pubDate>
            <description><![CDATA[ You can now refresh 1.1.1.1’s DNS cache for domain names by using the purge cache tool. This is useful for domain owners who have updated their DNS records and want to make sure it is reflected for people who are using 1.1.1.1 as their public DNS resolver. ]]></description>
            <content:encoded><![CDATA[ <p>You can now refresh <a href="https://1.1.1.1">1.1.1.1</a>’s DNS cache for domain names by using the <a href="https://cloudflare-dns.com/purge-cache/">purge cache tool</a>. This is useful for domain owners who have just updated their DNS records and want to make sure it is reflected for everyone using 1.1.1.1 as their public DNS resolver.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5BBLdPQGUZg5MmY9Hja51A/2784505a54f4dbaff3d8928ab07073ea/image2-3.png" />
            
            </figure><p></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7A5t7Y9XCv4EpC0kEKilbk/63d938fe9cf5953769324c5e37061c56/image1-2.png" />
            
            </figure><p>When a client queries for a domain against 1.1.1.1, the resolver returns the IP address from its cache.1.1.1.1 caches DNS entries for up to 3 hours, if the specified record has TTL that is shorter than 3 hours, the resolver respects that. This means, when a domain owner changes the DNS host from one to another, in the worst case, she will have to wait for at least 3 hours before the old IP address expires from 1.1.1.1’s cache. With the help of the purge cache tool, a domain owner can now easily refresh 1.1.1.1’s DNS cache and will not have to wait for the cached entry to expire.</p><p>To purge a DNS record, you enter the name of your domain, pick the DNS record type and hit the ‘Purge Cache’ button.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3KDbqBxGKRUZWAsupqHMeh/5203f70e55a2ad9270a21bdb937a6269/image3-2.gif" />
            
            </figure><p>You can pick from one of the following DNS records: A, AAAA, CNAME, DNSKEY, DS, MX, NAPTR, NS, PTR, SPF, SRV, SSHFP, TLSA, and TXT. Once you hit the purge button it takes a few seconds to propagate the cache purge to all of Cloudflare’s data centers.</p><p>Check out the <a href="https://cloudflare-dns.com/purge-cache/">purge cache tool</a> here and let us know what you think in the comments!</p> ]]></content:encoded>
            <category><![CDATA[Resolver]]></category>
            <category><![CDATA[1.1.1.1]]></category>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[Cache]]></category>
            <category><![CDATA[Product News]]></category>
            <guid isPermaLink="false">1xjyf60aDja3LXvO0iw7mV</guid>
            <dc:creator>Irtefa</dc:creator>
        </item>
        <item>
            <title><![CDATA[Enable Private DNS with 1.1.1.1 on Android 9 Pie]]></title>
            <link>https://blog.cloudflare.com/enable-private-dns-with-1-1-1-1-on-android-9-pie/</link>
            <pubDate>Thu, 16 Aug 2018 15:01:15 GMT</pubDate>
            <description><![CDATA[ Android 9 Pie includes a slew of new features around digital well-being and privacy. Here's how to use the new Private DNS feature with 1.1.1.1. ]]></description>
            <content:encoded><![CDATA[ 
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/57zPjGaEEfAzjR9eaXnnof/5c2c5cec12dcb52cea584149a32ca509/image2-1.png" />
            
            </figure><p>Recently, Google officially launched <a href="https://www.android.com/versions/pie-9-0/">Android 9 Pie</a>, which includes a slew of new features around digital well-being, security, and privacy. If you’ve poked around the network settings on your phone while on the beta or after updating, you may have noticed a new <a href="https://android-developers.googleblog.com/2018/04/dns-over-tls-support-in-android-p.html">Private DNS Mode</a> now supported by Android.</p><p>This new feature simplifies the process of configuring a custom secure DNS resolver on Android, meaning parties between your device and the websites you visit won’t be able to snoop on your DNS queries because they’ll be encrypted. The protocol behind this, TLS, is also responsible for the green lock icon you see in your address bar when visiting websites over HTTPS. The same technology is useful for encrypting DNS queries, ensuring they cannot be tampered with and are unintelligible to ISPs, mobile carriers, and any others in the network path between you and your DNS resolver. These new security protocols are called <a href="https://developers.cloudflare.com/1.1.1.1/dns-over-https/">DNS over HTTPS</a>, and <a href="https://developers.cloudflare.com/1.1.1.1/dns-over-tls/">DNS over TLS</a>.</p>
    <div>
      <h3>Configuring 1.1.1.1</h3>
      <a href="#configuring-1-1-1-1">
        
      </a>
    </div>
    <p>Android Pie only supports DNS over TLS. To enable this on your device:</p><ol><li><p>Go to Settings → Network &amp; internet → Advanced → Private DNS.</p></li><li><p>Select the Private DNS provider hostname option.</p></li><li><p>Enter <code>1dot1dot1dot1.cloudflare-dns.com</code> and hit Save.</p></li><li><p>Visit <a href="https://1.1.1.1/help">1.1.1.1/help</a> (or <a href="https://1.0.0.1/help">1.0.0.1/help</a>) to verify that “Using DNS over TLS (DoT)” shows as “Yes”.</p></li></ol><p>And you’re done!</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/75TkxmEoBX1RdWQx1Gjv9h/07d64cd4c8c7df85f294e81a4d281a05/Screenshot_20180807-102253-1.png" />
            
            </figure>
    <div>
      <h3>Why Use Private DNS?</h3>
      <a href="#why-use-private-dns">
        
      </a>
    </div>
    <p>So how do <a href="https://developers.cloudflare.com/1.1.1.1/dns-over-https/">DNS over HTTPS</a> and <a href="https://developers.cloudflare.com/1.1.1.1/dns-over-tls/">DNS over TLS</a> fit into the current state of internet privacy?</p><p><a href="https://en.wikipedia.org/wiki/Transport_Layer_Security">TLS</a> is the protocol that encrypts your traffic over an untrusted communication channel, like when browsing your email on a cafe’s wireless network. Even with TLS, there is still no way of knowing if your connection to the DNS server has been hijacked or is being snooped on by a third party. This is significant because a bad actor could configure an open WiFi hotspot in a public place that responds to DNS queries with falsified records in order to hijack connections to common email providers and online banks. <a href="https://www.cloudflare.com/dns/dnssec/how-dnssec-works/">DNSSEC</a> solves the problem of guaranteeing authenticity by signing responses, making tampering detectable, but leaves the body of the message readable by anyone else on the wire.</p><p>DNS over HTTPS / TLS solves this. These new protocols ensure that communication between your device and the resolver is encrypted, just like we’ve come to expect of HTTPS traffic.</p><p>However, there is one final insecure step in this chain of events: the revealing of the SNI (server name indication) during the initial TLS negotiation between your device and a specific hostname on a server. The requested hostname is not encrypted, so third parties still have the ability to see the websites you visit. It makes sense that the final step in completely securing your browsing activity involves <a href="https://tools.ietf.org/html/draft-ietf-tls-sni-encryption-03">encrypting SNI</a>, which is an in-progress standard that Cloudflare has joined other organizations to define and promote.</p>
    <div>
      <h3>DNS in an IPv6 World</h3>
      <a href="#dns-in-an-ipv6-world">
        
      </a>
    </div>
    <p>You may have noticed that the private DNS field does not accept an IP address like 1.1.1.1 and instead wants a hostname like 1dot1dot1dot1.cloudflare-dns.com. This doesn’t exactly roll off the tongue, so we’re working on deploying an easier to remember address for the resolver, and will continue to support 1.1.1.1, 1.0.0.1, and 1dot1dot1dot1.cloudflare-dns.com.</p><p>Google requires a hostname for this field because of how mobile carriers are adapting to a dual-stack world in which IPv4 and IPv6 coexist. Companies are adopting IPv6 <a href="https://www.internetsociety.org/resources/doc/2017/state-of-ipv6-deployment-2017/">much more rapidly</a> than generally expected, and all major mobile carriers in the US <a href="http://www.worldipv6launch.org/major-mobile-us-networks-pass-50-ipv6-threshold/">support it</a>, including T-Mobile who has <a href="https://www.internetsociety.org/resources/deploy360/2014/case-study-t-mobile-us-goes-ipv6-only-using-464xlat/">gone completely IPv6</a>. In a world where the <a href="https://www.statista.com/statistics/471264/iot-number-of-connected-devices-worldwide/">approximately 26 billion</a> internet-connected devices vastly outnumber the 4.3 billion IPv4 addresses, this is good news. And in a forward-thinking move, Apple requires that all new iOS apps <a href="/supporting-the-transition-to-ipv6-only-networking-services-for-ios/">must support</a> single-stack IPv6 networks.</p><p>However, we still live in a world with IPv4 addresses, so phone manufacturers and carriers have to architect their systems with backwards compatibility in mind. Currently, iOS and Android request both <a href="https://www.cloudflare.com/learning/dns/dns-records/dns-a-record/">A</a> and AAAA DNS records, which contain the IP address(es) corresponding to a domain in version 4 and version 6 format, respectively. Try it out yourself:</p>
            <pre><code>$ dig A +short 1dot1dot1dot1.cloudflare-dns.com
1.0.0.1
1.1.1.1

$ dig AAAA +short 1dot1dot1dot1.cloudflare-dns.com
2606:4700:4700::1001
2606:4700:4700::1111</code></pre>
            <p>To talk to a device with only an IPv4 address over an IPv6 only network, the DNS resolver has to translate IPv4 addresses into the IPv6 address using <a href="https://en.wikipedia.org/wiki/IPv6_transition_mechanism#DNS64">DNS64</a>. The requests to those translated IP addresses then go through the NAT64 translation service provided by the network operator. This is all completely transparent to the device and web server.</p><p>Learn more about this process <a href="https://blog.apnic.net/2016/06/09/lets-talk-ipv6-dns64-dnssec/">from APNIC</a>.</p> ]]></content:encoded>
            <category><![CDATA[1.1.1.1]]></category>
            <category><![CDATA[Resolver]]></category>
            <category><![CDATA[IPv6]]></category>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[TLS]]></category>
            <category><![CDATA[Security]]></category>
            <category><![CDATA[Privacy]]></category>
            <guid isPermaLink="false">5YIdDI8hSCNXllagVrj1Di</guid>
            <dc:creator>Stephen Pinkerton</dc:creator>
        </item>
        <item>
            <title><![CDATA[1.1.1.1 for Your Organization]]></title>
            <link>https://blog.cloudflare.com/1-1-1-1-for-your-organization/</link>
            <pubDate>Wed, 25 Jul 2018 15:00:00 GMT</pubDate>
            <description><![CDATA[ Our fast, privacy-centric 1.1.1.1 project can secure your users on the Internet, and you’ll always know that they’ll be the first to benefit from the work of Internet standards bodies like the IETF. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>A few months ago, we <a href="/announcing-1111/">announced</a> the world’s fastest, privacy-first, recursive DNS resolver, <a href="https://1.1.1.1/">1.1.1.1</a>. It’s been exciting watching the community reaction to this project, and to be in a position where we can promote new standards around private DNS.</p><p>The Cloudflare network helps to make measurable improvements to the Internet by rolling out security updates to millions of websites at once. This allows us to provide <a href="https://www.cloudflare.com/application-services/products/ssl/">free SSL certificates</a> to any website, and to implement <a href="/you-get-tls-1-3-you-get-tls-1-3-everyone-gets-tls-1-3/">state-of-the-art security</a> for our customers.</p><p>We saw the same potential impact when deciding to build 1.1.1.1. From launch, we wanted people to be able to connect to their favorite websites faster, and to ensure that no entity between their computer and the origin web server was recording their browsing history. We’re proud to have achieved that goal with the <a href="https://www.dnsperf.com/#!dns-resolvers">fastest public DNS resolver in the world</a>.</p><p>Consumer adoption of the resolver has been strong, and it makes sense: new legislation allows ISPs to track and sell your web history. But not everyone feels comfortable changing the default DNS resolver on their computer or home network. <b>We want to empower IT departments and network administrators to change the default DNS resolver for their organization, at the network or device level.</b> Our fast, privacy-centric 1.1.1.1 project can secure your users on the Internet, and you’ll always know that they’ll be the first to benefit from the work of Internet standards bodies like the IETF.</p><p>If you, or your IT department, are interested, please <a href="https://goo.gl/forms/tEojnNLT9zRFfYr43">get in touch!</a> We’d be delighted to answer your questions and we'll try to send you some "trendy" 1.1.1.1 stickers.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5GjdziTNxrZT4Smchix6pz/8437c817e104c45a206bc179909ad7e7/1.1.1.1CF.jpg" />
            
            </figure><p></p> ]]></content:encoded>
            <category><![CDATA[1.1.1.1]]></category>
            <category><![CDATA[Resolver]]></category>
            <guid isPermaLink="false">4Oc0uakTMnAEDrXdbEd5eJ</guid>
            <dc:creator>Stephen Pinkerton</dc:creator>
        </item>
        <item>
            <title><![CDATA[DNS-Over-TLS Built-In & Enforced - 1.1.1.1 and the GL.iNet GL-AR750S]]></title>
            <link>https://blog.cloudflare.com/dns-over-tls-built-in/</link>
            <pubDate>Sat, 14 Jul 2018 17:13:00 GMT</pubDate>
            <description><![CDATA[ Back in April, I wrote about how it was possible to modify a router to encrypt DNS queries over TLS using Cloudflare's 1.1.1.1 DNS Resolver and a GL.iNet router; the folks at GL.iNet read that blog post and decided to bake DNS-Over-TLS support into their new router using the 1.1.1.1 resolver. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>GL.iNet GL-AR750S in black, same form-factor as the prior white GL.iNet GL-AR750. Credit card for comparison.</p><p>Back in April, I wrote about how it was possible to <a href="/dns-over-tls-for-openwrt/">modify a router to encrypt DNS queries over TLS</a> using Cloudflare's 1.1.1.1 DNS Resolver. For this, I used the GL.iNet GL-AR750 because it was pre-installed with OpenWRT (LEDE). The folks at GL.iNet read that blog post and decided to bake DNS-Over-TLS support into their new router using the 1.1.1.1 resolver, they sent me one to take a look at before it's available for pre-release. Their new router can also be configured to force DNS traffic to be encrypted before leaving your local network, which is particularly useful for any IoT or mobile device with hard-coded DNS settings that would ordinarily ignore your routers DNS settings and send <a href="https://www.cloudflare.com/learning/dns/what-is-dns/">DNS queries</a> in plain-text.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/20ZCmvqywZDLMhksEzdyXC/1339330e29fe38bb61f4d61aba058a0a/Screen-Shot-2018-07-14-at-04.36.11.png" />
            
            </figure><p>In <a href="/dns-over-tls-for-openwrt/">my previous blog post</a> I discussed how DNS was often the weakest link in the chain when it came to browsing privacy; whilst HTTP traffic is increasingly encrypted, this is seldom the case for DNS traffic. This makes it relatively trivial for an intermediary to work out what site you're sending traffic to. In that post, I went through the technical steps required to modify a router using OpenWRT to support DNS Privacy using the DNS-Over-TLS protocol.</p><p>GL.iNet were in contact since I wrote the original blog post and very supportive of encrypting DNS queries at the router level. Last week whilst working in Cloudflare's San Francisco office, they reached out to me over Twitter to let me know they were soon to launch a new product with a new web UI containing a "DNS over TLS from Cloudflare" feature and offered to send me the new router before it was even available for pre-order.</p><p>On arrival back to our London office, I found a package from Hong Kong waiting for me. Aside from the difference in colour, the AR750<b>S</b> itself is identical in form-factor to the AR750 and was packaged up very similarly. They both have capacity for external storage, an OpenVPN client and can be powered over USB; amongst many other useful functionalities. Alongside the <i>S</i> suffixing the model number, I did notice the new model had some upgraded specs, but I won't dwell on that here.</p><p>Below you can see the white AR750 and the new black AR750S router together for comparison. Both have a WAN ethernet port, 2 LAN ethernet ports, a USB port for external storage (plus a micro SD port) and a micro USB power port.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6xi7DHkcKlmlyhATCPwXY5/ff76634b1660bd6273c04d551b057a39/IMG_4222-COLLAGE--1-.jpg" />
            
            </figure><p>The UI is where the real changes come. In the <i>More Settings</i> tab, there's an option to configure DNS with some nice options.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/44yMMCQEQYU0gwF2Mw7sJy/a1541ecc5226bd91ff4a0b4371234e3c/Screen-Shot-2018-07-14-at-03.46.56.png" />
            
            </figure><p>One notable option is the <i>DNS over TLS from Cloudflare</i> toggle. This option uses the TLS security protocol for encrypting DNS queries, helping increase privacy and prevent eavesdropping.</p><p>Another option, <i>Override DNS Settings for All Clients</i>, forcibly overrides the DNS configuration on all clients so that queries are encrypted to the WAN. Unencrypted DNS traffic is intercepted by the router, and by forcing traffic to use it's own local resolver, it is able to transparently rewrite traffic to be encrypted before leaving the router and heading out into the public internet to the upstream resolver - 1.1.1.1.</p><p>This option is particularly useful when dealing with embedded systems or IoT devices which don't have configurable DNS options; Smart TVs, TV boxes, <a href="/iot-security-anti-patterns/">your toaster</a>, etc. As this router can proxy traffic over to other Wi-Fi networks (and is portable), this is particularly useful when connecting out to an ordinarily insecure Wi-Fi network; the router can sit in the middle and transparently upgrade unencrypted DNS queries. This is even useful when dealing with phones and tablets where you can't install a DNS-Over-TLS client.</p><p>These options both come disabled by default, but can easily be toggled in the UI. As before, you can configure other DNS resolvers by toggling "Manual DNS Server Settings" and entering in any other DNS servers.</p><p>There are a number of other cool features I've noticed in this router; for example, the <i>More Settings</i> &gt; <i>Advanced</i> option takes you into a standard LuCi UI that ordinarily comes bundled with LEDE routers. Like previous routers, you can easily <a href="https://www.cloudflare.com/learning/access-management/what-is-ssh/">SSH</a> into the device and install various program and perform customisations.</p><p>For example; after installing TCPDump on the router, I am able to run <code>tcpdump -n -i wlan-sta 'port 853'</code> to see encrypted DNS traffic leaving the router. When I run a DNS query over an unencrypted resolver (using <code>dig A junade.com</code> on my local computer), I can see the outgoing DNS traffic upgraded to encrypted queries on 1.1.1.1 and 1.0.0.1.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1xYgg1X0pt0JApfVWfLNo2/d7273e83795f4640db9903809b025233/Screen-Shot-2018-07-14-at-17.21.37.png" />
            
            </figure><p>If you're interested in learning how to configure 1.1.1.1 on other routers, your computer or your phone - check out the project landing page at <a href="https://1.1.1.1/">https://1.1.1.1/</a>. If you're a developer and want to learn about how you can integrate 1.1.1.1 into your project with either DNS-Over-TLS or DNS-Over-HTTPS, checkout the <a href="https://developers.cloudflare.com/1.1.1.1/">1.1.1.1 Developer Documentation</a>.</p> ]]></content:encoded>
            <category><![CDATA[1.1.1.1]]></category>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[TLS]]></category>
            <category><![CDATA[Privacy]]></category>
            <category><![CDATA[Resolver]]></category>
            <category><![CDATA[IoT]]></category>
            <category><![CDATA[Security]]></category>
            <guid isPermaLink="false">6qlpMBGbFi8esdYxM4LWxG</guid>
            <dc:creator>Junade Ali</dc:creator>
        </item>
        <item>
            <title><![CDATA[Introducing DNS Resolver for Tor]]></title>
            <link>https://blog.cloudflare.com/welcome-hidden-resolver/</link>
            <pubDate>Tue, 05 Jun 2018 14:46:17 GMT</pubDate>
            <description><![CDATA[ As was mentioned in the original 1.1.1.1 blog post, our policy is to never write client IP addresses to disk and wipe all logs within 24 hours. Still some folks might not want to reveal their IP address to the resolver at all. This is why we are launching a Tor hidden service for our resolver. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>In case you haven’t heard yet, Cloudflare <a href="/dns-resolver-1-1-1-1/">launched</a> a privacy-first <a href="https://www.cloudflare.com/learning/dns/what-is-dns/">DNS</a> resolver service on April 1st. It was no joke! The service, which was our first consumer-focused service, supports emerging DNS standards such as DNS over HTTPS:443 and TLS:853 in addition to traditional protocols over UDP:53 and TCP:53, all in one easy to remember address: <a href="https://1.1.1.1/">1.1.1.1</a>.</p><p>As it was mentioned in the original blog post, our policy is to never, ever write client IP addresses to disk and wipe all logs within 24 hours. Still, the exceptionally privacy-conscious folks might not want to reveal their IP address to the resolver at all, and we respect that. This is why we are launching a Tor onion service for our resolver at <a href="https://dns4torpnlfs2ifuz2s2yf3fc7rdmsbhm6rw75euj35pac6ap25zgqad.onion/">dns4torpnlfs2ifuz2s2yf3fc7rdmsbhm6rw75euj35pac6ap25zgqad.onion</a> and accessible via <a href="https://tor.cloudflare-dns.com/">tor.cloudflare-dns.com</a>.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/36t8h9iQGlsrDy3TQc1tKA/e9e068e98b028fca2ba78befea43aff2/tor.gif" />
            
            </figure><p><b>NOTE:</b> the hidden resolver is still an experimental service and should not be used in production or for other critical uses until it is more tested.</p>
    <div>
      <h3>Crash Course on Tor</h3>
      <a href="#crash-course-on-tor">
        
      </a>
    </div>
    
    <div>
      <h4>What is <a href="https://www.torproject.org/">Tor</a>?</h4>
      <a href="#what-is">
        
      </a>
    </div>
    <p>Imagine an alternative Internet where, in order to connect to <a href="http://www.cloudflare.com">www.cloudflare.com</a>, instead of delegating the task of finding a path to our servers to your internet provider, you had to go through the following steps to reach Cloudflare:</p><ol><li><p>You calculate a path to your destination, like this:</p>
            <pre><code> You -&gt; Your ISP -&gt; X -&gt; Y -&gt; Z -&gt; www.cloudflare.com.</code></pre>
            </li><li><p>You encrypt your packet with Z’s public key, then with Y’s, and finally with X’s.</p></li><li><p>You submit the result to X, who decrypts with their private key;</p></li><li><p>X submits the result to Y, who decrypts with their private key;</p></li><li><p>Y submits the result to Z, who decrypts with their private key to get the original packet;</p></li><li><p>Z submits the packet to <a href="#">www.cloudflare.com</a>.</p></li></ol><p>If everyone plays their roles correctly, it is possible to ensure only the entry relay X knows your IP address and only the exit relay Z knows the website you’re connecting you, thereby providing you with privacy and anonymity. This is a simplified version of Tor: a collection of volunteer-run computers and servers around the world acting as relays for a huge network built on top of the Internet where every hop from one relay to the next peels one layer of encryption, hence its name: the onion router.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1yOeNLuz06vq97sSVI7Wh3/de4df11e1d5a16707fc9782e08e353f9/exit-node.png" />
            
            </figure>
    <div>
      <h4>What are Tor onion services?</h4>
      <a href="#what-are-tor-onion-services">
        
      </a>
    </div>
    <p>Keeping internet users anonymous is not the only function of the Tor network. In particular, one caveat of the procedure above is that the connection is still accessible by the exit relay and anyone sitting between there and the destination, including network providers. To solve this problem, and to also provide anonymity for content publishers, Tor allows for onion services. Onion services are Tor nodes that advertise their public key, encoded as an address with .onion TLD, and establish connections entirely within the Tor network:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3xHVrOH2M3xUJAoyWyOrVv/18da5a8d9cabe75b4e6e4d043794033b/image_3.png" />
            
            </figure>
    <div>
      <h4>How do you resolve a domain while using Tor?</h4>
      <a href="#how-do-you-resolve-a-domain-while-using-tor">
        
      </a>
    </div>
    <p>The process of returning an IP address given a domain name is called <i>DNS resolution</i>. Since Tor still uses IP addresses, you still need to do DNS resolution to browse the web over Tor. There are two common methods to resolve a domain name when using Tor:</p><ol><li><p>Resolve the name directly, then talk to the IP address through Tor;</p></li><li><p>Ask a Tor exit relay to resolve the name publicly and connect to the IP.</p></li></ol><p>Clearly, the first option leaks your IP to your DNS resolver and, unless your client uses DNS-over-HTTPS or DNS-over-TLS, it leaks your destination name to your ISP. What is less obvious is that the second option can open you to manipulation <a href="https://arstechnica.com/information-technology/2014/01/scientists-detect-spoiled-onions-trying-to-sabotage-tor-privacy-network/">attacks</a> such as DNS poisoning or sslstrip by <a href="https://trac.torproject.org/projects/tor/wiki/doc/ReportingBadRelays">bad relays</a>. This is where our new service comes in:</p><ol><li><p>Ask a .onion-based resolver service!</p></li></ol>
    <div>
      <h3>How does the Cloudflare hidden resolver work?</h3>
      <a href="#how-does-the-cloudflare-hidden-resolver-work">
        
      </a>
    </div>
    <p>In a few words, our .onion-based resolver service is a Tor onion service which forwards all communication on DNS ports to the corresponding ports on 1.1.1.1, hence the apparent client IP is an internal IP rather than yours. There is, however, more than meets the eye.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/58mt2tE0qg8NuZBxlQLIkv/896c317a4e879fda177519e1a7ae8ab7/image_4.png" />
            
            </figure>
    <div>
      <h4>Is the hidden resolver secure?</h4>
      <a href="#is-the-hidden-resolver-secure">
        
      </a>
    </div>
    <p>One glaring difference between using 1.1.1.1 and this service is that the .onion address is "dns4tor" plus 49 seemingly random alphanumeric characters. This 56 character long string, in fact, contains a full Ed25519 public key which is used to secure communication with the onion service. This poses a number of challenges towards usable security:</p><ol><li><p>How can the users make sure that that the address is correct?</p></li></ol><p>We simply bought a <a href="https://crt.sh/?id=439705277">certificate</a> with tor.cloudflare-dns.com as subject name and the .onion address as a subject alternative name. This way, if you’re in the right place, you should see this:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/WiWQY2XjyAsa9JZ9nJAbf/de8f31b6bfa3c419e1b35d62c40bbc8e/image_5.png" />
            
            </figure><ol><li><p>How can the users remember this address?</p></li></ol><p>We don’t think you should need to remember this address. Ideally, all you would need to do is go to <a href="https://tor.cloudflare-dns.com">https://tor.cloudflare-dns.com</a> and have the browser route your request to the .onion address. This is possible using the "<a href="https://tools.ietf.org/html/rfc7838">Alt-Svc</a>" HTTP header which is an optional header notifying the browser that the resources can be accessed from an alternative network location, possibly using a different protocol. Thanks to <a href="https://hacks.mozilla.org/2018/05/a-cartoon-intro-to-dns-over-https/">Mozilla</a>, using .onion addresses as alternative services is now possible in <a href="https://nightly.mozilla.org/">Firefox Nightly</a>.</p><p>Think of this feature like <a href="/opportunistic-encryption-bringing-http-2-to-the-unencrypted-web/">opportunistic encryption</a>: once your browser receives an Alt-Svc header indicating that a .onion address is available for tor.cloudflare-dns.com, if it knows that .onion addresses can be accessed (for instance through a SOCKS proxy), it attempts to check that the alternative service has the same or a higher level of security. This includes making sure that it is possible to connect to the onion service using the same certificate and <a href="https://tools.ietf.org/html/rfc6066#section-3">Server Name</a>. If that is the case, the browser uses the alternative service instead, therefore ensuring that your future requests do not leave the Tor network.</p>
    <div>
      <h4>Is the hidden resolver fast?</h4>
      <a href="#is-the-hidden-resolver-fast">
        
      </a>
    </div>
    <p>Here is a thought experiment: suppose between each two points on Earth there is a fiber-optic cable, capable of lossless transmission of packets at the speed of light.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7olJSMff3uxlGuOb2G6j3E/99c18c3b4a9a94c4586bdf2e8e6bd390/image_6.png" />
            
            </figure><p>Using a back-of-the-envelope calculation it’s easy to see that, on average, each packet traverses a distance equivalent to a <b>quarter</b> of the circumference of the Earth in about <b>33ms</b>, while each Tor packet takes about <b>200ms</b> to go <b>one and a half</b> turns around the Earth before reaching an onion service; that’s three turns for a round trip that ensures anonymity of both parties.</p><p>Cloudflare, however, does not require anonymity for its servers, which is why we can reduce the number of relays to just three by enabling an <a href="https://trac.torproject.org/projects/tor/ticket/17178">optional</a> <a href="https://gitweb.torproject.org/torspec.git/tree/proposals/260-rend-single-onion.txt">setting</a> for onion services that prioritize lower latency over location anonymity of the service. To emphasize, this does not impact client privacy or anonymity whatsoever. Indeed, as you may have noticed, in the first onion service image the origin is three hops away from the rendezvous point whereas our onion service is only one hop away.</p><p>We are actively working on developing ways to make this service faster and ensure it has as little downtime as possible.</p>
    <div>
      <h4>Why should I use the Cloudflare hidden resolver?</h4>
      <a href="#why-should-i-use-the-cloudflare-hidden-resolver">
        
      </a>
    </div>
    <p>First and foremost, resolving DNS queries through the Tor network, for instance by connecting to Google’s 8.8.8.8 resolver, guarantees a significantly higher level of anonymity than making the requests directly. Not only does doing so prevent the resolver from ever seeing your IP address, even your ISP won’t know that you’ve attempted to resolve a domain name.</p><p>Still, unless the destination is an onion service, passive attackers can capture packets exiting the Tor network and malicious Exit Nodes can poison DNS queries or downgrade encryption through <a href="https://moxie.org/software/sslstrip/">sslstripping</a>. Even if you limit your browsing to <a href="https://www.eff.org/pages/tor-and-https">only HTTPS</a> sites, passive attackers can find out which addresses you’ve connected to. Even worse, actors capable of comparing traffic both before it enters the Tor network and after it leaves the network can potentially use the metadata (size, time, etc.) to <a href="https://nymity.ch/tor-dns/">deanonymize</a> the client. The only solution, then, is to eliminate the need for Exit Nodes by using onion services instead. That is what our .onion-based resolver offers.</p><p>Moreover, if your client does not support encrypted DNS queries, using a .onion-based resolver can secure the connection from on-path attacks, including BGP hijacking attacks. This means having the same level of security for DNS-over-UDP and DNS-over-TCP as DNS-over-HTTPS and DNS-over-TLS provides.</p><p>Your personal anonymity, however, is not the only reason why you should use this service. The power of Tor in ensuring everyone’s anonymity rests on the number of people who use it. If only whistleblowers, for instance, were to use the Tor network, then anyone connecting to the Tor network would automatically be suspected of being a whistleblower. Therefore the more people use Tor to browse memes or to watch cat videos on the Internet, the easier it will be for those who truly need anonymity to blend in with the traffic.</p><p>One barrier to using Tor for many users is that it is simply slow, so I can try to sympathize with those who wouldn’t sacrifice quick website load times to help keep activists and dissidents anonymous. That said, DNS requests are small in size and since most browsers and operating systems cache DNS results the total traffic is not significant. As a result, using the .onion-based resolver will only slightly slow down your initial DNS request without slowing down anything else, while still contributing to the overall anonymity of the Tor network and its users.</p>
    <div>
      <h3>Why should I trust the Cloudflare hidden resolver?</h3>
      <a href="#why-should-i-trust-the-cloudflare-hidden-resolver">
        
      </a>
    </div>
    <p>Using a .onion-based resolver ensures that your ISP never finds out that you’re resolving a domain, the Exit Nodes don’t get a chance to manipulate DNS replies, and the resolver never finds out your IP address. However, the unique benefit of using the Cloudflare .onion-based resolver is combining the power of Tor with all privacy-preserving features of the 1.1.1.1 resolver, such as query name minimization, as well as a team of engineers working on improving it at every level, including standards like DNS-over-HTTPS and DNS-over-TLS.</p><p>As CEO Matthew Prince said about <a href="/the-trouble-with-tor/">two years ago</a>, anonymity online is a cause we value at Cloudflare. In addition, when we announced the 1.1.1.1 resolver we <a href="https://developers.cloudflare.com/1.1.1.1/commitment-to-privacy/">committed</a> to taking every technical step to ensure we can’t know what you do on the internet. Providing a way to use the resolver through the Tor network and making it as fast as possible is a big step in that direction.</p>
    <div>
      <h3>How to set it up?</h3>
      <a href="#how-to-set-it-up">
        
      </a>
    </div>
    <p>The .onion-based resolver supports every DNS protocol that 1.1.1.1 supports, only over the Tor network. However, since not every DNS client is capable of connecting to the Tor network, some hacking is required to get it to work. Here we will explain how to set up DNS-over-HTTPS provided from the .onion-based resolver, but for all other scenarios head to our <a href="http://developers.cloudflare.com/1.1.1.1/fun-stuff/dns-over-tor/">developers page</a> to get the details of how to use the .onion-based resolver.</p>
    <div>
      <h4>Remember cloudflared?</h4>
      <a href="#remember-cloudflared">
        
      </a>
    </div>
    <p>Here is how you can set up <code>cloudflared</code> to start a DNS client that uses DNS over HTTPS, routed through the Tor network:</p><ol><li><p>First, start with downloading <code>cloudflared</code> by following the regular guide for <a href="https://developers.cloudflare.com/1.1.1.1/dns-over-https/cloudflared-proxy/">Running a DNS over HTTPS Client</a>.</p></li><li><p>Start a Tor SOCKS proxy and use <code>socat</code> to forward port TCP:443 to localhost:</p>
            <pre><code> socat TCP4-LISTEN:443,reuseaddr,fork SOCKS4A:127.0.0.1:dns4torpnlfs2ifuz2s2yf3fc7rdmsbhm6rw75euj35pac6ap25zgqad.onion:443,socksport=9150</code></pre>
            </li><li><p>Instruct your machine to treat the .onion address as localhost:</p>
            <pre><code> cat &lt;&lt; EOF &gt;&gt; /etc/hosts
 127.0.0.1 dns4torpnlfs2ifuz2s2yf3fc7rdmsbhm6rw75euj35pac6ap25zgqad.onion
 EOF</code></pre>
            </li><li><p>Finally, start a local DNS over UDP daemon:</p>
            <pre><code> cloudflared proxy-dns --upstream "https://dns4torpnlfs2ifuz2s2yf3fc7rdmsbhm6rw75euj35pac6ap25zgqad.onion/dns-query"
 INFO[0000] Adding DNS upstream                           url="https://dns4torpnlfs2ifuz2s2yf3fc7rdmsbhm6rw75euj35pac6ap25zgqad.onion/dns-query"
 INFO[0000] Starting DNS over HTTPS proxy server          addr="dns://localhost:53"
 INFO[0000] Starting metrics server                       addr="127.0.0.1:35659"</code></pre>
            </li><li><p>Profit!</p></li></ol> ]]></content:encoded>
            <category><![CDATA[1.1.1.1]]></category>
            <category><![CDATA[Tor]]></category>
            <category><![CDATA[Privacy]]></category>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[Resolver]]></category>
            <category><![CDATA[Cryptography]]></category>
            <guid isPermaLink="false">5IWsSpqyKELgaGEVhkAhxx</guid>
            <dc:creator>Mahrud Sayrafi</dc:creator>
        </item>
        <item>
            <title><![CDATA[Today we mitigated 1.1.1.1]]></title>
            <link>https://blog.cloudflare.com/today-we-mitigated-1-1-1-1/</link>
            <pubDate>Fri, 01 Jun 2018 01:13:53 GMT</pubDate>
            <description><![CDATA[ Cloudflare is protected from attacks by the Gatebot DDoS mitigation pipeline. Gatebot performs hundreds of mitigations a day, shielding our infrastructure and our customers from L3 and L7 attacks.  ]]></description>
            <content:encoded><![CDATA[ <p>On May 31, 2018 we had a 17 minute outage on our 1.1.1.1 resolver service; this was our doing and not the result of an attack.</p><p>Cloudflare is protected from attacks by the Gatebot DDoS mitigation pipeline. Gatebot performs hundreds of mitigations a day, shielding our infrastructure and our customers from L3/L4 and L7 attacks. Here is a chart of a count of daily Gatebot actions this year:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4afmhlOoruRjYpiDVEnb6L/1c58c4fab1a06fd06f61b9bbc6a62ee5/gatebot-stats.png" />
            
            </figure><p>In the past, we have blogged about our systems:</p><ul><li><p><a href="/meet-gatebot-a-bot-that-allows-us-to-sleep/">Meet Gatebot, a bot that allows us to sleep</a></p></li></ul><p>Today, things didn't go as planned.</p>
    <div>
      <h3>Gatebot</h3>
      <a href="#gatebot">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6pW1whDtkORpQAEePgmHo/63c2705e59c6eca69a413b190604b955/gatebot-parts.png" />
            
            </figure><p>Cloudflare’s network is large, handles many different types of traffic and mitigates different types of known and not-yet-seen attacks. The Gatebot pipeline manages this complexity in three separate stages:</p><ul><li><p><i>attack detection</i> - collects live traffic measurements across the globe and detects attacks</p></li><li><p><i>reactive automation</i> - chooses appropriate mitigations</p></li><li><p><i>mitigations</i> - executes mitigation logic on the edge</p></li></ul><p>The benign-sounding "reactive automation" part is actually the most complicated stage in the pipeline. We expected that from the start, which is why we implemented this stage using a custom <a href="https://en.wikipedia.org/wiki/Functional_reactive_programming">Functional Reactive Programming (FRP)</a> framework. If you want to know more about it, see <a href="https://idea.popcount.org/2016-02-01-enigma---building-a-dos-mitigation-pipeline/">the talk</a> and <a href="https://speakerdeck.com/majek04/gatelogic-somewhat-functional-reactive-framework-in-python">the presentation</a>.</p><p>Our mitigation logic often combines multiple inputs from different internal systems, to come up with the best, most appropriate mitigation. One of the most important inputs is the metadata about our IP address allocations: we mitigate attacks hitting HTTP and DNS IP ranges differently. Our FRP framework allows us to express this in clear and readable code. For example, this is part of the code responsible for performing DNS attack mitigation:</p>
            <pre><code>def action_gk_dns(...):

    [...]

    if port != 53:
        return None

    if whitelisted_ip.get(ip):
        return None

    if ip not in ANYCAST_IPS:
        return None
        [...] </code></pre>
            <p>It's the last check in this code that we tried to improve today.</p><p>Clearly, the code above is a huge oversimplification of all that goes into attack mitigation, but making an early decision about whether the attacked IP serves DNS traffic or not is important. It's that check that went wrong today. If the IP does serve DNS traffic then attack mitigation is handled differently from IPs that never serve DNS.</p>
    <div>
      <h3>Cloudflare is growing, so must Gatebot</h3>
      <a href="#cloudflare-is-growing-so-must-gatebot">
        
      </a>
    </div>
    <p>Gatebot was created in early 2015. Three years may not sound like much time, but since then we've grown dramatically and added layers of services to our software stack. Many of the internal integration points that we rely on today didn't exist then.</p><p>One of them is what we call the <i>Provision API</i>. When Gatebot sees an IP address, it needs to be able to figure out whether or not it’s one of Cloudflare’s addresses. <i>Provision API</i> is a simple RESTful API used to provide this kind of information.</p><p>This is a relatively new API, and prior to its existence, Gatebot had to figure out which IP addresses were Cloudflare addresses by reading a list of networks from a hard-coded file. In the code snippet above, the <i>ANYCAST_IPS</i> variable is populated using this file.</p>
    <div>
      <h3>Things went wrong</h3>
      <a href="#things-went-wrong">
        
      </a>
    </div>
    <p>Today, in an effort to reclaim some technical debt, we deployed new code that introduced Gatebot to <i>Provision API</i>.</p><p>What we did not account for, and what <i>Provision API</i> didn’t know about, was that <a href="/dns-resolver-1-1-1-1/">1.1.1.0/24 and 1.0.0.0/24</a> are special IP ranges. Frankly speaking, almost every IP range is "special" for one reason or another, since our IP configuration is rather complex. But our recursive DNS resolver ranges are even more special: they are relatively new, and we're using them in a very unique way. Our hardcoded list of Cloudflare addresses contained a manual exception specifically for these ranges.</p><p>As you might be able to guess by now, we didn't implement this manual exception while we were doing the integration work. Remember, the whole idea of the fix was to remove the hardcoded gotchas!</p>
    <div>
      <h3>Impact</h3>
      <a href="#impact">
        
      </a>
    </div>
    <p>The effect was that, after pushing the new code release, our systems interpreted the resolver traffic as an attack. The automatic systems deployed DNS mitigations for our DNS resolver IP ranges for 17 minutes, between 17:58 and 18:13 May 31st UTC. This caused 1.1.1.1 DNS resolver to be globally inaccessible.</p>
    <div>
      <h3>Lessons Learned</h3>
      <a href="#lessons-learned">
        
      </a>
    </div>
    <p>While Gatebot, the DDoS mitigation system, has great power, we failed to test the changes thoroughly. We are using today’s incident to improve our internal systems.</p><p>Our team is incredibly proud of 1.1.1.1 and Gatebot, but today we fell short. We want to apologize to all of our customers. We will use today’s incident to improve. The next time we mitigate 1.1.1.1 traffic, we will make sure there is a legitimate attack hitting us.</p> ]]></content:encoded>
            <category><![CDATA[Reliability]]></category>
            <category><![CDATA[Post Mortem]]></category>
            <category><![CDATA[Mitigation]]></category>
            <category><![CDATA[1.1.1.1]]></category>
            <category><![CDATA[DNS]]></category>
            <category><![CDATA[Resolver]]></category>
            <category><![CDATA[Gatebot]]></category>
            <guid isPermaLink="false">6ZUfF0dLtSHFE2WWfwpgLJ</guid>
            <dc:creator>Marek Majkowski</dc:creator>
        </item>
    </channel>
</rss>