<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8">
</head>
<body>
<div style="font-family:sans-serif"><div style="white-space:normal">
<p dir="auto">Hello Shane & assembled -<br>
Sorry if I’m a bit late to send edits/additions. I suspect these comments have missed the deadline, but I’ll publish these comments for any other updates or revisions that may happen in the future:</p>
<p dir="auto">NTAs:<br>
We’ve considered that NTAs should fall into a transparency category. If NTAs are present in the resolver, they should be published, with reasons for insertion, dates of activation and expected removal dates, or at least have a published review date or cycle for when NTAs should be actively examined for deletion. (We’re working on automating this for Quad9, but it’s not yet available.) NTAs are equivalent to a security fault, and may even be more significant than a block event as they remove expected trust behavior with limited signal of that trust downgrade. (“limited” because few if any clients care about those response bits changing.)</p>
<p dir="auto">Cache clearing:<br>
Large recursive operations may have a cache clearing function, with controls to prevent abuse (email confirmation/keys per-event?) Specific record types and FQDNs should be supported, and “ANY” records should not be supported. Care should be taken to randomize cache clear delays so they cannot be trivially used for spoof assistance by attackers. This may be done via automated web interface (ideally) or via support ticket.</p>
<p dir="auto">NSID/id.server:<br>
Large arrays, especially publicly available resolvers, should support an in-band method of discovery that is obvious to permit users to discover what node has answered their query. This improves troubleshooting significantly, and may be useful for research and testing purposes. NSID is ideal for this, though also “CH TXT id.server” support is also reasonable. Geographic hints should be provided in this data, though specific host data is optional for arrays of servers in clusters. IATA codes have traditionally been used for naming points-of-presence, though this is at the discretion of the operator.</p>
<p dir="auto">ANY queries:<br>
Public or large-scale resolvers should be exceptionally careful with queries of type “ANY”. Strict limits should be enforced on volumes of such queries to prevent amplification abuse, or truncation should be applied to prevent spoofed redirections.</p>
<p dir="auto">JT</p>
<p dir="auto">On 18 Feb 2024, at 17:21, Shane Kerr wrote:</p>
<blockquote style="border-left:2px solid #777; color:#777; margin:0 0 5px; padding-left:5px">
<p dir="auto">Fellow Task Force members,</p>
<p dir="auto">We had a Zoom session last week, and discussed all the feedback on the document.</p>
<p dir="auto">I made a bunch of edits (listed below) and think the document is basically ready to be send to the RIPE NCC for editing and/or to Mirjam for review. Please have a look and let me know what you think!</p>
<p dir="auto">One minor outstanding thing is that Andronikos said that he would track down a reference about BIND connection tracking recommendations, which I think is this:</p>
<p dir="auto"><a href="https://kb.isc.org/docs/aa-01183" style="color:#777">https://kb.isc.org/docs/aa-01183</a></p>
<p dir="auto">But I cannot remember in what context this was, or where we wanted to put it in the document. Please help clue me in!</p>
<p dir="auto">Anyway, I made the following edits based on our conversation:</p>
<ul>
<li>
<p dir="auto">Added a section explaining that this document does not use RFC 2119<br>
language.</p>
</li>
<li>
<p dir="auto">Reduced the strength of recommendation for aggressive NSEC caching<br>
from "should" to "may".</p>
</li>
<li>
<p dir="auto">Reduced the strength of recommendation for interoperable DNS cookies<br>
from "should" to "may".</p>
</li>
<li>
<p dir="auto">Changed recommendation to disclose the list of blocked websites and<br>
services to recognize that it is not always possible.</p>
</li>
<li>
<p dir="auto">Added recommendation to disclose the source of block lists when<br>
possible.</p>
</li>
<li>
<p dir="auto">Reworked RPZ section to be a generic block list section, although<br>
RPZ is mentioned as a specific technology for distributing such<br>
lists.</p>
</li>
<li>
<p dir="auto">Added recommendation to include DNS Extended Error codes for blocked<br>
traffic.</p>
</li>
<li>
<p dir="auto">Replaced the section on anycasting with David Knight's text, which<br>
covers high availability in general and anycasting as a single case<br>
within that.</p>
</li>
<li>
<p dir="auto">ZONEMD is now in production, so the section mentioning that it is<br>
being deployed was updated.</p>
</li>
<li>
<p dir="auto">Noted that privacy policies should mention the sampling rate of DNS<br>
queries/responses kept.</p>
</li>
<li>
<p dir="auto">Moved the ad policy out of logging considerations.</p>
</li>
<li>
<p dir="auto">Removed the phrase "this is usually enabled by default" describing<br>
DNSSEC validation, to avoid the chance that resolver operators may<br>
mistakenly overlook this if it is not enabled.</p>
</li>
<li>
<p dir="auto">De-emphasized ALL DNS resolver operators.</p>
</li>
<li>
<p dir="auto">Changed recommendation from all of DoT+DoH+DoQ to one of them.</p>
</li>
<li>
<p dir="auto">Removed some stray text.</p>
</li>
<li>
<p dir="auto">Removed suggestions that a lower maximum TTL may reduce cache size<br>
or save memory.</p>
</li>
<li>
<p dir="auto">Increased the strength of the recommendation for trust anchor<br>
reporting from "may" to "should".</p>
</li>
</ul>
<p dir="auto">Thank you all for your efforts here. We're almost ready for champagne!</p>
<p dir="auto">Cheers,</p>
<p dir="auto">--<br>
Shane</p>
<h2 style="font-size:1.2em">DNS Resolver Recommendations</h2>
<p dir="auto">About the DNS Resolver Best Common Practice Task Force</p>
<p dir="auto"><a href="https://www.ripe.net/participate/ripe/tf/dns-resolver-best-common-practice-task-force" style="color:#777">https://www.ripe.net/participate/ripe/tf/dns-resolver-best-common-practice-task-force</a></p>
<h2 style="font-size:1.2em">Terminology</h2>
<ul>
<li>
<p dir="auto">Open Resolver: A DNS resolver that accepts queries from any client.<br>
Often the result of misconfiguration.</p>
</li>
<li>
<p dir="auto">Public Resolver: A resolver intentionally configured to be an open<br>
resolver.</p>
</li>
</ul>
<h2 style="font-size:1.2em">Introduction</h2>
<h3 style="font-size:1.1em">What Is This Document? Who Is It For?</h3>
<p dir="auto">This document presents recommendations and best current practices for<br>
operating DNS resolvers, both public and non-public ones. It covers<br>
technical aspects of operations and provides best practice<br>
recommendations for data management, with a particular focus on user<br>
privacy, security, and resilience.</p>
<p dir="auto">The document serves as guidance for the wider Internet community,<br>
offering input to:</p>
<ul>
<li>Those running public DNS resolver services, and</li>
<li>Those who want to make informed choices between such services.</li>
</ul>
<p dir="auto">Its purpose is to provide clear guidance and promote effective<br>
practices in DNS resolver operation.</p>
<p dir="auto">The intended audience is not the entire DNS community. Advice here is<br>
probably not useful for operators of authoritative servers, domain<br>
registrars, and so on. It is also not meant to be an introductory or<br>
educational document. There are many documents which cover the basics<br>
of DNS and the roles of organizations in it; a good overview is:</p>
<p dir="auto">Addressing the challenges of modern DNS - a comprehensive tutorial<br>
by van der Toorn et al.</p>
<p dir="auto"><a href="https://ris.utwente.nl/ws/files/282427879/1_s2.0_S1574013722000132_main.pdf" style="color:#777">https://ris.utwente.nl/ws/files/282427879/1_s2.0_S1574013722000132_main.pdf</a></p>
<p dir="auto">The document does not consider how to measure adherence to these<br>
recommendations. So it is not intended to be used for certification,<br>
although certification created based on the principles here is<br>
possible.</p>
<h3 style="font-size:1.1em">How Is This Document Organized?</h3>
<p dir="auto">This document has a number of sections, and specific recommendations<br>
in each section. The intent is for each recommendations to have clear<br>
guidance at the top, and then background and discussion related to the<br>
recommendation afterwards. Each recommendation indicates whether it is<br>
mostly for operators of public resolvers or for operators of any<br>
resolver.</p>
<h3 style="font-size:1.1em">About Recomendation Text</h3>
<p dir="auto">This is not a standards document, and does not propose any way to<br>
measure compliance or interoperability. It does use words like<br>
"should" or "may be" throughout. These are meant to be interpreted in<br>
the usual English sense, and not as IETF-style RFC 2119 jargon.</p>
<h2 style="font-size:1.2em">System and Network Hardening</h2>
<h3 style="font-size:1.1em">Infrastructure considerations</h3>
<p dir="auto">Running any Internet service requires attention to the infrastructure<br>
used to operate it. This section discusses various approaches that can<br>
be used to run a DNS resolver. Everything applies to both public and<br>
non-public DNS resolvers.</p>
<h4>Bare metal or public cloud</h4>
<p dir="auto">All DNS resolver software can run either on dedicated servers (rented<br>
or colocated), or in virtualized clouds, or in a combination of those.<br>
Every approach has pros and cons. Most of these are not specific to<br>
running DNS resolvers, however, some of them are.</p>
<p dir="auto"><strong>Running DNS resolver instances as OS level daemons on bare metal<br>
hosts:</strong></p>
<p dir="auto">Pros:</p>
<ul>
<li>
<p dir="auto">Performance: Bare metal servers have direct access to the<br>
underlying hardware, and can offer superior performance/cost<br>
balance by avoiding the overhead associated with virtualization.<br>
Moreover, you have full control over the server's configurations,<br>
down to the hardware level, which can be beneficial for<br>
performance and cost optimization once you get the understanding<br>
of your typical work load during peak hours.</p>
</li>
<li>
<p dir="auto">Data Security: Since you are in control of the physical servers,<br>
there is no risk of data leakage that can occur due to<br>
vulnerabilities in multi-tenant virtualization platforms,<br>
including CPU cache-based side-channel vulnerabilities. It could<br>
be argued that attacks targeting such issues are rare, and their<br>
impact on a DNS resolver service is low, but potential breaches<br>
may have significant privacy impact. It is advised to evaluate<br>
this against your organisation's risk model, or to discuss this<br>
with your information security compliance experts.</p>
</li>
<li>
<p dir="auto">Predictability: Because there is no virtualization layer and no<br>
"noisy neighbours" on the host, the performance of your servers is<br>
more predictable.</p>
</li>
</ul>
<p dir="auto">Cons:</p>
<ul>
<li>
<p dir="auto">Cost of failure: If you pick hardware configuration that is not<br>
optimal for the workload of your DNS resolver, you may need to<br>
upgrade and replace hardware components afterwards. Ways to reduce<br>
this risk include renting servers instead of buying them, carrying<br>
load testing with data similar to production workloads, and<br>
providing limited beta access to the service before it fully<br>
enters the production phase.</p>
</li>
<li>
<p dir="auto">Scalability: Scaling up with physical servers means acquiring or<br>
renting, installing, and configuring new hardware, which will take<br>
more time than provisioning new virtual servers in a cloud<br>
environment. Moreover, most cloud environments will provide you<br>
with cluster autoscaling features, which could barely be achieved<br>
in bare metal.</p>
</li>
<li>
<p dir="auto">Maintenance: You will be responsible for all server maintenance<br>
tasks, including hardware issues, which can require significant<br>
effort and specific expertise.</p>
</li>
<li>
<p dir="auto">Redundancy: Setting up high availability and disaster recovery<br>
strategies can be more complex and time consuming compared to the<br>
cloud, where these features are often provided as value added<br>
products. See the Redundancy section for more details.</p>
</li>
</ul>
<p dir="auto"><strong>Running DNS resolver instances in containers in a public cloud:</strong></p>
<p dir="auto">Pros:</p>
<ul>
<li>
<p dir="auto">Scalability: Clouds excel at scaling applications. You can scale<br>
up and down rapidly based on load, which is important for a DNS<br>
resolver that needs to handle variable query loads. In case of<br>
regional or geographically distributed resolvers, in every region<br>
where the resolver would be deployed, daily periodicity is likely<br>
to be observed, for example peak hour is likely to occur around<br>
19:00 local time, and off-peak hours may begin at around<br>
01:00-03:00. In a situation like that, using cluster autoscaling<br>
features and tools, you can run less instances in the night and<br>
more instances throughout the day, which may help to optimize your<br>
cloud hosting costs.</p>
</li>
<li>
<p dir="auto">Fault Tolerance and High Availability: Most clouds have built-in<br>
strategies, features, and products for handling node failures,<br>
which can increase your service's availability.</p>
</li>
<li>
<p dir="auto">Deployment and Management: Cloud providers offer built-in methods<br>
to deploy and manage applications, which can simplify operations<br>
and reduce the likelihood of human errors if your infrastructure<br>
management department is already familiar with these tools.</p>
</li>
<li>
<p dir="auto">Cost: While this largely depends on your specific usage, cloud<br>
services can sometimes be more cost-effective than managing your<br>
own physical servers, especially when you consider the total cost<br>
of ownership, including power, cooling, and maintenance.</p>
</li>
</ul>
<p dir="auto">Cons:</p>
<ul>
<li>
<p dir="auto">Performance: The virtualization layer of public clouds can impact<br>
performance. While this certainly could be mitigated through<br>
scaling the number of virtual hosts, the cost would also increase<br>
accordingly.</p>
</li>
<li>
<p dir="auto">Complexity: Advanced cloud technologies are complex systems which<br>
come with a steep learning curve. Without prior experience,<br>
properly configuring and managing a cloud-based compute cluster<br>
can be challenging.</p>
</li>
<li>
<p dir="auto">Cost Variability: While the cloud can be cheaper, it can also be<br>
more expensive if not properly managed. Costs can rise<br>
unexpectedly based on traffic. Make sure to always set some limits<br>
on how much may be spent on hosting in the cloud control panel,<br>
and to set up notifications to be sent to you when these<br>
thresholds are about to be triggered.</p>
</li>
<li>
<p dir="auto">Multi-tenancy Risks: In a public cloud environment, the "noisy<br>
neighbour" problem could potentially affect your service's<br>
performance. Additionally, even though cloud providers take steps<br>
to isolate tenant environments, vulnerabilities could potentially<br>
expose sensitive data (see the previous section for a detailed<br>
explanation).</p>
</li>
</ul>
<p dir="auto"><strong>Additional considerations</strong></p>
<ul>
<li>
<p dir="auto">In today's environments, Kubernetes and Terraform are sometimes<br>
used as a substitute for cloud APIs when it comes to production<br>
services' management. When running a DNS resolver in a Kubernetes<br>
cluster on top of a public cloud environment, all the pros and<br>
cons of the public cloud apply; basically, Kubernetes becomes your<br>
public cloud provider. If you have significant prior experience<br>
running services in Kubernetes in production, you may successfully<br>
replicate your experience with the DNS resolver software.<br>
Otherwise, we would advise against Kubernetes in this case.</p>
</li>
<li>
<p dir="auto">The only reason we may find to run a DNS resolver in a Kubernetes<br>
cluster on top of self-hosted dedicated servers is when you have<br>
significant hands-on experience with Kubernetes and it is natural<br>
for you to manage applications this way. Otherwise, running DNS<br>
resolver daemons in containers brings little, if any, benefit.<br>
Autoscaling features are not available to you in this case, and<br>
neither horizontal nor vertical pod autoscaling is of any use,<br>
because DNS resolver software typically scales in-host by itself<br>
just fine.</p>
</li>
<li>
<p dir="auto">When designing a cluster of resolvers for autoscaling, keep in<br>
mind that newly spawned resolver machines would need to populate<br>
resolver cache first before they are fully useful. Your DNS<br>
resolver software may provide cache replication mechanisms.<br>
Otherwise, it is safe to overprovision clusters somewhat under<br>
heavy load, and discarding excessive instances once all the caches<br>
are populated and the average load of a compute instance<br>
decreases. In addition, it may be worthwhile to consider sharing<br>
cache data between instances.</p>
</li>
<li>
<p dir="auto">It is always advised to prefer environments your infrastructure<br>
management team is familiar with.</p>
</li>
</ul>
<h3 style="font-size:1.1em">Software considerations</h3>
<h4>Open Source</h4>
<p dir="auto"><strong>Recommendation</strong>: Choose any well-maintained DNS software you are<br>
comfortable using. Regardless of which software you choose, ensure you<br>
have somewhere to go for support. In the case of open source software,<br>
consider providing financial support to ensure continued development.<br>
Some open source maintainers take donations, while others offer<br>
support contracts.</p>
<p dir="auto">There are both open source and proprietary implementations of DNS<br>
resolver software. Mixing these is also possible, for example, by<br>
using proprietary extensions with open source software or deploying<br>
open source software modified in-house.</p>
<p dir="auto">General observations:</p>
<ul>
<li>Software licensing is orthogonal to software security. Neither is<br>
proprietary software less secure on principle nor are<br>
contributions by "unknown" developers more of a risk in open<br>
source.</li>
</ul>
<p dir="auto">Benefits of open source:</p>
<ul>
<li>Open source allows for inspection, independent auditing, and</li>
</ul>
<p dir="auto">troubleshooting.</p>
<ul>
<li>Open source can avoid vendor lock-in.</li>
<li>Open source can aid internet standards development.<br>
Widely-deployed open source implementations allow proponents of<br>
standards drafts to contribute proof of concept implementations<br>
without permission or cooperation of vendors.</li>
</ul>
<p dir="auto">Drawbacks of open source</p>
<ul>
<li>Both open source and proprietary software require skilled<br>
maintenance, which has costs. Proprietary licensed software or<br>
appliances typically come with license fees to cover these. In<br>
contrast, open source licenses decouple usage by operators from<br>
monetary compensation to developers. It is up to operators to<br>
consider the financial sustainability of continued maintenance of<br>
the open source DNS software they depend upon.</li>
</ul>
<p dir="auto">Please also consider deploying different software implementations to<br>
ensure diversity, as discussed in the diversity section below.</p>
<h3 style="font-size:1.1em">Networking considerations</h3>
<h4>IPv4 and IPv6</h4>
<p dir="auto"><strong>If available, both IPv4 and IPv6 must be deployed.</strong></p>
<p dir="auto">Large parts of the authoritative DNS are only accessible via IPv4, so<br>
the resolver must be able to originate IPv4 queries. Authoritative DNS<br>
that is only accessible via IPv6 is very rare.</p>
<p dir="auto">Depending on the connectivity of clients, a resolver may be IPv4-only,<br>
IPv6-only, or support IPv4 and IPv6.</p>
<h4>Addressing</h4>
<p dir="auto"><strong>Using multiple IP addresses for the service address should be<br>
considered.</strong></p>
<p dir="auto">Using 2 or more IPv4 addresses and 2 or more IPv6 addresses from<br>
different RIR will allow resilience in failure at an RIR, either<br>
governance, security, or technical. Note that support for multiple<br>
addresses for recursive resolvers varies and some clients perform<br>
poorly if any address does not respond normally.</p>
<p dir="auto">There is no need to pick an IPv4 address with all octets the same,<br>
like 2.2.2.2 or 11.11.11.11.</p>
<p dir="auto"><strong>Publishing a list of back-end addresses used for resolving should be<br>
considered.</strong></p>
<p dir="auto">Publishing a list of back-end addresses used for resolving can be<br>
useful for other network & DNS operators (for example, geo-IP<br>
location, making sure data is getting to correct places, and so on).</p>
<h4>High Availability</h4>
<p dir="auto">This can be considered in terms of local and global scope.</p>
<h5>Local scope</h5>
<p dir="auto">Inside a single location/region, such as an office, campus, or small<br>
ISP network, the main availability concern is that a resolver is<br>
always reachable. Client systems can be configured with multiple<br>
resolver addresses, but the failover behaviour of stub resolvers to a<br>
second address can be painful. Ideally the primary address is highly<br>
available and such fallback rarely required. How much effort is put<br>
into ensuring this is true should probably scale in line with the<br>
number of users, or sensitivity of the clients using that resolver to<br>
delayed resolution.</p>
<p dir="auto">There are several ways to promote high availability of an individual<br>
resolver address, such as dedicated load balancing equipment, or<br>
network techniques like VRRP, or IP anycast. These generally have in<br>
common a pool of recursive servers and the means to direct queries to<br>
them when a health check has determined them to be capable of<br>
answering those queries.</p>
<p dir="auto">Dedicated free or commercially produced, hardware or software load<br>
balancing solutions are available. These typically own the resolver IP<br>
address and forward queries to the currently available instances of a<br>
pool of recursive servers.</p>
<p dir="auto">VRRP enables a technique to make the resolver IP address available on<br>
multiple servers, often used to provide automatic failover between<br>
two. A pool of recursive servers using this technique must reside in<br>
the same broadcast domain.</p>
<p dir="auto">IP anycast in the local scope typically involves a pool of recursive<br>
servers advertising a route to a shared resolver IP address into a<br>
routing protocol. This can be configured in failover or load-sharing<br>
configurations. A load sharing configuration typically requires<br>
network equipment able to balance traffic to a destination over equal<br>
cost paths (ECMP). A pool of recursive servers using this technique<br>
can be distributed in different parts of the network.</p>
<h5>Global scope</h5>
<p dir="auto">The same concerns as for local service availability are present in the<br>
global scope, with the added issue that DNS resolution over long<br>
distances may be slow. Practically speaking, only multiple resolver<br>
addresses, or IP anycast are useful strategies here. The motivations<br>
for finding better failover solutions than multiple resolver addresses<br>
have been covered above.</p>
<p dir="auto">IP anycast in the global scope means routing the same IP prefix to<br>
more than one location. This can provide effective solutions for<br>
failover and, when optimally configured for routing client queries to<br>
the topologically least distant recursive server location. IP anycast<br>
in the global scope requires the use of globally routable prefixes. If<br>
a separate prefix is to be used for anycasting, usually this means a<br>
/24 in IPv4 and a /48 in IPv6, as those are the smallest sizes that<br>
will be widely propagated in BGP. A common practice is to use a<br>
covering prefix (/23 in IPv4 or /47 in IPv6) for fallback, and a<br>
more-specific prefix (/24 or /48) for the traffic. The more-specific<br>
prefix can then be withdrawn to send traffic to a backup site; this<br>
will happen automatically if the site is disconnected from routing.</p>
<p dir="auto"><a href="https://www.rfc-editor.org/rfc/rfc7094.html" style="color:#777">RFC7094</a> discusses<br>
anycast architecture in detail, including references to various other<br>
RFC which discuss anycast in general and to DNS in particular.</p>
<p dir="auto"><a href="https://datatracker.ietf.org/doc/html/rfc4786" style="color:#777">RFC4786</a> discuses<br>
operation of anycast services.</p>
<h5>Generally</h5>
<p dir="auto">Operators of a globally scoped recursive service are encouraged to<br>
also adopt the local scope recommendations in each of the locations<br>
where the service is provisioned.</p>
<p dir="auto">Though the above deals with the shortcomings of reliance on stub<br>
resolver failover between a list of addresses those recommendations<br>
shouldn’t be seen as an exclusive alternative. Multiple resolver<br>
addresses, where each is provisioned using differing failover<br>
strategies, can provide a resolver of last resort and further improved<br>
resilience.</p>
<h4>Ingress Filtering</h4>
<p dir="auto"><strong>Ingress Filtering to follow BCP 38 should be deployed.</strong></p>
<p dir="auto">DNS normally uses UDP traffic, which makes it a common vector of both<br>
<a href="https://en.wikipedia.org/wiki/Reflection_attack" style="color:#777">reflection</a> and<br>
<a href="https://www.cisa.gov/news-events/alerts/2014/01/17/udp-based-amplification-attacks" style="color:#777">amplification</a><br>
attacks. To minimize the amount of spoofed traffic that a resolver<br>
responds to, the network should be configured as recommended in<br>
<a href="https://www.rfc-editor.org/rfc/rfc2827.html" style="color:#777">BCP 38</a>.</p>
<h4>RPKI Sign Advertised Routes</h4>
<p dir="auto"><strong>Route Advertisements should be signed using RPKI</strong></p>
<p dir="auto">Using RPKI to sign any route advertisements - either toward<br>
authoritative servers or toward DNS clients - is straightforward to do<br>
and will reduce the impact of BGP misconfigurations and some BGP<br>
hijacking attempts.</p>
<p dir="auto">RPKI validation is also possible, although the effort is greater. It<br>
is possible that the hosting provider or the transit provider for your<br>
service validates BGP; asking and making this part of your selection<br>
criteria is reasonable.</p>
<h4>(D)DoS measures</h4>
<p dir="auto">Denial-of-Service (DoS) attacks, both distributed (DDoS) and not are a<br>
threat to any Internet service. Network operators for a service<br>
providing any DNS service must be prepared for large amounts of attack<br>
traffic.</p>
<p dir="auto">In addition to attacks on the service itself, a resolver may be used<br>
both as an attack reflector and as an attack amplifier.</p>
<p dir="auto">Active monitoring of network and service usage, careful logging, and a<br>
security team that is able to respond to problem reports is necessary.<br>
Mitigation techniques will include filtering or rate-limiting traffic,<br>
both on the authoritative and client side of the resolver.</p>
<h3 style="font-size:1.1em">Capacity planning</h3>
<h4>Server capacity</h4>
<p dir="auto">If using a model that is easy to scale (cloud based, or Kubernetes<br>
based, or similar), then getting server capacity correct is largely a<br>
question of budgeting. If using a less-flexible model (bare metal for<br>
example), then under-estimating will mean problems delivering service.</p>
<p dir="auto">Hardware performance varies widely, as does operating system and<br>
resolver performance. Some lab testing will be necessary to estimate<br>
the number of systems needed.</p>
<h4>Network capacity</h4>
<p dir="auto">Since DNS is mostly UDP-based, it is often easy to generate large<br>
amounts of spoofed traffic to and from DNS servers. DNS traffic is<br>
small compared to application traffic (videos and other content), but<br>
still significant. Authoritative server operators often build their<br>
networks and servers to handle 10 times their normal load. Recursive<br>
server operators may need to do the same, although the service only<br>
accepts traffic from IP addresses that cannot be spoofed (for example<br>
users within a network that operated by the same company) then this<br>
can be reduced, for example to 3 times normal load. To estimate<br>
expected load, the best approach is to examine historical usage for<br>
the actual expected users of the system.</p>
<h3 style="font-size:1.1em">Resilience</h3>
<h4>System Diversity</h4>
<p dir="auto">In addition to the software considerations above, operators should<br>
consider whether to use different server implementations to provide<br>
service. This allows continued operation if a critical vulnerability<br>
is found in one implementation, by shifting traffic to other<br>
implementations.</p>
<p dir="auto">Placing resolvers and control systems in different physical locations<br>
will allow continued operation in the event of a disaster or other<br>
problem that impacts a single location. In addition, ensuring diverse<br>
connectivity to other networks will prevent single points of failure<br>
on the network side. Ensuring network diversity may take some care, as<br>
it is not always obvious what fate is shared between any given path;<br>
this may be physical, virtual, or organizational, and my sometimes be<br>
hidden.</p>
<h4>Security</h4>
<p dir="auto">In addition to the DNS-specific security considerations, normal<br>
security best practices for any Internet service should be followed,<br>
including updating software updated regularly, patching software as<br>
soon as possible for any known security vulnerabilities, following<br>
CERT announcements and so on.</p>
<h4>Certification</h4>
<p dir="auto">It may be useful or required for an organization to follow specific<br>
certifications, such as ISO or ITIL. These can be government-defined<br>
or industry-defined. For end users there is typically not much direct<br>
value, but business customers will often look for services that are<br>
operated by organizations meeting such standards.</p>
<h2 style="font-size:1.2em">DNS configuration knobs</h2>
<p dir="auto">The DNS is an old protocol that has a lot of settings that can be<br>
tweaked. This section reviews these and provides recommendations on<br>
which should be used for a resolver.</p>
<h3 style="font-size:1.1em">DNSSEC validation</h3>
<p dir="auto"><strong>DNSSEC validation should be enabled.</strong></p>
<p dir="auto">For: All DNS resolver operators.</p>
<p dir="auto">DNSSEC validation is the best way to ensure that the answers from the<br>
owner of domain name being queried are returned.</p>
<p dir="auto">The root KSK must be updated when it changes. While<br>
<a href="https://www.rfc-editor.org/rfc/rfc5011.html" style="color:#777">RFC5011</a> defines an<br>
automated way to do this, a resolver operator will probably either<br>
manage this trust anchor directly or have it updated via OS updates.</p>
<p dir="auto"><a href="https://www.rfc-editor.org/rfc/rfc9364.html" style="color:#777">RFC9364</a> provides a lot<br>
of useful information, and links to further documents about DNSSEC.<br>
However, operators usually do not need to know the details, and can<br>
simply ensure that DNSSEC validation is enabled in their software.</p>
<p dir="auto">Resolver software that does not support DNSSEC validation should be<br>
avoided.</p>
<h3 style="font-size:1.1em">DNS Transport Protocols</h3>
<p dir="auto"><strong>UDP and TCP must be supported.</strong></p>
<p dir="auto">For: All DNS resolver operators.</p>
<p dir="auto">UDP is what most clients use, and TCP is necessary for DNS answers<br>
that are too large for a single UDP packet.</p>
<p dir="auto"><a href="https://www.rfc-editor.org/rfc/rfc7766.html" style="color:#777">RFC7766</a> explains why<br>
TCP is necessary in more detail.</p>
<h3 style="font-size:1.1em">Packet Fragmentation Avoidance</h3>
<p dir="auto"><strong>Servers should be configured to avoid fragmentation.</strong></p>
<p dir="auto">For: ALL DNS resolver operators.</p>
<p dir="auto">Packet fragmentation can cause issues with DNS over UDP, especially<br>
over IPv6. These issues can be minimized by choosing implementations<br>
that set IP options to avoid this, and by taking care with EDNS0<br>
message sizes.</p>
<p dir="auto">Recommendations are available in<br>
<a href="https://datatracker.ietf.org/doc/draft-ietf-dnsop-avoid-fragmentation/" style="color:#777">draft-ietf-dnsop-avoid-fragmentation</a>.</p>
<h3 style="font-size:1.1em">Encrypted DNS</h3>
<p dir="auto"><strong>At least one of DNS-over-TLS (DoT), DNS-over-HTTPS (DoH), and<br>
DNS-over-QUIC (DoQ) should be supported.</strong></p>
<p dir="auto">For: All DNS resolver operators.</p>
<p dir="auto">DoT, DoH, and DoQ are different technologies that all provide an<br>
encrypted channel between the resolver and the authoritative server.<br>
DoT is the oldest, and provides encrypted DNS using TLS. DoH uses HTTP<br>
over TLS as a way to transmit queries and answers, and is widely<br>
supported by web browsers. DoQ is the newest, and provides advanced<br>
features such as separate streams for each query, avoiding the "head<br>
of line" blocking problem common with all protocols layered on top of<br>
TCP (such as DoT and DoH).</p>
<ul>
<li>DoT
<ul>
<li><a href="https://www.rfc-editor.org/rfc/rfc7858.html" style="color:#777">RFC7858</a></li>
</ul>
</li>
<li>DoH
<ul>
<li><a href="https://www.rfc-editor.org/rfc/rfc8484.html" style="color:#777">RFC8484</a></li>
</ul>
</li>
<li>DoQ
<ul>
<li><a href="https://www.rfc-editor.org/rfc/rfc9250.html" style="color:#777">RFC9250</a></li>
</ul>
</li>
</ul>
<p dir="auto"><strong>Discovery of DNS Designated Resolvers</strong></p>
<p dir="auto">There are new mechanisms that allow DNS clients to use DNS records to<br>
discover encrypted DNS configurations. Resolvers should publish DNS<br>
records to assist clients finding encrypted resolvers.</p>
<ul>
<li>Discovery of Designated Resolvers
<ul>
<li><a href="https://www.rfc-editor.org/rfc/rfc9462.html" style="color:#777">RFC9462</a></li>
</ul>
</li>
</ul>
<p dir="auto">QUESTION: Do we need to publish certificate in other ways that via the<br>
DDR mechanisms?</p>
<h3 style="font-size:1.1em">QNAME Minimization</h3>
<p dir="auto"><strong>QNAME minimization should be enabled.</strong></p>
<p dir="auto">For: All DNS resolver operators.</p>
<p dir="auto">Using QNAME minimization, a resolver does not send the full name that<br>
it is trying to resolver to authoritative servers higher in the DNS<br>
hierarchy. So, for example, when querying "atlas.ripe.net" the servers<br>
for ".net" would only be asked for "ripe.net". This improves privacy<br>
for the end user querying the name.</p>
<p dir="auto"><a href="https://www.rfc-editor.org/rfc/rfc7816.html" style="color:#777">RFC7816</a> covers QNAME<br>
minimization.</p>
<h3 style="font-size:1.1em">Aggressive NSEC caching</h3>
<p dir="auto"><strong>Aggressive NSEC caching may be enabled.</strong></p>
<p dir="auto">For: Public resolver operators.</p>
<p dir="auto">"Aggressive NSEC caching", meaning negative caching based on NSEC and<br>
NSEC3 values, can reduce traffic greatly. It is important to protect<br>
against random subdomain attacks.</p>
<p dir="auto">This style of caching takes advantage of the way that NSEC and NSEC3<br>
records cover a range of names in a zone. A resolver can know that a<br>
query falls within such a range without sending any further queries,<br>
by remembering the NSEC or NSEC3 redords that is has seen as answers<br>
to earlier queries.</p>
<p dir="auto">Aggressive NSEC caching is almost always a good idea. However enabling<br>
this is less important for DNS resolver operators who have a close<br>
relationship with users, since they can stop attacks by blocking users<br>
or otherwise directly dealing with the source of abusive queries.</p>
<p dir="auto"><a href="https://www.rfc-editor.org/rfc/rfc8189.html" style="color:#777">RFC8189</a> describes<br>
negative caching in detail.</p>
<h3 style="font-size:1.1em">Local Root</h3>
<p dir="auto"><strong>Local root should be used.</strong></p>
<p dir="auto">For: Public resolver operators.</p>
<p dir="auto">Running a local root has several benefits, but it is an additional<br>
component to maintain. For public resolver operators this is<br>
definitely worth the cost, but other resolver operators may choose to<br>
simply send all queries to the well-distributed root name servers.</p>
<p dir="auto"><a href="https://www.rfc-editor.org/rfc/rfc8806.html" style="color:#777">RFC8806</a> describes local<br>
root, including several example configurations.</p>
<p dir="auto">In the future it will be possible to use ZONEMD to validate the copy<br>
of the root zone obtained before using it. This is currently available<br>
for the root zone.</p>
<p dir="auto"><a href="https://www.rfc-editor.org/rfc/rfc8976.html" style="color:#777">RFC8976</a> describes ZONEMD.</p>
<h3 style="font-size:1.1em">DNS Cookies</h3>
<p dir="auto"><strong>Interoperable DNS Cookies may be supported.</strong></p>
<p dir="auto">For: Public resolver operators.</p>
<p dir="auto">DNS cookies provide some improved security over plain UDP, and are<br>
designed to be more lightweight than TCP. If more than one server is<br>
responding for a given IP address, then the Server Secret must be<br>
shared by all servers, and the answer must be constructed in a<br>
consistent manner by all server implementations.</p>
<p dir="auto">Since client-side support for DNS cookies is not very widespread, and<br>
since managing server-side secrets involves some work, the costs may<br>
outweigh the benefits for some non-public resolver operators.</p>
<p dir="auto"><a href="https://www.rfc-editor.org/rfc/rfc7873.html" style="color:#777">RFC7873</a> describes DNS<br>
cookies, and <a href="https://www.rfc-editor.org/rfc/rfc9018.html" style="color:#777">RFC9018</a><br>
standardizes shared DNS cookies.</p>
<h3 style="font-size:1.1em">TTL Recommendations</h3>
<p dir="auto"><strong>TTL limits may be adjusted.</strong></p>
<p dir="auto">For: All DNS resolver operators.</p>
<p dir="auto">Software typically defaults to a maximum stored TTL of 1 or 2 days.<br>
A lower TTL will mean removing rarely-used records that have long TTL,<br>
and should not have much operational impact from a CPU or network<br>
point of view.</p>
<p dir="auto">It is possible to set a minimum TTL in many implementations. This is a<br>
violation of the DNS protocol, although may be useful to reduce load<br>
from records with very low TTL (less than 5 seconds).</p>
<p dir="auto">Note that software may set different maximum and minimum TTL<br>
independent of the results that the resolver returns. That may have a<br>
significant impact on queries as well, but resolver operators cannot<br>
influence that.</p>
<h3 style="font-size:1.1em">TTL-based Record Pre-Fetch</h3>
<p dir="auto"><strong>TTL record pre-fetch should be enabled when available.</strong></p>
<p dir="auto">For: All DNS resolver operators.</p>
<p dir="auto">Some resolvers have the ability to look up a record before it has<br>
expired from cache, in order to refresh the value and extend the TTL.<br>
This way there is never a time when the records are missing from the<br>
cache. This is not currently standardized, but a form of this was<br>
proposed in the IETF as<br>
<a href="https://datatracker.ietf.org/doc/html/draft-wkumari-dnsop-hammer-03" style="color:#777">DNS<br>
Hammer</a>.<br>
We recommend turning this feature on if available.</p>
<h3 style="font-size:1.1em">EDNS Client Subnet (ECS)</h3>
<p dir="auto"><strong>ECS may be enabled.</strong></p>
<p dir="auto">For: All DNS resolver operators.</p>
<p dir="auto">EDNS Client Subnet (ECS) allows the resolver to include information<br>
about the IP address of the client querying it when sending messages<br>
to authoritative servers. This may allow authoritative servers to<br>
provide different answers which are more appropriate for the client.<br>
However, ECS will increase the amount of cache space required by<br>
resolvers, may reduce DNS performance, and may have privacy<br>
implications.</p>
<p dir="auto">A resolver operator that has clients that are limited to a specific<br>
region may see no benefit. A resolver operator that has a widely<br>
distributed anycast network may not have much benefit from ECS, since<br>
the locations that initiate the query will be close to the client. But<br>
a resolver operator that answers client queries only from a few<br>
locations, and expects clients to come from a wide area, may provide<br>
better service for end-users by supporting ECS.</p>
<p dir="auto">EDNS client subnet is described in<br>
<a href="https://www.rfc-editor.org/rfc/rfc7871.html" style="color:#777">RFC7871</a>, an<br>
informational RFC.</p>
<h3 style="font-size:1.1em">Extended DNS Errors</h3>
<p dir="auto"><strong>Extended DNS errors should be enabled.</strong></p>
<p dir="auto">For: All DNS resolver operators.</p>
<p dir="auto">DNS traditionally provides very broad error reporting, SERVFAIL being<br>
the most common. This makes diagnosing and fixing problems difficult.<br>
Extended DNS errors provide extra information about failures, for<br>
example expired DNSSEC signatures. They also allow resolver operators<br>
to report administrative reasons for DNS failures, such as blocks due<br>
to legal requirements.</p>
<p dir="auto"><a href="https://www.rfc-editor.org/rfc/rfc8914.html" style="color:#777">RFC8914</a> defines<br>
extended DNS errors.</p>
<h3 style="font-size:1.1em">Negative Trust Anchors</h3>
<p dir="auto"><strong>Negative trust anchors may be deployed.</strong></p>
<p dir="auto">For: All DNS resolver operators.</p>
<p dir="auto">Negative trust anchors (NTA) allow a resolver operator to handle a<br>
case where an authoritative server has a DNSSEC problem and becomes<br>
inaccessible. They basically disable DNSSEC checking for a domain.<br>
When this is warranted is difficult to know with certainty, and will<br>
usually requires some manual checking. Since DNSSEC validation is now<br>
widespread, DNSSEC failures on the authoritative side will impact many<br>
resolvers.</p>
<p dir="auto">Because of these reasons this document does not recommend NTA, but<br>
also does not recommend that a deployment avoid NTA if it makes sense<br>
for that environment.</p>
<p dir="auto">Negative trust anchors are documented in<br>
<a href="https://www.rfc-editor.org/rfc/rfc7646.html" style="color:#777">RFC7646</a>.</p>
<h3 style="font-size:1.1em">DNS Error Reporting</h3>
<p dir="auto"><strong>DNS error reporting may be enabled.</strong></p>
<p dir="auto">For: All DNS resolver operators.</p>
<p dir="auto">DNS error reporting is a way for resolver operators to let<br>
authoritative operators know about problems in authoritative servers<br>
or zones. It provides little direct value for the resolver operators,<br>
but over time should improve the overall quality of the DNS ecosystem.<br>
It is neither widely deployed nor standardized, but hopefully will be<br>
both soon. Resolver operators are encouraged to enable DNS error<br>
reporting when it is available.</p>
<p dir="auto">DNS error reporting is proposed in<br>
<a href="https://datatracker.ietf.org/doc/draft-ietf-dnsop-dns-error-reporting" style="color:#777">draft-ietf-dnsop-dns-error-reporting</a>.</p>
<h3 style="font-size:1.1em">Trust Anchor Reporting</h3>
<p dir="auto"><strong>Trust anchor reporting should be enabled.</strong></p>
<p dir="auto">For: All DNS resolver operators.</p>
<p dir="auto">Trust anchor reporting is a way for resolver operators to convey their<br>
DNSSEC trust anchor configuration to the operator of the zone that it<br>
is for. For most resolvers this is only the root zone. This<br>
information is intended to be used during a root KSK rollover to<br>
ensure that it is safe to proceed. In the future ICANN is planning an<br>
algorithm roll for the root KSK, and this information could be<br>
helpful. Resolver operators are encouraged to enable trust anchor<br>
reporting.</p>
<p dir="auto"><a href="https://www.rfc-editor.org/rfc/rfc8145.html" style="color:#777">RFC8145</a> covers trust<br>
anchor reporting, in both possibilities available.</p>
<h2 style="font-size:1.2em">Privacy, Filtering, Transparency</h2>
<h3 style="font-size:1.1em">Privacy & anonymity</h3>
<p dir="auto">Operators are advised to apply<br>
<a href="https://www.rfc-editor.org/rfc/rfc8932.html" style="color:#777">RFC8932</a></p>
<p dir="auto">"Recommendations for DNS Privacy Service Operators" as follows:</p>
<ol>
<li>its operational and policy guidance related to DNS encrypted</li>
</ol>
<p dir="auto">transports and data handling, by applying all "Threat mitigations"<br>
(thereby by meeting its level of "minimally compliant") and<br>
additionally by applying the "Optimizations" on EDNS Client Subnet<br>
listed in section 5.3.1.</p>
<ol start="2">
<li>its framework on a Recursive operator Privacy Statement, by</li>
</ol>
<p dir="auto">publishing a privacy statement on their website that is compliant<br>
with Section 6.</p>
<h4>Logging considerations</h4>
<ol>
<li>Public privacy policy: DNS resolvers are recommended to publish<br>
their privacy policies transparently on their website. It can be a<br>
brief privacy commitment as well or be more elaborate on how the<br>
privacy policy was made. (See for example<br>
[Cloudflare's</li>
</ol>
<p dir="auto">statement](<a href="https://developers.cloudflare.com/1.1.1.1/privacy/public-dns-resolver" style="color:#777">https://developers.cloudflare.com/1.1.1.1/privacy/public-dns-resolver</a>)<br>
or <a href="https://www.quad9.net/service/privacy/" style="color:#777">Quad9's privacy page</a>.)</p>
<p dir="auto">Such policies should explicitly mention the sampling rate of DNS<br>
queries/responses that are kept, and whether these are anonymized.</p>
<ol start="2">
<li>
<p dir="auto">Third party access to personal data: it seems that the only<br>
critical personal data that DNS resolvers collect are IP addresses<br>
and the queries that are resolved. The other meta data collected<br>
can be used to have an understanding of for example which user<br>
accessed which website which can reveal information about a<br>
person’s health, lifestyle and other personal preferences (we call<br>
this profiling). For example, resolving the website for alcoholics<br>
anonymous may tell you something about the health of a person<br>
behind an IP address. IP addresses are personally identifiable<br>
information. Follow the applicable privacy laws or privacy<br>
principles when receiving third party requests to access. Resolvers<br>
should only comply with such requests when balancing legitimate<br>
third party interest with other fundamental rights.</p>
</li>
<li>
<p dir="auto">Access to data for researchers: how it is done, who has access and<br>
who can request access, how the resolver makes a decision to give<br>
access (validated and credible researchers, what they can access<br>
and other issues)</p>
</li>
<li>
<p dir="auto">Data minimization: do not collect personal information not needed<br>
for critical operations. Only retain or use what is being asked<br>
(the query). If collecting data to make the service more private<br>
and secure, explain the rationale for each piece of data (data<br>
collection purpose)</p>
</li>
<li>
<p dir="auto">Encryption: If data is encrypted, explain how it has been encrypted<br>
(DoH, DoT, or so on).</p>
</li>
<li>
<p dir="auto">Data security and retention: when to delete the data and how it is<br>
stored</p>
</li>
</ol>
<h4>Advertisement Policy</h4>
<p dir="auto">If there is any advertising from the service, the policy should be<br>
published as well as how it can potentially affect the users' privacy.</p>
<h3 style="font-size:1.1em">Filtering and blocking</h3>
<h4>Block Lists</h4>
<p dir="auto">Resolvers can be directed to block or modify answers in various ways.<br>
Blocklists may be provided by governments, communities, or other<br>
parties (for example security firms).</p>
<p dir="auto">Response Policy Zone (RPZ) allows a way to both document specific<br>
modifications that resolvers will make to DNS answers, and send the<br>
rules to resolvers. This allows updates to occur very quickly. If RPZ<br>
or some other high-speed blocking technology is used, the parties<br>
supplying these sources must be highly trusted, as changes to<br>
blocklists will usually immediately impact user queries.</p>
<p dir="auto">RPZ is not standardized, but there is an IETF draft,<br>
<a href="https://datatracker.ietf.org/doc/draft-vixie-dnsop-dns-rpz/00/" style="color:#777">draft-vixie-dnsop-dns-rpz</a>.</p>
<h4>Legal blocking</h4>
<p dir="auto"><strong>Legal requests and blocking and filtering laws:</strong> DNS resolvers<br>
should not filter content and block access to web-services. When the<br>
local law requires blocking, and the law applies to the resolver, the<br>
resolver should transparently disclose a list of blocked websites and<br>
services, when possible (disclosing such a list may not be allowed by<br>
law or regulation). Similarly, the resolver should disclose the source<br>
of such block lists, when possible.</p>
<p dir="auto">If possible, resolvers should provide information about blocked<br>
responses via the Extended DNS Error with the Blocked, Censored,<br>
Filtered, or Prohibited code - whichever applies best - along with a<br>
text why the response was blocked, censored, filtered, or prohibited.</p>
<p dir="auto"><a href="https://www.rfc-editor.org/rfc/rfc8914.html#section-4.16" style="color:#777">RFC 8914</a><br>
provides information about the meanings of the different codes.</p>
<p dir="auto"><strong>Community governance of blocklists:</strong> blocklists, if mandatory, have<br>
to be audited and assessed by third parties and there should be a<br>
right to appeal for those blocked. The Internet community can vet the<br>
blocklists from time to time to avoid blocking access to websites that<br>
are mistakenly blocked. During crisis - when mistakes can have drastic<br>
effects on accessing a critical service - preferably filtering and<br>
blocking should not be used.</p>
<h4>Opt-in/Opt-out Mechanisms</h4>
<p dir="auto">End users may choose to use a DNS resolver that filters specific kinds<br>
of traffic. For example, they may wish to avoid potential malware web<br>
sites. Or resolver operators may be required to default to filtering<br>
but allowed for to provide an unfiltered DNS resolver service.</p>
<p dir="auto">Depending on the specific requirements, a resolver service may publish<br>
different IP addresses and what type of filtering applies to each<br>
address. It is also possible to perform client authentication and<br>
authorization, using IP-based authentication, TSIG keys, or<br>
client-side TLS certificates.</p>
<h3 style="font-size:1.1em">Transparency</h3>
<p dir="auto">DNS resolvers usually provide transparency reports once a year. The<br>
reports inform the public about disclosure of user information and<br>
removal of content required by law enforcement and other government<br>
agencies.</p>
<p dir="auto">Transparency reports should (to the extent that the law allows)<br>
indicate which government agencies and law enforcement agencies<br>
request access on what basis.</p>
<p dir="auto">It should also be clear from the transparency reports what kind of<br>
data has been requested and if content removal and content blocking<br>
have been requested. Categories of data include: Content Data, Basic<br>
Subscriber Data, Other Non-Content Data and Content Blocking.</p>
<h4>Voluntary certificates and standards</h4>
<p dir="auto">Some DNS resolvers opt for obtaining certificates in security and<br>
privacy. Some also undertake audits on their privacy practices. See<br>
for example:<a href="https://www.cloudflare.com/trust-hub/compliance-resources/" style="color:#777">https://www.cloudflare.com/trust-hub/compliance-resources/</a></p>
<h4>Human rights considerations</h4>
<p dir="auto">DNS resolvers can opt for declaring their understanding of their<br>
responsibilities regarding human rights from the Universal Declaration<br>
of Human Rights. Specifically, Quad9 mentions rights to freedoms<br>
without distinction made on the basis of country, no interference with<br>
privacy, the right to freedom of opinion and expression, the right to<br>
peaceful assembly, and the right to freely participate in the cultural<br>
life of the community.</p>
<p dir="auto">See<br>
<a href="https://www.quad9.net/privacy/human-rights-considerations/" style="color:#777">Quad9's Human Rights<br>
Considerations</a><br>
for the full statement.</p>
<p dir="auto">It also invokes other human rights related solutions other than<br>
<a href="https://www.un.org/en/universal-declaration-human-rights/" style="color:#777">UDHR</a> such<br>
as Articles 8 and 9 of Resolution 42/15 of the United Nations Human<br>
Rights Council on the right to privacy in the digital age of 26<br>
September 2019 more directly define the responsibilities of the<br>
private sector toward the furtherance of human rights in modern terms.<br>
They also follow the Guidelines for Human Rights Protocol and<br>
Architecture Consideration of the Human Rights Protocol Considerations<br>
Research Group at Internet Research Task Force.</p>
<p dir="auto">The latest version of the IRTF<br>
<a href="https://tools.ietf.org/html/draft-irtf-hrpc-guidelines" style="color:#777">Guidelines for<br>
HRPC</a> may be<br>
considered for all network operators.</p>
<h2 style="font-size:1.2em">Appendix A: Why Did RIPE Write This Document?</h2>
<p dir="auto">There is increasing concern that large open DNS resolvers will become<br>
centralised points of DNS operations on the Internet. In order to<br>
address this, the European Commission issued the<br>
<a href="https://hadea.ec.europa.eu/calls-proposals/equipping-backbone-networks-high-performance-and-secure-dns-resolution-infrastructures-works_en" style="color:#777">DNS4EU</a><br>
proposal. However, such an initiative could lead to centralised<br>
guidance or regulation which might interfere with the decentralised<br>
way the Internet infrastructure works - including the DNS. See for<br>
reference the<br>
<a href="https://labs.ripe.net/author/chrisb/dns4eu-ripe-ncc-open-house-discussion/" style="color:#777">RIPE NCC Open House<br>
discussion</a><br>
on this topic.</p>
<p dir="auto">Rather than attempting to respond to the EC proposal or organize<br>
specific DNS resolver deployments, the RIPE community has decided that<br>
it is best able to provide advice and guidance. The RIPE Community is<br>
well positioned to provide a set of Best Current Practices that<br>
operators of Open DNS Resolvers will be encouraged to subscribe to.<br>
DNS Resolver Recommendations</p>
<p dir="auto">About the DNS Resolver Best Common Practice Task Force</p>
<p dir="auto"><a href="https://www.ripe.net/participate/ripe/tf/dns-resolver-best-common-practice-task-force" style="color:#777">https://www.ripe.net/participate/ripe/tf/dns-resolver-best-common-practice-task-force</a></p>
<h2 style="font-size:1.2em">Terminology</h2>
<ul>
<li>
<p dir="auto">Open Resolver: A DNS resolver that accepts queries from any client.<br>
Often the result of misconfiguration.</p>
</li>
<li>
<p dir="auto">Public Resolver: A resolver intentionally configured to be an open<br>
resolver.</p>
</li>
</ul>
<h2 style="font-size:1.2em">Introduction</h2>
<h3 style="font-size:1.1em">What Is This Document? Who Is It For?</h3>
<p dir="auto">This document presents recommendations and best current practices for<br>
operating DNS resolvers, both public and non-public ones. It covers<br>
technical aspects of operations and provides best practice<br>
recommendations for data management, with a particular focus on user<br>
privacy, security, and resilience.</p>
<p dir="auto">The document serves as guidance for the wider Internet community,<br>
offering input to:</p>
<ul>
<li>Those running public DNS resolver services, and</li>
<li>Those who want to make informed choices between such services.</li>
</ul>
<p dir="auto">Its purpose is to provide clear guidance and promote effective<br>
practices in DNS resolver operation.</p>
<p dir="auto">The intended audience is not the entire DNS community. Advice here is<br>
probably not useful for operators of authoritative servers, domain<br>
registrars, and so on. It is also not meant to be an introductory or<br>
educational document. There are many documents which cover the basics<br>
of DNS and the roles of organizations in it; a good overview is:</p>
<p dir="auto">Addressing the challenges of modern DNS - a comprehensive tutorial<br>
by van der Toorn et al.</p>
<p dir="auto"><a href="https://ris.utwente.nl/ws/files/282427879/1_s2.0_S1574013722000132_main.pdf" style="color:#777">https://ris.utwente.nl/ws/files/282427879/1_s2.0_S1574013722000132_main.pdf</a></p>
<p dir="auto">The document does not consider how to measure adherence to these<br>
recommendations. So it is not intended to be used for certification,<br>
although certification created based on the principles here is<br>
possible.</p>
<h3 style="font-size:1.1em">How Is This Document Organized?</h3>
<p dir="auto">This document has a number of sections, and specific recommendations<br>
in each section. The intent is for each recommendations to have clear<br>
guidance at the top, and then background and discussion related to the<br>
recommendation afterwards. Each recommendation indicates whether it is<br>
mostly for operators of public resolvers or for operators of any<br>
resolver.</p>
<h3 style="font-size:1.1em">About Recomendation Text</h3>
<p dir="auto">This is not a standards document, and does not propose any way to<br>
measure compliance or interoperability. It does use words like<br>
"should" or "may be" throughout. These are meant to be interpreted in<br>
the usual English sense, and not as IETF-style RFC 2119 jargon.</p>
<h2 style="font-size:1.2em">System and Network Hardening</h2>
<h3 style="font-size:1.1em">Infrastructure considerations</h3>
<p dir="auto">Running any Internet service requires attention to the infrastructure<br>
used to operate it. This section discusses various approaches that can<br>
be used to run a DNS resolver. Everything applies to both public and<br>
non-public DNS resolvers.</p>
<h4>Bare metal or public cloud</h4>
<p dir="auto">All DNS resolver software can run either on dedicated servers (rented<br>
or colocated), or in virtualized clouds, or in a combination of those.<br>
Every approach has pros and cons. Most of these are not specific to<br>
running DNS resolvers, however, some of them are.</p>
<p dir="auto"><strong>Running DNS resolver instances as OS level daemons on bare metal<br>
hosts:</strong></p>
<p dir="auto">Pros:</p>
<ul>
<li>
<p dir="auto">Performance: Bare metal servers have direct access to the<br>
underlying hardware, and can offer superior performance/cost<br>
balance by avoiding the overhead associated with virtualization.<br>
Moreover, you have full control over the server's configurations,<br>
down to the hardware level, which can be beneficial for<br>
performance and cost optimization once you get the understanding<br>
of your typical work load during peak hours.</p>
</li>
<li>
<p dir="auto">Data Security: Since you are in control of the physical servers,<br>
there is no risk of data leakage that can occur due to<br>
vulnerabilities in multi-tenant virtualization platforms,<br>
including CPU cache-based side-channel vulnerabilities. It could<br>
be argued that attacks targeting such issues are rare, and their<br>
impact on a DNS resolver service is low, but potential breaches<br>
may have significant privacy impact. It is advised to evaluate<br>
this against your organisation's risk model, or to discuss this<br>
with your information security compliance experts.</p>
</li>
<li>
<p dir="auto">Predictability: Because there is no virtualization layer and no<br>
"noisy neighbours" on the host, the performance of your servers is<br>
more predictable.</p>
</li>
</ul>
<p dir="auto">Cons:</p>
<ul>
<li>
<p dir="auto">Cost of failure: If you pick hardware configuration that is not<br>
optimal for the workload of your DNS resolver, you may need to<br>
upgrade and replace hardware components afterwards. Ways to reduce<br>
this risk include renting servers instead of buying them, carrying<br>
load testing with data similar to production workloads, and<br>
providing limited beta access to the service before it fully<br>
enters the production phase.</p>
</li>
<li>
<p dir="auto">Scalability: Scaling up with physical servers means acquiring or<br>
renting, installing, and configuring new hardware, which will take<br>
more time than provisioning new virtual servers in a cloud<br>
environment. Moreover, most cloud environments will provide you<br>
with cluster autoscaling features, which could barely be achieved<br>
in bare metal.</p>
</li>
<li>
<p dir="auto">Maintenance: You will be responsible for all server maintenance<br>
tasks, including hardware issues, which can require significant<br>
effort and specific expertise.</p>
</li>
<li>
<p dir="auto">Redundancy: Setting up high availability and disaster recovery<br>
strategies can be more complex and time consuming compared to the<br>
cloud, where these features are often provided as value added<br>
products. See the Redundancy section for more details.</p>
</li>
</ul>
<p dir="auto"><strong>Running DNS resolver instances in containers in a public cloud:</strong></p>
<p dir="auto">Pros:</p>
<ul>
<li>
<p dir="auto">Scalability: Clouds excel at scaling applications. You can scale<br>
up and down rapidly based on load, which is important for a DNS<br>
resolver that needs to handle variable query loads. In case of<br>
regional or geographically distributed resolvers, in every region<br>
where the resolver would be deployed, daily periodicity is likely<br>
to be observed, for example peak hour is likely to occur around<br>
19:00 local time, and off-peak hours may begin at around<br>
01:00-03:00. In a situation like that, using cluster autoscaling<br>
features and tools, you can run less instances in the night and<br>
more instances throughout the day, which may help to optimize your<br>
cloud hosting costs.</p>
</li>
<li>
<p dir="auto">Fault Tolerance and High Availability: Most clouds have built-in<br>
strategies, features, and products for handling node failures,<br>
which can increase your service's availability.</p>
</li>
<li>
<p dir="auto">Deployment and Management: Cloud providers offer built-in methods<br>
to deploy and manage applications, which can simplify operations<br>
and reduce the likelihood of human errors if your infrastructure<br>
management department is already familiar with these tools.</p>
</li>
<li>
<p dir="auto">Cost: While this largely depends on your specific usage, cloud<br>
services can sometimes be more cost-effective than managing your<br>
own physical servers, especially when you consider the total cost<br>
of ownership, including power, cooling, and maintenance.</p>
</li>
</ul>
<p dir="auto">Cons:</p>
<ul>
<li>
<p dir="auto">Performance: The virtualization layer of public clouds can impact<br>
performance. While this certainly could be mitigated through<br>
scaling the number of virtual hosts, the cost would also increase<br>
accordingly.</p>
</li>
<li>
<p dir="auto">Complexity: Advanced cloud technologies are complex systems which<br>
come with a steep learning curve. Without prior experience,<br>
properly configuring and managing a cloud-based compute cluster<br>
can be challenging.</p>
</li>
<li>
<p dir="auto">Cost Variability: While the cloud can be cheaper, it can also be<br>
more expensive if not properly managed. Costs can rise<br>
unexpectedly based on traffic. Make sure to always set some limits<br>
on how much may be spent on hosting in the cloud control panel,<br>
and to set up notifications to be sent to you when these<br>
thresholds are about to be triggered.</p>
</li>
<li>
<p dir="auto">Multi-tenancy Risks: In a public cloud environment, the "noisy<br>
neighbour" problem could potentially affect your service's<br>
performance. Additionally, even though cloud providers take steps<br>
to isolate tenant environments, vulnerabilities could potentially<br>
expose sensitive data (see the previous section for a detailed<br>
explanation).</p>
</li>
</ul>
<p dir="auto"><strong>Additional considerations</strong></p>
<ul>
<li>
<p dir="auto">In today's environments, Kubernetes and Terraform are sometimes<br>
used as a substitute for cloud APIs when it comes to production<br>
services' management. When running a DNS resolver in a Kubernetes<br>
cluster on top of a public cloud environment, all the pros and<br>
cons of the public cloud apply; basically, Kubernetes becomes your<br>
public cloud provider. If you have significant prior experience<br>
running services in Kubernetes in production, you may successfully<br>
replicate your experience with the DNS resolver software.<br>
Otherwise, we would advise against Kubernetes in this case.</p>
</li>
<li>
<p dir="auto">The only reason we may find to run a DNS resolver in a Kubernetes<br>
cluster on top of self-hosted dedicated servers is when you have<br>
significant hands-on experience with Kubernetes and it is natural<br>
for you to manage applications this way. Otherwise, running DNS<br>
resolver daemons in containers brings little, if any, benefit.<br>
Autoscaling features are not available to you in this case, and<br>
neither horizontal nor vertical pod autoscaling is of any use,<br>
because DNS resolver software typically scales in-host by itself<br>
just fine.</p>
</li>
<li>
<p dir="auto">When designing a cluster of resolvers for autoscaling, keep in<br>
mind that newly spawned resolver machines would need to populate<br>
resolver cache first before they are fully useful. Your DNS<br>
resolver software may provide cache replication mechanisms.<br>
Otherwise, it is safe to overprovision clusters somewhat under<br>
heavy load, and discarding excessive instances once all the caches<br>
are populated and the average load of a compute instance<br>
decreases. In addition, it may be worthwhile to consider sharing<br>
cache data between instances.</p>
</li>
<li>
<p dir="auto">It is always advised to prefer environments your infrastructure<br>
management team is familiar with.</p>
</li>
</ul>
<h3 style="font-size:1.1em">Software considerations</h3>
<h4>Open Source</h4>
<p dir="auto"><strong>Recommendation</strong>: Choose any well-maintained DNS software you are<br>
comfortable using. Regardless of which software you choose, ensure you<br>
have somewhere to go for support. In the case of open source software,<br>
consider providing financial support to ensure continued development.<br>
Some open source maintainers take donations, while others offer<br>
support contracts.</p>
<p dir="auto">There are both open source and proprietary implementations of DNS<br>
resolver software. Mixing these is also possible, for example, by<br>
using proprietary extensions with open source software or deploying<br>
open source software modified in-house.</p>
<p dir="auto">General observations:</p>
<ul>
<li>Software licensing is orthogonal to software security. Neither is<br>
proprietary software less secure on principle nor are<br>
contributions by "unknown" developers more of a risk in open<br>
source.</li>
</ul>
<p dir="auto">Benefits of open source:</p>
<ul>
<li>Open source allows for inspection, independent auditing, and</li>
</ul>
<p dir="auto">troubleshooting.</p>
<ul>
<li>Open source can avoid vendor lock-in.</li>
<li>Open source can aid internet standards development.<br>
Widely-deployed open source implementations allow proponents of<br>
standards drafts to contribute proof of concept implementations<br>
without permission or cooperation of vendors.</li>
</ul>
<p dir="auto">Drawbacks of open source</p>
<ul>
<li>Both open source and proprietary software require skilled<br>
maintenance, which has costs. Proprietary licensed software or<br>
appliances typically come with license fees to cover these. In<br>
contrast, open source licenses decouple usage by operators from<br>
monetary compensation to developers. It is up to operators to<br>
consider the financial sustainability of continued maintenance of<br>
the open source DNS software they depend upon.</li>
</ul>
<p dir="auto">Please also consider deploying different software implementations to<br>
ensure diversity, as discussed in the diversity section below.</p>
<h3 style="font-size:1.1em">Networking considerations</h3>
<h4>IPv4 and IPv6</h4>
<p dir="auto"><strong>If available, both IPv4 and IPv6 must be deployed.</strong></p>
<p dir="auto">Large parts of the authoritative DNS are only accessible via IPv4, so<br>
the resolver must be able to originate IPv4 queries. Authoritative DNS<br>
that is only accessible via IPv6 is very rare.</p>
<p dir="auto">Depending on the connectivity of clients, a resolver may be IPv4-only,<br>
IPv6-only, or support IPv4 and IPv6.</p>
<h4>Addressing</h4>
<p dir="auto"><strong>Using multiple IP addresses for the service address should be<br>
considered.</strong></p>
<p dir="auto">Using 2 or more IPv4 addresses and 2 or more IPv6 addresses from<br>
different RIR will allow resilience in failure at an RIR, either<br>
governance, security, or technical. Note that support for multiple<br>
addresses for recursive resolvers varies and some clients perform<br>
poorly if any address does not respond normally.</p>
<p dir="auto">There is no need to pick an IPv4 address with all octets the same,<br>
like 2.2.2.2 or 11.11.11.11.</p>
<p dir="auto"><strong>Publishing a list of back-end addresses used for resolving should be<br>
considered.</strong></p>
<p dir="auto">Publishing a list of back-end addresses used for resolving can be<br>
useful for other network & DNS operators (for example, geo-IP<br>
location, making sure data is getting to correct places, and so on).</p>
<h4>High Availability</h4>
<p dir="auto">This can be considered in terms of local and global scope.</p>
<h5>Local scope</h5>
<p dir="auto">Inside a single location/region, such as an office, campus, or small<br>
ISP network, the main availability concern is that a resolver is<br>
always reachable. Client systems can be configured with multiple<br>
resolver addresses, but the failover behaviour of stub resolvers to a<br>
second address can be painful. Ideally the primary address is highly<br>
available and such fallback rarely required. How much effort is put<br>
into ensuring this is true should probably scale in line with the<br>
number of users, or sensitivity of the clients using that resolver to<br>
delayed resolution.</p>
<p dir="auto">There are several ways to promote high availability of an individual<br>
resolver address, such as dedicated load balancing equipment, or<br>
network techniques like VRRP, or IP anycast. These generally have in<br>
common a pool of recursive servers and the means to direct queries to<br>
them when a health check has determined them to be capable of<br>
answering those queries.</p>
<p dir="auto">Dedicated free or commercially produced, hardware or software load<br>
balancing solutions are available. These typically own the resolver IP<br>
address and forward queries to the currently available instances of a<br>
pool of recursive servers.</p>
<p dir="auto">VRRP enables a technique to make the resolver IP address available on<br>
multiple servers, often used to provide automatic failover between<br>
two. A pool of recursive servers using this technique must reside in<br>
the same broadcast domain.</p>
<p dir="auto">IP anycast in the local scope typically involves a pool of recursive<br>
servers advertising a route to a shared resolver IP address into a<br>
routing protocol. This can be configured in failover or load-sharing<br>
configurations. A load sharing configuration typically requires<br>
network equipment able to balance traffic to a destination over equal<br>
cost paths (ECMP). A pool of recursive servers using this technique<br>
can be distributed in different parts of the network.</p>
<h5>Global scope</h5>
<p dir="auto">The same concerns as for local service availability are present in the<br>
global scope, with the added issue that DNS resolution over long<br>
distances may be slow. Practically speaking, only multiple resolver<br>
addresses, or IP anycast are useful strategies here. The motivations<br>
for finding better failover solutions than multiple resolver addresses<br>
have been covered above.</p>
<p dir="auto">IP anycast in the global scope means routing the same IP prefix to<br>
more than one location. This can provide effective solutions for<br>
failover and, when optimally configured for routing client queries to<br>
the topologically least distant recursive server location. IP anycast<br>
in the global scope requires the use of globally routable prefixes. If<br>
a separate prefix is to be used for anycasting, usually this means a<br>
/24 in IPv4 and a /48 in IPv6, as those are the smallest sizes that<br>
will be widely propagated in BGP. A common practice is to use a<br>
covering prefix (/23 in IPv4 or /47 in IPv6) for fallback, and a<br>
more-specific prefix (/24 or /48) for the traffic. The more-specific<br>
prefix can then be withdrawn to send traffic to a backup site; this<br>
will happen automatically if the site is disconnected from routing.</p>
<p dir="auto"><a href="https://www.rfc-editor.org/rfc/rfc7094.html" style="color:#777">RFC7094</a> discusses<br>
anycast architecture in detail, including references to various other<br>
RFC which discuss anycast in general and to DNS in particular.</p>
<p dir="auto"><a href="https://datatracker.ietf.org/doc/html/rfc4786" style="color:#777">RFC4786</a> discuses<br>
operation of anycast services.</p>
<h5>Generally</h5>
<p dir="auto">Operators of a globally scoped recursive service are encouraged to<br>
also adopt the local scope recommendations in each of the locations<br>
where the service is provisioned.</p>
<p dir="auto">Though the above deals with the shortcomings of reliance on stub<br>
resolver failover between a list of addresses those recommendations<br>
shouldn’t be seen as an exclusive alternative. Multiple resolver<br>
addresses, where each is provisioned using differing failover<br>
strategies, can provide a resolver of last resort and further improved<br>
resilience.</p>
<h4>Ingress Filtering</h4>
<p dir="auto"><strong>Ingress Filtering to follow BCP 38 should be deployed.</strong></p>
<p dir="auto">DNS normally uses UDP traffic, which makes it a common vector of both<br>
<a href="https://en.wikipedia.org/wiki/Reflection_attack" style="color:#777">reflection</a> and<br>
<a href="https://www.cisa.gov/news-events/alerts/2014/01/17/udp-based-amplification-attacks" style="color:#777">amplification</a><br>
attacks. To minimize the amount of spoofed traffic that a resolver<br>
responds to, the network should be configured as recommended in<br>
<a href="https://www.rfc-editor.org/rfc/rfc2827.html" style="color:#777">BCP 38</a>.</p>
<h4>RPKI Sign Advertised Routes</h4>
<p dir="auto"><strong>Route Advertisements should be signed using RPKI</strong></p>
<p dir="auto">Using RPKI to sign any route advertisements - either toward<br>
authoritative servers or toward DNS clients - is straightforward to do<br>
and will reduce the impact of BGP misconfigurations and some BGP<br>
hijacking attempts.</p>
<p dir="auto">RPKI validation is also possible, although the effort is greater. It<br>
is possible that the hosting provider or the transit provider for your<br>
service validates BGP; asking and making this part of your selection<br>
criteria is reasonable.</p>
<h4>(D)DoS measures</h4>
<p dir="auto">Denial-of-Service (DoS) attacks, both distributed (DDoS) and not are a<br>
threat to any Internet service. Network operators for a service<br>
providing any DNS service must be prepared for large amounts of attack<br>
traffic.</p>
<p dir="auto">In addition to attacks on the service itself, a resolver may be used<br>
both as an attack reflector and as an attack amplifier.</p>
<p dir="auto">Active monitoring of network and service usage, careful logging, and a<br>
security team that is able to respond to problem reports is necessary.<br>
Mitigation techniques will include filtering or rate-limiting traffic,<br>
both on the authoritative and client side of the resolver.</p>
<h3 style="font-size:1.1em">Capacity planning</h3>
<h4>Server capacity</h4>
<p dir="auto">If using a model that is easy to scale (cloud based, or Kubernetes<br>
based, or similar), then getting server capacity correct is largely a<br>
question of budgeting. If using a less-flexible model (bare metal for<br>
example), then under-estimating will mean problems delivering service.</p>
<p dir="auto">Hardware performance varies widely, as does operating system and<br>
resolver performance. Some lab testing will be necessary to estimate<br>
the number of systems needed.</p>
<h4>Network capacity</h4>
<p dir="auto">Since DNS is mostly UDP-based, it is often easy to generate large<br>
amounts of spoofed traffic to and from DNS servers. DNS traffic is<br>
small compared to application traffic (videos and other content), but<br>
still significant. Authoritative server operators often build their<br>
networks and servers to handle 10 times their normal load. Recursive<br>
server operators may need to do the same, although the service only<br>
accepts traffic from IP addresses that cannot be spoofed (for example<br>
users within a network that operated by the same company) then this<br>
can be reduced, for example to 3 times normal load. To estimate<br>
expected load, the best approach is to examine historical usage for<br>
the actual expected users of the system.</p>
<h3 style="font-size:1.1em">Resilience</h3>
<h4>System Diversity</h4>
<p dir="auto">In addition to the software considerations above, operators should<br>
consider whether to use different server implementations to provide<br>
service. This allows continued operation if a critical vulnerability<br>
is found in one implementation, by shifting traffic to other<br>
implementations.</p>
<p dir="auto">Placing resolvers and control systems in different physical locations<br>
will allow continued operation in the event of a disaster or other<br>
problem that impacts a single location. In addition, ensuring diverse<br>
connectivity to other networks will prevent single points of failure<br>
on the network side. Ensuring network diversity may take some care, as<br>
it is not always obvious what fate is shared between any given path;<br>
this may be physical, virtual, or organizational, and my sometimes be<br>
hidden.</p>
<h4>Security</h4>
<p dir="auto">In addition to the DNS-specific security considerations, normal<br>
security best practices for any Internet service should be followed,<br>
including updating software updated regularly, patching software as<br>
soon as possible for any known security vulnerabilities, following<br>
CERT announcements and so on.</p>
<h4>Certification</h4>
<p dir="auto">It may be useful or required for an organization to follow specific<br>
certifications, such as ISO or ITIL. These can be government-defined<br>
or industry-defined. For end users there is typically not much direct<br>
value, but business customers will often look for services that are<br>
operated by organizations meeting such standards.</p>
<h2 style="font-size:1.2em">DNS configuration knobs</h2>
<p dir="auto">The DNS is an old protocol that has a lot of settings that can be<br>
tweaked. This section reviews these and provides recommendations on<br>
which should be used for a resolver.</p>
<h3 style="font-size:1.1em">DNSSEC validation</h3>
<p dir="auto"><strong>DNSSEC validation should be enabled.</strong></p>
<p dir="auto">For: All DNS resolver operators.</p>
<p dir="auto">DNSSEC validation is the best way to ensure that the answers from the<br>
owner of domain name being queried are returned.</p>
<p dir="auto">The root KSK must be updated when it changes. While<br>
<a href="https://www.rfc-editor.org/rfc/rfc5011.html" style="color:#777">RFC5011</a> defines an<br>
automated way to do this, a resolver operator will probably either<br>
manage this trust anchor directly or have it updated via OS updates.</p>
<p dir="auto"><a href="https://www.rfc-editor.org/rfc/rfc9364.html" style="color:#777">RFC9364</a> provides a lot<br>
of useful information, and links to further documents about DNSSEC.<br>
However, operators usually do not need to know the details, and can<br>
simply ensure that DNSSEC validation is enabled in their software.</p>
<p dir="auto">Resolver software that does not support DNSSEC validation should be<br>
avoided.</p>
<h3 style="font-size:1.1em">DNS Transport Protocols</h3>
<p dir="auto"><strong>UDP and TCP must be supported.</strong></p>
<p dir="auto">For: All DNS resolver operators.</p>
<p dir="auto">UDP is what most clients use, and TCP is necessary for DNS answers<br>
that are too large for a single UDP packet.</p>
<p dir="auto"><a href="https://www.rfc-editor.org/rfc/rfc7766.html" style="color:#777">RFC7766</a> explains why<br>
TCP is necessary in more detail.</p>
<h3 style="font-size:1.1em">Packet Fragmentation Avoidance</h3>
<p dir="auto"><strong>Servers should be configured to avoid fragmentation.</strong></p>
<p dir="auto">For: ALL DNS resolver operators.</p>
<p dir="auto">Packet fragmentation can cause issues with DNS over UDP, especially<br>
over IPv6. These issues can be minimized by choosing implementations<br>
that set IP options to avoid this, and by taking care with EDNS0<br>
message sizes.</p>
<p dir="auto">Recommendations are available in<br>
<a href="https://datatracker.ietf.org/doc/draft-ietf-dnsop-avoid-fragmentation/" style="color:#777">draft-ietf-dnsop-avoid-fragmentation</a>.</p>
<h3 style="font-size:1.1em">Encrypted DNS</h3>
<p dir="auto"><strong>At least one of DNS-over-TLS (DoT), DNS-over-HTTPS (DoH), and<br>
DNS-over-QUIC (DoQ) should be supported.</strong></p>
<p dir="auto">For: All DNS resolver operators.</p>
<p dir="auto">DoT, DoH, and DoQ are different technologies that all provide an<br>
encrypted channel between the resolver and the authoritative server.<br>
DoT is the oldest, and provides encrypted DNS using TLS. DoH uses HTTP<br>
over TLS as a way to transmit queries and answers, and is widely<br>
supported by web browsers. DoQ is the newest, and provides advanced<br>
features such as separate streams for each query, avoiding the "head<br>
of line" blocking problem common with all protocols layered on top of<br>
TCP (such as DoT and DoH).</p>
<ul>
<li>DoT
<ul>
<li><a href="https://www.rfc-editor.org/rfc/rfc7858.html" style="color:#777">RFC7858</a></li>
</ul>
</li>
<li>DoH
<ul>
<li><a href="https://www.rfc-editor.org/rfc/rfc8484.html" style="color:#777">RFC8484</a></li>
</ul>
</li>
<li>DoQ
<ul>
<li><a href="https://www.rfc-editor.org/rfc/rfc9250.html" style="color:#777">RFC9250</a></li>
</ul>
</li>
</ul>
<p dir="auto"><strong>Discovery of DNS Designated Resolvers</strong></p>
<p dir="auto">There are new mechanisms that allow DNS clients to use DNS records to<br>
discover encrypted DNS configurations. Resolvers should publish DNS<br>
records to assist clients finding encrypted resolvers.</p>
<ul>
<li>Discovery of Designated Resolvers
<ul>
<li><a href="https://www.rfc-editor.org/rfc/rfc9462.html" style="color:#777">RFC9462</a></li>
</ul>
</li>
</ul>
<p dir="auto">QUESTION: Do we need to publish certificate in other ways that via the<br>
DDR mechanisms?</p>
<h3 style="font-size:1.1em">QNAME Minimization</h3>
<p dir="auto"><strong>QNAME minimization should be enabled.</strong></p>
<p dir="auto">For: All DNS resolver operators.</p>
<p dir="auto">Using QNAME minimization, a resolver does not send the full name that<br>
it is trying to resolver to authoritative servers higher in the DNS<br>
hierarchy. So, for example, when querying "atlas.ripe.net" the servers<br>
for ".net" would only be asked for "ripe.net". This improves privacy<br>
for the end user querying the name.</p>
<p dir="auto"><a href="https://www.rfc-editor.org/rfc/rfc7816.html" style="color:#777">RFC7816</a> covers QNAME<br>
minimization.</p>
<h3 style="font-size:1.1em">Aggressive NSEC caching</h3>
<p dir="auto"><strong>Aggressive NSEC caching may be enabled.</strong></p>
<p dir="auto">For: Public resolver operators.</p>
<p dir="auto">"Aggressive NSEC caching", meaning negative caching based on NSEC and<br>
NSEC3 values, can reduce traffic greatly. It is important to protect<br>
against random subdomain attacks.</p>
<p dir="auto">This style of caching takes advantage of the way that NSEC and NSEC3<br>
records cover a range of names in a zone. A resolver can know that a<br>
query falls within such a range without sending any further queries,<br>
by remembering the NSEC or NSEC3 redords that is has seen as answers<br>
to earlier queries.</p>
<p dir="auto">Aggressive NSEC caching is almost always a good idea. However enabling<br>
this is less important for DNS resolver operators who have a close<br>
relationship with users, since they can stop attacks by blocking users<br>
or otherwise directly dealing with the source of abusive queries.</p>
<p dir="auto"><a href="https://www.rfc-editor.org/rfc/rfc8189.html" style="color:#777">RFC8189</a> describes<br>
negative caching in detail.</p>
<h3 style="font-size:1.1em">Local Root</h3>
<p dir="auto"><strong>Local root should be used.</strong></p>
<p dir="auto">For: Public resolver operators.</p>
<p dir="auto">Running a local root has several benefits, but it is an additional<br>
component to maintain. For public resolver operators this is<br>
definitely worth the cost, but other resolver operators may choose to<br>
simply send all queries to the well-distributed root name servers.</p>
<p dir="auto"><a href="https://www.rfc-editor.org/rfc/rfc8806.html" style="color:#777">RFC8806</a> describes local<br>
root, including several example configurations.</p>
<p dir="auto">In the future it will be possible to use ZONEMD to validate the copy<br>
of the root zone obtained before using it. This is currently available<br>
for the root zone.</p>
<p dir="auto"><a href="https://www.rfc-editor.org/rfc/rfc8976.html" style="color:#777">RFC8976</a> describes ZONEMD.</p>
<h3 style="font-size:1.1em">DNS Cookies</h3>
<p dir="auto"><strong>Interoperable DNS Cookies may be supported.</strong></p>
<p dir="auto">For: Public resolver operators.</p>
<p dir="auto">DNS cookies provide some improved security over plain UDP, and are<br>
designed to be more lightweight than TCP. If more than one server is<br>
responding for a given IP address, then the Server Secret must be<br>
shared by all servers, and the answer must be constructed in a<br>
consistent manner by all server implementations.</p>
<p dir="auto">Since client-side support for DNS cookies is not very widespread, and<br>
since managing server-side secrets involves some work, the costs may<br>
outweigh the benefits for some non-public resolver operators.</p>
<p dir="auto"><a href="https://www.rfc-editor.org/rfc/rfc7873.html" style="color:#777">RFC7873</a> describes DNS<br>
cookies, and <a href="https://www.rfc-editor.org/rfc/rfc9018.html" style="color:#777">RFC9018</a><br>
standardizes shared DNS cookies.</p>
<h3 style="font-size:1.1em">TTL Recommendations</h3>
<p dir="auto"><strong>TTL limits may be adjusted.</strong></p>
<p dir="auto">For: All DNS resolver operators.</p>
<p dir="auto">Software typically defaults to a maximum stored TTL of 1 or 2 days.<br>
A lower TTL will mean removing rarely-used records that have long TTL,<br>
and should not have much operational impact from a CPU or network<br>
point of view.</p>
<p dir="auto">It is possible to set a minimum TTL in many implementations. This is a<br>
violation of the DNS protocol, although may be useful to reduce load<br>
from records with very low TTL (less than 5 seconds).</p>
<p dir="auto">Note that software may set different maximum and minimum TTL<br>
independent of the results that the resolver returns. That may have a<br>
significant impact on queries as well, but resolver operators cannot<br>
influence that.</p>
<h3 style="font-size:1.1em">TTL-based Record Pre-Fetch</h3>
<p dir="auto"><strong>TTL record pre-fetch should be enabled when available.</strong></p>
<p dir="auto">For: All DNS resolver operators.</p>
<p dir="auto">Some resolvers have the ability to look up a record before it has<br>
expired from cache, in order to refresh the value and extend the TTL.<br>
This way there is never a time when the records are missing from the<br>
cache. This is not currently standardized, but a form of this was<br>
proposed in the IETF as<br>
<a href="https://datatracker.ietf.org/doc/html/draft-wkumari-dnsop-hammer-03" style="color:#777">DNS<br>
Hammer</a>.<br>
We recommend turning this feature on if available.</p>
<h3 style="font-size:1.1em">EDNS Client Subnet (ECS)</h3>
<p dir="auto"><strong>ECS may be enabled.</strong></p>
<p dir="auto">For: All DNS resolver operators.</p>
<p dir="auto">EDNS Client Subnet (ECS) allows the resolver to include information<br>
about the IP address of the client querying it when sending messages<br>
to authoritative servers. This may allow authoritative servers to<br>
provide different answers which are more appropriate for the client.<br>
However, ECS will increase the amount of cache space required by<br>
resolvers, may reduce DNS performance, and may have privacy<br>
implications.</p>
<p dir="auto">A resolver operator that has clients that are limited to a specific<br>
region may see no benefit. A resolver operator that has a widely<br>
distributed anycast network may not have much benefit from ECS, since<br>
the locations that initiate the query will be close to the client. But<br>
a resolver operator that answers client queries only from a few<br>
locations, and expects clients to come from a wide area, may provide<br>
better service for end-users by supporting ECS.</p>
<p dir="auto">EDNS client subnet is described in<br>
<a href="https://www.rfc-editor.org/rfc/rfc7871.html" style="color:#777">RFC7871</a>, an<br>
informational RFC.</p>
<h3 style="font-size:1.1em">Extended DNS Errors</h3>
<p dir="auto"><strong>Extended DNS errors should be enabled.</strong></p>
<p dir="auto">For: All DNS resolver operators.</p>
<p dir="auto">DNS traditionally provides very broad error reporting, SERVFAIL being<br>
the most common. This makes diagnosing and fixing problems difficult.<br>
Extended DNS errors provide extra information about failures, for<br>
example expired DNSSEC signatures. They also allow resolver operators<br>
to report administrative reasons for DNS failures, such as blocks due<br>
to legal requirements.</p>
<p dir="auto"><a href="https://www.rfc-editor.org/rfc/rfc8914.html" style="color:#777">RFC8914</a> defines<br>
extended DNS errors.</p>
<h3 style="font-size:1.1em">Negative Trust Anchors</h3>
<p dir="auto"><strong>Negative trust anchors may be deployed.</strong></p>
<p dir="auto">For: All DNS resolver operators.</p>
<p dir="auto">Negative trust anchors (NTA) allow a resolver operator to handle a<br>
case where an authoritative server has a DNSSEC problem and becomes<br>
inaccessible. They basically disable DNSSEC checking for a domain.<br>
When this is warranted is difficult to know with certainty, and will<br>
usually requires some manual checking. Since DNSSEC validation is now<br>
widespread, DNSSEC failures on the authoritative side will impact many<br>
resolvers.</p>
<p dir="auto">Because of these reasons this document does not recommend NTA, but<br>
also does not recommend that a deployment avoid NTA if it makes sense<br>
for that environment.</p>
<p dir="auto">Negative trust anchors are documented in<br>
<a href="https://www.rfc-editor.org/rfc/rfc7646.html" style="color:#777">RFC7646</a>.</p>
<h3 style="font-size:1.1em">DNS Error Reporting</h3>
<p dir="auto"><strong>DNS error reporting may be enabled.</strong></p>
<p dir="auto">For: All DNS resolver operators.</p>
<p dir="auto">DNS error reporting is a way for resolver operators to let<br>
authoritative operators know about problems in authoritative servers<br>
or zones. It provides little direct value for the resolver operators,<br>
but over time should improve the overall quality of the DNS ecosystem.<br>
It is neither widely deployed nor standardized, but hopefully will be<br>
both soon. Resolver operators are encouraged to enable DNS error<br>
reporting when it is available.</p>
<p dir="auto">DNS error reporting is proposed in<br>
<a href="https://datatracker.ietf.org/doc/draft-ietf-dnsop-dns-error-reporting" style="color:#777">draft-ietf-dnsop-dns-error-reporting</a>.</p>
<h3 style="font-size:1.1em">Trust Anchor Reporting</h3>
<p dir="auto"><strong>Trust anchor reporting should be enabled.</strong></p>
<p dir="auto">For: All DNS resolver operators.</p>
<p dir="auto">Trust anchor reporting is a way for resolver operators to convey their<br>
DNSSEC trust anchor configuration to the operator of the zone that it<br>
is for. For most resolvers this is only the root zone. This<br>
information is intended to be used during a root KSK rollover to<br>
ensure that it is safe to proceed. In the future ICANN is planning an<br>
algorithm roll for the root KSK, and this information could be<br>
helpful. Resolver operators are encouraged to enable trust anchor<br>
reporting.</p>
<p dir="auto"><a href="https://www.rfc-editor.org/rfc/rfc8145.html" style="color:#777">RFC8145</a> covers trust<br>
anchor reporting, in both possibilities available.</p>
<h2 style="font-size:1.2em">Privacy, Filtering, Transparency</h2>
<h3 style="font-size:1.1em">Privacy & anonymity</h3>
<p dir="auto">Operators are advised to apply<br>
<a href="https://www.rfc-editor.org/rfc/rfc8932.html" style="color:#777">RFC8932</a></p>
<p dir="auto">"Recommendations for DNS Privacy Service Operators" as follows:</p>
<ol>
<li>its operational and policy guidance related to DNS encrypted</li>
</ol>
<p dir="auto">transports and data handling, by applying all "Threat mitigations"<br>
(thereby by meeting its level of "minimally compliant") and<br>
additionally by applying the "Optimizations" on EDNS Client Subnet<br>
listed in section 5.3.1.</p>
<ol start="2">
<li>its framework on a Recursive operator Privacy Statement, by</li>
</ol>
<p dir="auto">publishing a privacy statement on their website that is compliant<br>
with Section 6.</p>
<h4>Logging considerations</h4>
<ol>
<li>Public privacy policy: DNS resolvers are recommended to publish<br>
their privacy policies transparently on their website. It can be a<br>
brief privacy commitment as well or be more elaborate on how the<br>
privacy policy was made. (See for example<br>
[Cloudflare's</li>
</ol>
<p dir="auto">statement](<a href="https://developers.cloudflare.com/1.1.1.1/privacy/public-dns-resolver" style="color:#777">https://developers.cloudflare.com/1.1.1.1/privacy/public-dns-resolver</a>)<br>
or <a href="https://www.quad9.net/service/privacy/" style="color:#777">Quad9's privacy page</a>.)</p>
<p dir="auto">Such policies should explicitly mention the sampling rate of DNS<br>
queries/responses that are kept, and whether these are anonymized.</p>
<ol start="2">
<li>
<p dir="auto">Third party access to personal data: it seems that the only<br>
critical personal data that DNS resolvers collect are IP addresses<br>
and the queries that are resolved. The other meta data collected<br>
can be used to have an understanding of for example which user<br>
accessed which website which can reveal information about a<br>
person’s health, lifestyle and other personal preferences (we call<br>
this profiling). For example, resolving the website for alcoholics<br>
anonymous may tell you something about the health of a person<br>
behind an IP address. IP addresses are personally identifiable<br>
information. Follow the applicable privacy laws or privacy<br>
principles when receiving third party requests to access. Resolvers<br>
should only comply with such requests when balancing legitimate<br>
third party interest with other fundamental rights.</p>
</li>
<li>
<p dir="auto">Access to data for researchers: how it is done, who has access and<br>
who can request access, how the resolver makes a decision to give<br>
access (validated and credible researchers, what they can access<br>
and other issues)</p>
</li>
<li>
<p dir="auto">Data minimization: do not collect personal information not needed<br>
for critical operations. Only retain or use what is being asked<br>
(the query). If collecting data to make the service more private<br>
and secure, explain the rationale for each piece of data (data<br>
collection purpose)</p>
</li>
<li>
<p dir="auto">Encryption: If data is encrypted, explain how it has been encrypted<br>
(DoH, DoT, or so on).</p>
</li>
<li>
<p dir="auto">Data security and retention: when to delete the data and how it is<br>
stored</p>
</li>
</ol>
<h4>Advertisement Policy</h4>
<p dir="auto">If there is any advertising from the service, the policy should be<br>
published as well as how it can potentially affect the users' privacy.</p>
<h3 style="font-size:1.1em">Filtering and blocking</h3>
<h4>Block Lists</h4>
<p dir="auto">Resolvers can be directed to block or modify answers in various ways.<br>
Blocklists may be provided by governments, communities, or other<br>
parties (for example security firms).</p>
<p dir="auto">Response Policy Zone (RPZ) allows a way to both document specific<br>
modifications that resolvers will make to DNS answers, and send the<br>
rules to resolvers. This allows updates to occur very quickly. If RPZ<br>
or some other high-speed blocking technology is used, the parties<br>
supplying these sources must be highly trusted, as changes to<br>
blocklists will usually immediately impact user queries.</p>
<p dir="auto">RPZ is not standardized, but there is an IETF draft,<br>
<a href="https://datatracker.ietf.org/doc/draft-vixie-dnsop-dns-rpz/00/" style="color:#777">draft-vixie-dnsop-dns-rpz</a>.</p>
<h4>Legal blocking</h4>
<p dir="auto"><strong>Legal requests and blocking and filtering laws:</strong> DNS resolvers<br>
should not filter content and block access to web-services. When the<br>
local law requires blocking, and the law applies to the resolver, the<br>
resolver should transparently disclose a list of blocked websites and<br>
services, when possible (disclosing such a list may not be allowed by<br>
law or regulation). Similarly, the resolver should disclose the source<br>
of such block lists, when possible.</p>
<p dir="auto">If possible, resolvers should provide information about blocked<br>
responses via the Extended DNS Error with the Blocked, Censored,<br>
Filtered, or Prohibited code - whichever applies best - along with a<br>
text why the response was blocked, censored, filtered, or prohibited.</p>
<p dir="auto"><a href="https://www.rfc-editor.org/rfc/rfc8914.html#section-4.16" style="color:#777">RFC 8914</a><br>
provides information about the meanings of the different codes.</p>
<p dir="auto"><strong>Community governance of blocklists:</strong> blocklists, if mandatory, have<br>
to be audited and assessed by third parties and there should be a<br>
right to appeal for those blocked. The Internet community can vet the<br>
blocklists from time to time to avoid blocking access to websites that<br>
are mistakenly blocked. During crisis - when mistakes can have drastic<br>
effects on accessing a critical service - preferably filtering and<br>
blocking should not be used.</p>
<h4>Opt-in/Opt-out Mechanisms</h4>
<p dir="auto">End users may choose to use a DNS resolver that filters specific kinds<br>
of traffic. For example, they may wish to avoid potential malware web<br>
sites. Or resolver operators may be required to default to filtering<br>
but allowed for to provide an unfiltered DNS resolver service.</p>
<p dir="auto">Depending on the specific requirements, a resolver service may publish<br>
different IP addresses and what type of filtering applies to each<br>
address. It is also possible to perform client authentication and<br>
authorization, using IP-based authentication, TSIG keys, or<br>
client-side TLS certificates.</p>
<h3 style="font-size:1.1em">Transparency</h3>
<p dir="auto">DNS resolvers usually provide transparency reports once a year. The<br>
reports inform the public about disclosure of user information and<br>
removal of content required by law enforcement and other government<br>
agencies.</p>
<p dir="auto">Transparency reports should (to the extent that the law allows)<br>
indicate which government agencies and law enforcement agencies<br>
request access on what basis.</p>
<p dir="auto">It should also be clear from the transparency reports what kind of<br>
data has been requested and if content removal and content blocking<br>
have been requested. Categories of data include: Content Data, Basic<br>
Subscriber Data, Other Non-Content Data and Content Blocking.</p>
<h4>Voluntary certificates and standards</h4>
<p dir="auto">Some DNS resolvers opt for obtaining certificates in security and<br>
privacy. Some also undertake audits on their privacy practices. See<br>
for example:<a href="https://www.cloudflare.com/trust-hub/compliance-resources/" style="color:#777">https://www.cloudflare.com/trust-hub/compliance-resources/</a></p>
<h4>Human rights considerations</h4>
<p dir="auto">DNS resolvers can opt for declaring their understanding of their<br>
responsibilities regarding human rights from the Universal Declaration<br>
of Human Rights. Specifically, Quad9 mentions rights to freedoms<br>
without distinction made on the basis of country, no interference with<br>
privacy, the right to freedom of opinion and expression, the right to<br>
peaceful assembly, and the right to freely participate in the cultural<br>
life of the community.</p>
<p dir="auto">See<br>
<a href="https://www.quad9.net/privacy/human-rights-considerations/" style="color:#777">Quad9's Human Rights<br>
Considerations</a><br>
for the full statement.</p>
<p dir="auto">It also invokes other human rights related solutions other than<br>
<a href="https://www.un.org/en/universal-declaration-human-rights/" style="color:#777">UDHR</a> such<br>
as Articles 8 and 9 of Resolution 42/15 of the United Nations Human<br>
Rights Council on the right to privacy in the digital age of 26<br>
September 2019 more directly define the responsibilities of the<br>
private sector toward the furtherance of human rights in modern terms.<br>
They also follow the Guidelines for Human Rights Protocol and<br>
Architecture Consideration of the Human Rights Protocol Considerations<br>
Research Group at Internet Research Task Force.</p>
<p dir="auto">The latest version of the IRTF<br>
<a href="https://tools.ietf.org/html/draft-irtf-hrpc-guidelines" style="color:#777">Guidelines for<br>
HRPC</a> may be<br>
considered for all network operators.</p>
<h2 style="font-size:1.2em">Appendix A: Why Did RIPE Write This Document?</h2>
<p dir="auto">There is increasing concern that large open DNS resolvers will become<br>
centralised points of DNS operations on the Internet. In order to<br>
address this, the European Commission issued the<br>
<a href="https://hadea.ec.europa.eu/calls-proposals/equipping-backbone-networks-high-performance-and-secure-dns-resolution-infrastructures-works_en" style="color:#777">DNS4EU</a><br>
proposal. However, such an initiative could lead to centralised<br>
guidance or regulation which might interfere with the decentralised<br>
way the Internet infrastructure works - including the DNS. See for<br>
reference the<br>
<a href="https://labs.ripe.net/author/chrisb/dns4eu-ripe-ncc-open-house-discussion/" style="color:#777">RIPE NCC Open House<br>
discussion</a><br>
on this topic.</p>
<p dir="auto">Rather than attempting to respond to the EC proposal or organize<br>
specific DNS resolver deployments, the RIPE community has decided that<br>
it is best able to provide advice and guidance. The RIPE Community is<br>
well positioned to provide a set of Best Current Practices that<br>
operators of Open DNS Resolvers will be encouraged to subscribe to.</p>
<p dir="auto">--<br>
dns-resolver-tf mailing list<br>
<a href="mailto:dns-resolver-tf@ripe.net" style="color:#777">dns-resolver-tf@ripe.net</a><br>
<a href="https://mailman.ripe.net/" style="color:#777">https://mailman.ripe.net/</a></p>
</blockquote>
<p dir="auto">--<br>
John Todd - <a href="mailto:jtodd@quad9.net" style="color:#3983C4">jtodd@quad9.net</a> - +41 44 527 99 23<br>
General Manager - Quad9 Recursive Resolver</p>
</div></div>
</body>
</html>