When a DNS client is configured with an Unencrypted DNS Resolver IP address, it
SHOULD query the resolver for SVCB records of a service with a scheme of "dns" and an authority of "resolver.arpa" before making other queries. This allows the client to switch to using encrypted DNS for all other queries, if possible. Specifically, the client issues a query for
_dns.resolver.arpa. with the SVCB resource record type (64) [
RFC 9460].
Responses to the SVCB query for the "resolver.arpa" SUDN describe Designated Resolvers. To ensure that different Designated Resolver configurations can be correctly distinguished and associated with A and AAAA records for the resolver, ServiceMode SVCB responses to these queries
MUST NOT use the "." or "resolver.arpa" value for the TargetName. Similarly, clients
MUST NOT perform A or AAAA queries for "resolver.arpa".
The following is an example of a SVCB record describing a DoH server discovered by querying for
_dns.resolver.arpa.:
_dns.resolver.arpa. 7200 IN SVCB 1 doh.example.net (
alpn=h2 dohpath=/dns-query{?dns} )
The following is an example of a SVCB record describing a DoT server discovered by querying for
_dns.resolver.arpa.:
_dns.resolver.arpa. 7200 IN SVCB 1 dot.example.net (
alpn=dot port=8530 )
The following is an example of a SVCB record describing a DoQ server discovered by querying for
_dns.resolver.arpa.:
_dns.resolver.arpa. 7200 IN SVCB 1 doq.example.net (
alpn=doq port=8530 )
If the recursive resolver that receives this query has one or more Designated Resolvers, it will return the corresponding SVCB records. When responding to these special queries for "resolver.arpa", the recursive resolver
SHOULD include the A and AAAA records for the name of the Designated Resolver in the Additional Answers section. This will save the DNS client an additional round trip to retrieve the address of the Designated Resolver; see
Section 5 of
RFC 9460.
Designated Resolvers
SHOULD be accessible using the IP address families that are supported by their associated Unencrypted DNS Resolvers. If an Unencrypted DNS Resolver is accessible using an IPv4 address, it ought to provide an A record for an IPv4 address of the Designated Resolver; similarly, if it is accessible using an IPv6 address, it ought to provide a AAAA record for an IPv6 address of the Designated Resolver. The Designated Resolver
MAY support more address families than the Unencrypted DNS Resolver, but it
SHOULD NOT support fewer. If this is not done, clients that only have connectivity over one address family might not be able to access the Designated Resolver.
If the recursive resolver that receives this query has no Designated Resolvers, it
SHOULD return NODATA for queries to the "resolver.arpa" zone, to provide a consistent and accurate signal to clients that it does not have a Designated Resolver.
When a client discovers Designated Resolvers from an Unencrypted DNS Resolver IP address, it can choose to use these Designated Resolvers either (1) automatically or (2) based on some other policy, heuristic, or user choice.
This document defines two preferred methods for automatically using Designated Resolvers:
-
Verified Discovery (Section 4.2), for when a TLS certificate can be used to validate the resolver's identity.
-
Opportunistic Discovery (Section 4.3), for when a resolver's IP address is a private or local address.
A client
MAY additionally use a discovered Designated Resolver without either of these methods, based on implementation-specific policy or user input. Details of such policy are out of scope for this document. Clients
MUST NOT automatically use a Designated Resolver without some sort of validation, such as the two methods defined in this document or a future mechanism. Use without validation can allow an attacker to direct traffic to an Encrypted DNS Resolver that is unrelated to the original Unencrypted DNS Resolver, as described in
Section 7.
A client
MUST NOT reuse a designation discovered using the IP address of one Unencrypted DNS Resolver in place of any other Unencrypted DNS Resolver. Instead, the client needs to repeat the discovery process to discover the Designated Resolver of the other Unencrypted DNS Resolver. In other words, designations are per-resolver and
MUST NOT be used to configure the client's universal DNS behavior. This ensures in all cases that queries are being sent to a party designated by the resolver originally being used.
If a client is configured with the same Unencrypted DNS Resolver IP address on multiple different networks, a Designated Resolver that has been discovered on one network
SHOULD NOT be reused on any of the other networks without repeating the discovery process for each network, since the same IP address may be used for different servers on the different networks.
Verified Discovery is a mechanism that allows the automatic use of a Designated Resolver that supports DNS encryption that performs a TLS handshake.
In order to be considered a verified Designated Resolver, the TLS certificate presented by the Designated Resolver needs to pass the following checks made by the client:
-
The client MUST verify the chain of certificates up to a trust anchor as described in Section 6 of RFC 5280. The client SHOULD use the default system or application trust anchors, unless otherwise configured.
-
The client MUST verify that the certificate contains the IP address of the designating Unencrypted DNS Resolver in an iPAddress entry of the subjectAltName extension as described in Section 4.2.1.6 of RFC 5280.
If these checks pass, the client
SHOULD use the discovered Designated Resolver for any cases in which it would have otherwise used the Unencrypted DNS Resolver, so as to prefer encrypted DNS whenever possible.
If these checks fail, the client
MUST NOT automatically use the discovered Designated Resolver if this designation was only discovered via a
_dns.resolver.arpa. query (if the designation was advertised directly by the network as described in
Section 6.5, the server can still be used). Additionally, the client
SHOULD suppress any further queries for Designated Resolvers using this Unencrypted DNS Resolver for the length of time indicated by the SVCB record's Time to Live (TTL) in order to avoid excessive queries that will lead to further failed validations. The client
MAY issue new queries if the SVCB record's TTL is excessively long (as determined by client policy) to minimize the length of time an intermittent attacker can prevent the use of encrypted DNS.
If the Designated Resolver and the Unencrypted DNS Resolver share an IP address, clients
MAY choose to opportunistically use the Designated Resolver even without this certificate check (
Section 4.3). If the IP address is not shared, opportunistic use allows for attackers to redirect queries to an unrelated Encrypted DNS Resolver, as described in
Section 7.
Connections to a Designated Resolver can use a different IP address than the IP address of the Unencrypted DNS Resolver -- for example, if the process of resolving the SVCB service yields additional addresses. Even when a different IP address is used for the connection, the TLS certificate checks described in this section still apply for the original IP address of the Unencrypted DNS Resolver.
There are situations where Verified Discovery of encrypted DNS configuration over unencrypted DNS is not possible. For example, the identities of Unencrypted DNS Resolvers on private IP addresses [
RFC 1918], Unique Local Addresses (ULAs) [
RFC 4193], and Link-Local addresses [
RFC 3927] [
RFC 4291] cannot be safely confirmed using TLS certificates under most conditions.
An opportunistic privacy profile is defined for DoT in
Section 4.1 of
RFC 7858 as a mode in which clients do not validate the name of the resolver presented in the certificate. This opportunistic privacy profile similarly applies to DoQ [
RFC 9250]. For this profile,
Section 4.1 of
RFC 7858 explains that clients might or might not validate the resolver; however, even if clients choose to perform some certificate validation checks, they will not be able to validate the names presented in the SubjectAltName (SAN) field of the certificate for private and local IP addresses.
A client
MAY use information from the SVCB record for
_dns.resolver.arpa. with this opportunistic privacy profile as long as the IP address of the Encrypted DNS Resolver does not differ from the IP address of the Unencrypted DNS Resolver. Clients
SHOULD use this mode only for resolvers using private or local IP addresses, since resolvers that use other addresses are able to provision TLS certificates for their addresses.