Skip to content

Commit 9374da6

Browse files
authored
Merge pull request #11 from yaroslavros/main
Added PREF64
2 parents f18d72a + 343991a commit 9374da6

1 file changed

Lines changed: 124 additions & 38 deletions

File tree

draft-ietf-masque-connect-ip-dns.md

Lines changed: 124 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: "DNS Configuration for Proxying IP in HTTP"
3-
abbrev: "CONNECT-IP DNS"
2+
title: "DNS and PREF64 Configuration for Proxying IP in HTTP"
3+
abbrev: "CONNECT-IP DNS and PREF64"
44
category: std
55
docname: draft-ietf-masque-connect-ip-dns-latest
66
submissiontype: IETF
@@ -57,39 +57,53 @@ informative:
5757
--- abstract
5858

5959
Proxying IP in HTTP allows building a VPN through HTTP load balancers. However,
60-
at the time of writing, that mechanism doesn't offer a mechanism for
61-
communicating DNS configuration information inline. In contrast, most existing
62-
VPN protocols provide a mechanism to exchange DNS configuration information.
63-
This document describes an extension that exchanges this information using HTTP
64-
capsules. This mechanism supports encrypted DNS transports.
60+
at the time of writing, that mechanism lacks a way to communicate network
61+
configuration details such as DNS information or IPv6 NAT64 prefixes (PREF64).
62+
In contrast, most existing VPN protocols provide mechanisms to exchange
63+
such configuration information.
64+
65+
This document defines extensions that convey DNS and PREF64 configuration
66+
using HTTP capsules. This mechanism supports encrypted DNS transports
67+
and can be used to inform peers about network translation prefixes for IPv6/IPv4
68+
synthesis.
6569

6670
--- middle
6771

6872
# Introduction
6973

7074
Proxying IP in HTTP ({{!CONNECT-IP=RFC9484}}) allows building a VPN through
71-
HTTP load balancers. However, at the time of writing, that mechanism doesn't
72-
offer a mechanism for communicating DNS configuration information inline. In
73-
contrast, most existing VPN protocols provide a mechanism to exchange DNS
74-
configuration information (e.g., {{?IKEv2=RFC7296}}). This document describes
75-
an extension that exchanges this information using HTTP capsules
76-
({{!HTTP-DGRAM=RFC9297}}). This document does not define any new ways to convey
77-
DNS queries or responses, only a mechanism to exchange DNS configuration
78-
information.
79-
80-
Note that this extension is meant for cases where connect-ip is used like a
81-
Remote Access VPN (see {{Section 8.1 of CONNECT-IP}}) or Site-to-Site VPN
75+
HTTP load balancers. However, at the time of writing, that mechanism lacks
76+
a way to communicate network configuration details such as DNS information
77+
or IPv6 NAT64 prefixes (PREF64). In contrast, most existing VPN protocols provide
78+
mechanisms to exchange such configuration information (for example
79+
{{?IKEv2=RFC7296}} supports discovery of DNS servers).
80+
81+
This document defines extensions that allow CONNECT-IP peers to convey DNS
82+
and PREF64 configuration information to its peer using HTTP capsules
83+
({{!HTTP-DGRAM=RFC9297}}). These extensions do not define any new way to
84+
transport DNS queries or responses, but instead enable the exchange of DNS
85+
resolver configuration and NAT64 prefix information inline with CONNECT-IP
86+
sessions.
87+
88+
Note that these extensions are meant for cases where CONNECT-IP operates as a
89+
Remote Access VPN (see {{Section 8.1 of CONNECT-IP}}) or a Site-to-Site VPN
8290
(see {{Section 8.2 of CONNECT-IP}}), but not for cases like IP Flow Forwarding
8391
(see {{Section 8.3 of CONNECT-IP}}).
8492

85-
This specification uses Service Bindings ({{!SVCB=RFC9460}}) to exchange
86-
information about nameservers, such as which encrypted DNS transport is
93+
For DNS configuration, this specification uses Service Bindings ({{!SVCB=RFC9460}})
94+
to exchange information about nameservers, such as which encrypted DNS transport is
8795
supported. This allows support for DNS over HTTPS ({{!DoH=RFC8484}}), DNS over
8896
QUIC ({{!DoQ=RFC9250}}), DNS over TLS ({{!DoT=RFC7858}}), unencrypted DNS over
8997
UDP port 53 and TCP port 53 ({{!DNS=RFC1035}}), as well as potential future DNS
90-
transports.
98+
transports. PREF64 configuration is represented in a way similar to Router
99+
Advertisement option defined in {{Section 4 of ?PREF64-RA=RFC8781}}.
100+
101+
Similar to how Proxying IP in HTTP exchanges IP address configuration
102+
information ({{Section 4.7 of CONNECT-IP}}), the mechanism defined in this document
103+
leverages capsules. Similarly, these mechanisms are bidirectional: either endpoint
104+
can send configuration information.
91105

92-
## Conventions and Definitions
106+
# Conventions and Definitions
93107

94108
{::boilerplate bcp14-tagged}
95109

@@ -103,12 +117,9 @@ In this document, we use the term "nameserver" to refer to a DNS recursive
103117
resolver as defined in {{Section 6 of !DNS-TERMS=RFC8499}}, and the term
104118
"domain name" is used as defined in {{Section 2 of !DNS-TERMS}}.
105119

106-
# Mechanism
120+
# DNS Configuration Mechanism
107121

108-
Similar to how Proxying IP in HTTP exchanges IP address configuration
109-
information ({{Section 4.7 of CONNECT-IP}}), this mechanism leverages capsules
110-
to signal DNS configuration information. Similarly, this mechanism is
111-
bidirectional: either endpoint can send DNS configuration information in a
122+
Either endpoint can send DNS configuration information in a
112123
`DNS_ASSIGN` capsule. The capsule format is defined below.
113124

114125
## Domain Structure
@@ -278,7 +289,7 @@ servers are responsible for separate internal domains.
278289
If multiple DNS_ASSIGN capsules are sent in one direction, each DNS_ASSIGN
279290
capsule supersedes prior ones.
280291

281-
# Handling
292+
## Handling
282293

283294
Note that internal domains include subdomains. In other words, if the DNS
284295
configuration contains a domain, that indicates that the corresponding domain
@@ -299,9 +310,9 @@ SHOULD send its DNS queries to that nameserver directly as independent HTTPS
299310
requests. When possible, those requests SHOULD be coalesced over the same HTTPS
300311
connection.
301312

302-
# Examples
313+
## Examples
303314

304-
## Full-Tunnel Consumer VPN
315+
### Full-Tunnel Consumer VPN
305316

306317
A full-tunnel consumer VPN hosted at masque.example.org could configure the
307318
client to use DNS over HTTPS to the IP proxy itself by sending the following
@@ -325,7 +336,7 @@ DNS Configuration = {
325336
~~~
326337
{: #ex-doh title="Full Tunnel Example"}
327338

328-
## Split-Tunnel Enterprise VPN
339+
### Split-Tunnel Enterprise VPN
329340

330341
An enterprise switching their preexisting IKEv2/IPsec split-tunnel VPN to
331342
connect-ip could use the following configuration.
@@ -348,6 +359,80 @@ DNS Configuration = {
348359
~~~
349360
{: #ex-split title="Split Tunnel Example"}
350361

362+
# PREF64 Configuration Mechanism
363+
364+
This document defines a new capsule type, `PREF64`, that allows a CONNECT-IP peer
365+
to communicate the IPv6 NAT64 prefixes to be used for IPv6/IPv4 address synthesis.
366+
This information enables an endpoint operating in an IPv6-only environment to
367+
construct IPv4-reachable addresses from IPv6 literals when a NAT64 translator is in use.
368+
369+
## PREF64 Capsule {#pref64-capsule}
370+
371+
Each PREF64 capsule conveys zero or more NAT64 prefixes. If multiple capsules are sent
372+
in the same direction, the most recent one replaces any previously advertised prefixes.
373+
Empty PREF64 capsule is used to inform that NAT64 prefixes are not available.
374+
375+
The capsule has the following structure (see {{iana}} for the value of the capsule type):
376+
377+
~~~
378+
PREF64 Capsule {
379+
Type (i) = PREF64,
380+
Length (i),
381+
NAT64 Prefix (104) ...,
382+
}
383+
~~~
384+
{: #pref64-format title="PREF64 Capsule Format"}
385+
386+
Individual NAT64 prefix has the following structure:
387+
388+
~~~
389+
NAT64 Prefix {
390+
Prefix Length (8),
391+
Prefix (96),
392+
}
393+
~~~
394+
{: #nat64-prefix title="NAT64 Prefix Format"}
395+
396+
NAT64 prefix fields are:
397+
398+
Prefix Length:
399+
400+
: The length of the NAT64 prefix in bits encoded as a single byte. Valid values are 32, 40, 48,
401+
56, 64, and 96. These lengths correspond to the prefix sizes permitted for the IPv6-to-IPv4
402+
address synthesis algorithm described in {{Section 2.2 of !IPv6-TRANSLATOR=RFC6052}}.
403+
404+
Prefix:
405+
406+
: The highest 96 bits of the IPv6 prefix, encoded in network byte order. Note that this field is
407+
always 96 bits long, regardless of the value in the Prefix Length field
408+
preceding it, see {{Section 2.2 of !IPv6-TRANSLATOR}} for details.
409+
410+
## Handling
411+
412+
Upon receiving a PREF64 capsule, a peer updates its local NAT64 configuration for the
413+
corresponding CONNECT-IP session. The newly received PREF64 capsule overrides any previously
414+
received PREF64 capsules in the same direction.
415+
416+
If an endpoint receives a capsule that does not meet one of the requirements listed in {{pref64-capsule}}, or
417+
with a length that is not a multiple of 13 bytes, it MUST treat it as malformed. An empty
418+
PREF64 capsule invalidates any previously received NAT64 Prefixes.
419+
420+
## Example
421+
422+
A CONNECT-IP peer would use the following capsule to signal a single NAT64 prefix of `64:ff9b::/96`
423+
424+
~~~
425+
PREF64 Capsule {
426+
Type (i) = PREF64,
427+
Length (i) = 13,
428+
NAT64 Prefix {
429+
Prefix Length (8) = 96
430+
Prefix (96) = 0x00 0x64 0xff 0x9b 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00,
431+
}
432+
}
433+
~~~
434+
{: #ex-pref64 title="PREF64 Capsule Example"}
435+
351436
# Security Considerations
352437

353438
Acting on received DNS_ASSIGN capsules can have significant impact on endpoint
@@ -362,18 +447,19 @@ corresponding ROUTE_ADVERTISEMENT capsule.
362447

363448
# IANA Considerations {#iana}
364449

365-
This document, if approved, will request IANA add the following value to the
450+
This document, if approved, will request IANA add the following values to the
366451
"HTTP Capsule Types" registry maintained at
367452
<[](https://www.iana.org/assignments/masque)>.
368453

369-
Value:
370-
371-
: 0x1ACE79EC (if this document is approved, this value will be
372-
replaced by a smaller one before publication)
454+
| Value | Capsule Type |
455+
| --- | --- |
456+
| 0x1ACE79EC (if this document is approved, this value will be
457+
replaced by a smaller one before publication) | DNS_ASSIGN |
458+
| 0x274C0FBC (if this document is approved, this value will be
459+
replaced by a smaller one before publication) | PREF64 |
373460

374-
Capsule Type:
375461

376-
: DNS_ASSIGN
462+
All of these new entries use the following values for these fields:
377463

378464
Status:
379465

0 commit comments

Comments
 (0)