Internet-Draft | Discovery of Network-designated Resolver | December 2021 |
Boucadair, et al. | Expires 16 June 2022 | [Page] |
The document specifies new DHCP and IPv6 Router Advertisement options to discover encrypted DNS servers (e.g., DNS-over-HTTPS, DNS-over-TLS, DNS-over-QUIC). Particularly, it allows to learn an authentication domain name together with a list of IP addresses and a set of service parameters to reach such encrypted DNS servers.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 16 June 2022.¶
Copyright (c) 2021 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
This document focuses on the support of encrypted DNS such as DNS-over-HTTPS (DoH) [RFC8484], DNS-over-TLS (DoT) [RFC7858], or DNS-over-QUIC (DoQ) [I-D.ietf-dprive-dnsoquic] in local networks.¶
In particular, the document specifies how a local encrypted DNS server can be discovered by connected hosts by means of DHCPv4 [RFC2132], DHCPv6 [RFC8415], and IPv6 Router Advertisement (RA) [RFC4861] options. These options are designed to convey the following information: the DNS Authentication Domain Name (ADN), a list of IP addresses, and a set of service parameters.¶
The options defined in this document can be deployed in a variety of deployments (e.g., local networks with Customer Premises Equipment (CPEs) that may or may not be managed by an Internet Service Provider (ISP), local networks with or without DNS forwarders). It is out of the scope of this document to provide an inventory of such deployments.¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
This document makes use of the terms defined in [RFC8499]. The following additional terms are used:¶
This document describes how a DNS client can discover local encrypted DNS servers using DHCP (Sections 4 and 5) and Neighbor Discovery protocol (Section 6): Encrypted DNS options.¶
These options configure an authentication domain name, a list of IPv6 addresses, and a set of service parameters of the encrypted DNS server. More information about the design of these options is provided in the following subsections.¶
In order to allow for PKIX-based authentication between a DNS client and an encrypted DNS server, the Encrypted DNS options are designed to include an authentication domain name. This ADN is presented as a reference identifier for DNS authentication purposes. This design accommodates the current best practices for issuing certificates as per Section 1.7.2 of [RFC6125]:¶
| Some certification authorities issue server certificates based on | IP addresses, but preliminary evidence indicates that such | certificates are a very small percentage (less than 1%) of issued | certificates.¶
To avoid adding a dependency on another server to resolve the ADN, the Encrypted DNS options return the IP address(es) to locate the encrypted DNS server. These encrypted DNS servers may be hosted on the same or distinct IP addresses. Such a decision is deployment specific.¶
In order to optimize the size of discovery messages when all DNS servers terminate on the same IP address, early versions of this document considered relying upon the discovery mechanisms specified in [RFC2132][RFC3646][RFC8106] to retrieve a list of IP addresses to reach their DNS servers. Nevertheless, this approach requires a client that supports more than one encrypted DNS protocol (e.g., DoH and DoT) to probe that list of IP addresses. To avoid such a probing, the options defined in Sections 4, 5, and 6 associate an IP address with an encrypted DNS protocol. No probing is required in such a design.¶
A list of IP addresses to reach an encrypted DNS server may be returned in an Encrypted DNS option to accommodate current deployments relying upon primary and backup servers. Whether one or more IP addresses are returned in an Encrypted DNS option is deployment specific. For example, a router embedding a recursive server or a forwarder has to include one single IP address pointing to one of its LAN-facing interfaces. This IP address can be a private IPv4 address, a link-local address, a Unique Local IPv6 unicast Address (ULA), or a Global Unicast Address (GUA).¶
If more than one IP address are to be returned in an Encrypted DNS option, these addresses are ordered in the preference for use by the client.¶
Because distinct encrypted DNS protocols may be provisioned by a network (e.g., DoT, DoH, and DoQ) and that some of these protocols may make use of customized port numbers instead of default ones, the Encrypted DNS options are designed to return a set of service parameters. These parameters are encoded following the same rules for encoding SvcParams in Section 2.1 of [I-D.ietf-dnsop-svcb-https]. This encoding approach may increase the size of the options but it has the merit to rely upon an existing IANA registry and, thus, to accommodate new encrypted DNS protocols and service parameters that may be defined in the future. For example, "dohpath" service parameter (Section 5.1 of [I-D.ietf-add-svcb-dns]) supplies a relative DoH URI Template.¶
A single option is used to convey both the ADN and IP addresses because otherwise means to correlate an IP address with an ADN will be required if, for example, more than one ADN is supported by the network.¶
The DHCP options defined in Sections 4 and 5 follow the option ordering guidelines in Section 17 of [RFC7227].¶
If the encrypted DNS is discovered by a host using both RA and DHCP, the rules discussed in Section 5.3.1 of [RFC8106] MUST be followed.¶
DHCP/RA options to discover encrypted DNS servers (including, DoH URI Templates) takes precedence over DDR [I-D.ietf-add-ddr] since DDR uses unencrypted DNS to an external DNS resolver, which is susceptible to both internal and external attacks whereas DHCP/RA is typically protected using the mechanisms discussed in Section 7.1.¶
If the local DNS client supports one of the discovered Encrypted DNS protocols identified by Application Layer Protocol Negotiation (ALPN) protocol identifiers, the DNS client establishes an encrypted DNS session following the order of the discovered servers. The client follows the mechanism discussed in Section 8 of [RFC8310] to authenticate the DNS server certificate using the authentication domain name conveyed in the Encrypted DNS options. ALPN-related considerations can be found in Section 6.1 of [I-D.ietf-dnsop-svcb-https].¶
Devices may be connected to multiple networks; each providing their own DNS configuration using the discovery mechanisms specified in this document. Nevertheless, it is out of the scope of this specification to discuss DNS selection of multi-interface devices. The reader may refer to [RFC6731] for a discussion of issues and an example of DNS server selection for multi-interfaced devices.¶
The format of the DHCPv6 Encrypted DNS option is shown in Figure 1.¶
The fields of the option shown in Figure 1 are as follows:¶
Indicates one or more IPv6 addresses to reach the encrypted DNS server. An address can be link-local, ULA, or GUA. The format of this field is shown in Figure 2.¶
A fully qualified domain name of the encrypted DNS server. This field is formatted as specified in Section 10 of [RFC8415].¶
An example of the authentication-domain-name encoding is shown in Figure 3. This example conveys the FQDN "doh1.example.com.", and the resulting Option-length field is 18.¶
Specifies a set of service parameters that are encoded following the rules in Section 2.1 of [I-D.ietf-dnsop-svcb-https]. Service parameters may include, for example, a list of ALPN protocol identifiers or alternate port numbers. The service parameters MUST NOT include "ipv4hint" or "ipv6hint" SvcParams as they are superseded by the included IP addresses.¶
If no port service parameter is included, this indicates that default port numbers should be used. As a reminder, the default port number is 853 for DoT, 443 for DoH, and 853 for DoQ.¶
The length of this field is ('Option-length' - 6 - 'ADN Length' - 'Addr Length').¶
To discover an encrypted DNS server, the DHCPv6 client MUST include OPTION_V6_DNR in an Option Request Option (ORO), as in Sections 18.2.1, 18.2.2, 18.2.4, 18.2.5, 18.2.6, and 21.7 of [RFC8415].¶
The DHCP client MUST be prepared to receive multiple instances of the OPTION_V6_DNR option; each option is to be treated as a separate encrypted DNS server. These instances SHOULD be processed following their service priority (i.e., smaller service priority indicates a higher preference).¶
The DHCPv6 client MUST silently discard multicast and host loopback addresses conveyed in OPTION_V6_DNR.¶
The format of the DHCPv4 Encrypted DNS option is illustrated in Figure 4.¶
The fields of the option shown in Figure 4 are as follows:¶
Indicates one or more IPv4 addresses to reach the encrypted DNS server. Both private and public IPv4 addresses can be included in this field. The format of this field is shown in Figure 5. This format assumes that an IPv4 address is encoded as a1.a2.a3.a4.¶
Includes the authentication domain name of the encrypted DNS server. This field is formatted as specified in Section 10 of [RFC8415]. The format of this field is shown in Figure 6. The values s1, s2, s3, etc. represent the domain name labels in the domain name encoding.¶
Specifies a set of service parameters that are encoded following the rules in Section 2.1 of [I-D.ietf-dnsop-svcb-https]. Service parameters may include, for example, a list of ALPN protocol identifiers or alternate port numbers. The service parameters MUST NOT include "ipv4hint" or "ipv6hint" SvcParams as they are superseded by the included IP addresses.¶
If no port service parameter is included, this indicates that default port numbers should be used.¶
The length of this field is ('Option-length' - 4 - 'ADN Length' - 'Addr Length').¶
OPTION_V4_DNR is a concatenation-requiring option. As such, the mechanism specified in [RFC3396] MUST be used if OPTION_V4_DNR exceeds the maximum DHCPv4 option size of 255 octets.¶
To discover an encrypted DNS server, the DHCPv4 client requests the Encrypted DNS server by including OPTION_V4_DNR in a Parameter Request List option [RFC2132].¶
The DHCPv4 client MUST be prepared to receive multiple instances of the OPTION_V4_DNR option; each option is to be treated as a separate encrypted DNS server. These instances SHOULD be processed following their service priority (i.e., smaller service priority indicates a higher preference).¶
The DHCPv4 client MUST silently discard multicast and host loopback addresses conveyed in OPTION_V4_DNR.¶
This section defines a new Neighbor Discovery option [RFC4861]: IPv6 RA Encrypted DNS option. This option is useful in contexts similar to those discussed in Section 1.1 of [RFC8106].¶
The format of the IPv6 RA Encrypted DNS option is illustrated in Figure 7.¶
The fields of the option shown in Figure 7 are as follows:¶
32-bit unsigned integer. The maximum time in seconds (relative to the time the packet is received) over which the discovered Authentication Domain Name is valid.¶
The value of Lifetime SHOULD by default be at least 3 * MaxRtrAdvInterval, where MaxRtrAdvInterval is the maximum RA interval as defined in [RFC4861].¶
A value of all one bits (0xffffffff) represents infinity.¶
A value of zero means that this Authentication Domain Name MUST no longer be used.¶
One or more IPv6 addresses of the encrypted DNS server. An address can be link-local, ULA, or GUA.¶
All of the addresses share the same Lifetime value. Similar to [RFC8106], if it is desirable to have different Lifetime values per IP address, multiple Encrypted DNS options may be used.¶
Specifies a set of service parameters that are encoded following the rules in Section 2.1 of [I-D.ietf-dnsop-svcb-https]. Service parameters may include, for example, a list of ALPN protocol identifiers or alternate port numbers. The service parameters MUST NOT include "ipv4hint" or "ipv6hint" SvcParams as they are superseded by the included IP addresses.¶
If no port service parameter is included, this indicates that default port numbers should be used.¶
The option MUST be padded with zeros so that the full enclosed data is a multiple of 8 octets (Section 4.6 of [RFC4861]).¶
Multiple Encrypted DNS options may be returned to an IPv6 host. Similar to [RFC8106], these options are ordered in the preference for use by the IPv6 host.¶
The procedure for DNS configuration is the same as it is with any other Neighbor Discovery option [RFC4861]. In addition, the host follows the procedure described in Section 5.3.1 of [RFC8106].¶
The host MUST silently discard multicast and host loopback addresses conveyed in the Encrypted DNS options.¶
DHCP/RA messages are not encrypted or protected against modification within the LAN. Unless mitigated (described below), the content of DHCP and RA messages can be spoofed or modified by active attackers, such as compromised devices within the local network. An active attacker (Section 3.3 of [RFC3552]) can spoof the DHCP/RA response to provide the attacker's Encrypted DNS server. Note that such an attacker can launch other attacks as discussed in Section 22 of [RFC8415]. The attacker can get a domain name with a domain-validated public certificate from a CA and host an Encrypted DNS server.¶
Attacks of spoofed or modified DHCP responses and RA messages by attackers within the local network may be mitigated by making use of the following mechanisms:¶
The above mechanisms would ensure that the endpoint receives the correct configuration information of the encrypted DNS servers selected by the DHCP server (or RA sender), but cannot provide any information about the DHCP server or the entity hosting the DHCP server (or RA sender) .¶
Encrypted DNS sessions with rogue servers that spoof the IP address of a DNS server will fail because the DNS client will fail to authenticate that rogue server based upon PKIX authentication [RFC6125], particularly the authentication domain name in the Encrypted DNS Option. DNS clients that ignore authentication failures and accept spoofed certificates will be subject to attacks (e.g., redirect to malicious servers, intercept sensitive data).¶
Encrypted DNS connections received from outside the local network MUST be discarded by the encrypted DNS forwarder in the CPE. This behavior adheres to REQ#8 in [RFC6092]; it MUST apply for both IPv4 and IPv6.¶
If the DHCP responses or RAs are dropped by the attacker, the client can fallback to use a preconfigured encrypted DNS server. However, the use of policies to select servers is out of the scope of this document.¶
Note that deletion attack is not specific to DHCP/RA.¶
A passive attacker (Section 3.2 of [RFC3552]) can identify a host is using DHCP/RA to discover an encrypted DNS server and can infer that host is capable of using DoH/DoT/DoQ to encrypt DNS messages. However, a passive attacker cannot spoof or modify DHCP/RA messages.¶
Wireless LAN (WLAN) as frequently deployed in local networks (e.g., home networks) is vulnerable to various attacks (e.g., [Evil-Twin], [Krack], [Dragonblood]). Because of these attacks, only cryptographically authenticated communications are trusted on WLANs. This means that an information (e.g., NTP server, DNS server, default domain) provided by such networks via DHCP, DHCPv6, or RA are untrusted because DHCP and RA messages are not authenticated.¶
If the pre-shared key is the same for all clients that connect to the same WLAN, the shared key will be available to all nodes, including attackers. As such, it is possible to mount an active on-path attack. Man-in-the-middle attacks are possible within local networks because such WLAN authentication lacks peer entity authentication.¶
This leads to the need for provisioning unique credentials for different clients. Endpoints can be provisioned with unique credentials (username and password, typically) provided by the local network administrator to mutually authenticate to the local WLAN Access Point (e.g., 802.1x Wireless User Authentication on OpenWRT [dot1x], EAP-pwd [RFC8146]). Not all endpoint devices (e.g., IoT devices) support 802.1x supplicant and need an alternate mechanism to connect to the local network. To address this limitation, unique pre-shared keys can be created for each such device and WPA-PSK is used (e.g., [PSK]).¶
IANA is requested to assign the following new DHCPv6 Option Code in the registry maintained in [DHCPV6].¶
Value | Description | Client ORO | Singleton Option | Reference |
---|---|---|---|---|
TBA1 | OPTION_V6_DNR | Yes | No | [ThisDocument] |
IANA is requested to assign the following new DHCP Option Code in the registry maintained in [BOOTP].¶
+------+------------------+-------+----------------+----------------+ | Tag | Name | Data | Meaning | Reference | | | | Length| | | +------+------------------+-------+----------------+----------------+ | TBA2 | OPTION_V4_DNR | N | Encrypted DNS | [ThisDocument] | | | | | Server | | +------+------------------+-------+----------------+----------------+¶
IANA is requested to assign the following new IPv6 Neighbor Discovery Option type in the "IPv6 Neighbor Discovery Option Formats" sub-registry under the "Internet Control Message Protocol version 6 (ICMPv6) Parameters" registry maintained in [ND].¶
Type | Description | Reference |
---|---|---|
TBA3 | DNS Encrypted DNS Option | [ThisDocument] |
Many thanks to Christian Jacquenet and Michael Richardson for the review.¶
Thanks to Stephen Farrell, Martin Thomson, Vittorio Bertola, Stephane Bortzmeyer, Ben Schwartz, and Iain Sharp for the comments.¶
Thanks to Mark Nottingham for the feedback on HTTP redirection.¶
The use of DHCP to retrieve an authentication domain name was discussed in Section 7.3.1 of [RFC8310] and [I-D.pusateri-dhc-dns-driu].¶
Thanks to Bernie Volz for the review of the DHCP part.¶
Nicolai Leymann Deutsche Telekom Germany Email: n.leymann@telekom.de Zhiwei Yan CNNIC No.4 South 4th Street, Zhongguancun Beijing 100190 China EMail: yan@cnnic.cn¶