1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445
|
<pre>Internet Engineering Task Force (IETF) W. Kumari
Request for Comments: 7710 Google
Category: Standards Track O. Gudmundsson
ISSN: 2070-1721 CloudFlare
P. Ebersman
Comcast
S. Sheng
ICANN
December 2015
Captive-Portal Identification Using DHCP or Router Advertisements (RAs)
Abstract
In many environments offering short-term or temporary Internet access
(such as coffee shops), it is common to start new connections in a
captive-portal mode. This highly restricts what the customer can do
until the customer has authenticated.
This document describes a DHCP option (and a Router Advertisement
(RA) extension) to inform clients that they are behind some sort of
captive-portal device and that they will need to authenticate to get
Internet access. It is not a full solution to address all of the
issues that clients may have with captive portals; it is designed to
be used in larger solutions. The method of authenticating to and
interacting with the captive portal is out of scope for this
document.
Status of This Memo
This is an Internet Standards Track document.
This document is a product of the Internet Engineering Task Force
(IETF). It represents the consensus of the IETF community. It has
received public review and has been approved for publication by the
Internet Engineering Steering Group (IESG). Further information on
Internet Standards is available in <a href="./rfc5741#section-2">Section 2 of RFC 5741</a>.
Information about the current status of this document, any errata,
and how to provide feedback on it may be obtained at
<a href="http://www.rfc-editor.org/info/rfc7710">http://www.rfc-editor.org/info/rfc7710</a>.
<span class="grey">Kumari, et al. Standards Track [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc7710">RFC 7710</a> DHCP Captive-Portal December 2015</span>
Copyright Notice
Copyright (c) 2015 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a> and the IETF Trust's Legal
Provisions Relating to IETF Documents
(<a href="http://trustee.ietf.org/license-info">http://trustee.ietf.org/license-info</a>) 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 Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License.
Table of Contents
<a href="#section-1">1</a>. Introduction . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-2">2</a>
<a href="#section-1.1">1.1</a>. Requirements notation . . . . . . . . . . . . . . . . . . <a href="#page-3">3</a>
<a href="#section-2">2</a>. The Captive-Portal Option . . . . . . . . . . . . . . . . . . <a href="#page-3">3</a>
<a href="#section-2.1">2.1</a>. IPv4 DHCP Option . . . . . . . . . . . . . . . . . . . . <a href="#page-3">3</a>
<a href="#section-2.2">2.2</a>. IPv6 DHCP Option . . . . . . . . . . . . . . . . . . . . <a href="#page-4">4</a>
<a href="#section-2.3">2.3</a>. The Captive-Portal IPv6 RA Option . . . . . . . . . . . . <a href="#page-4">4</a>
<a href="#section-3">3</a>. IANA Considerations . . . . . . . . . . . . . . . . . . . . . <a href="#page-5">5</a>
<a href="#section-4">4</a>. Security Considerations . . . . . . . . . . . . . . . . . . . <a href="#page-5">5</a>
<a href="#section-5">5</a>. Normative References . . . . . . . . . . . . . . . . . . . . <a href="#page-6">6</a>
<a href="#section-6">6</a>. Informative References . . . . . . . . . . . . . . . . . . . <a href="#page-7">7</a>
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-7">7</a>
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-8">8</a>
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
In many environments, users need to connect to a captive-portal
device and agree to an Acceptable Use Policy (AUP) and/or provide
billing information before they can access the Internet. It is
anticipated that the IETF will work on a more fully featured protocol
at some point, to ease interaction with captive portals. Regardless
of how that protocol operates, it is expected that this document will
provide needed functionality because the client will need to know
when it is behind a captive portal and how to contact it.
In order to present users with the payment or AUP pages, the captive-
portal device has to intercept the user's connections and redirect
the user to the captive portal, using methods that are very similar
to man-in-the-middle (MITM) attacks. As increasing focus is placed
on security, and end nodes adopt a more secure stance, these
interception techniques will become less effective and/or more
intrusive.
<span class="grey">Kumari, et al. Standards Track [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc7710">RFC 7710</a> DHCP Captive-Portal December 2015</span>
This document describes a DHCP ([<a href="./rfc2131" title=""Dynamic Host Configuration Protocol"">RFC2131</a>]) option (Captive-Portal)
and an IPv6 Router Advertisement (RA) ([<a href="./rfc4861" title=""Neighbor Discovery for IP version 6 (IPv6)"">RFC4861</a>]) extension that
inform clients that they are behind a captive-portal device and how
to contact it.
<span class="h3"><a class="selflink" id="section-1.1" href="#section-1.1">1.1</a>. Requirements Notation</span>
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [<a href="./rfc2119" title=""Key words for use in RFCs to Indicate Requirement Levels"">RFC2119</a>].
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. The Captive-Portal Option</span>
The Captive-Portal DHCP/RA option informs the client that it is
behind a captive portal and provides the URI to access an
authentication page. This is primarily intended to improve the user
experience by getting them to the captive portal faster; for the
foreseeable future, captive portals will still need to implement the
interception techniques to serve legacy clients, and clients will
need to perform probing to detect captive portals.
In order to support multiple "classes" of clients (e.g., IPv4 only,
IPv6 only with DHCPv6 ([<a href="./rfc3315" title=""Dynamic Host Configuration Protocol for IPv6 (DHCPv6)"">RFC3315</a>]), IPv6 only with RA), the captive
portal can provide the URI via multiple methods (IPv4 DHCP, IPv6
DHCP, IPv6 RA). The captive-portal operator should ensure that the
URIs handed out are equivalent to reduce the chance of operational
problems. The maximum length of the URI that can be carried in IPv4
DHCP is 255 bytes, so URIs longer than 255 bytes should not be used
in IPv6 DHCP or IPv6 RA.
In order to avoid having to perform DNS interception, the URI SHOULD
contain an address literal. If the captive portal allows the client
to perform DNS requests to resolve the name, it is then acceptable
for the URI to contain a DNS name. The URI parameter is not null
terminated.
<span class="h3"><a class="selflink" id="section-2.1" href="#section-2.1">2.1</a>. IPv4 DHCP Option</span>
The format of the IPv4 Captive-Portal DHCP option is shown below.
Code Len Data
+------+------+------+------+------+-- --+-----+
| Code | Len | URI ... |
+------+------+------+------+------+-- --+-----+
o Code: The Captive-Portal DHCPv4 option (160) (one octet).
o Len: The length, in octets of the URI.
<span class="grey">Kumari, et al. Standards Track [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc7710">RFC 7710</a> DHCP Captive-Portal December 2015</span>
o URI: The contact URI for the captive portal that the user should
connect to (encoded following the rules in [<a href="./rfc3986" title=""Uniform Resource Identifier (URI): Generic Syntax"">RFC3986</a>]).
<span class="h3"><a class="selflink" id="section-2.2" href="#section-2.2">2.2</a>. IPv6 DHCP Option</span>
The format of the IPv6 Captive-Portal DHCP option is shown below.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| option-code | option-len |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
. URI (variable length) .
| ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
o option-code: The Captive-Portal DHCPv6 option (103) (two octets).
o option-len: The length, in octets of the URI.
o URI: The contact URI for the captive portal that the user should
connect to (encoded following the rules in [<a href="./rfc3986" title=""Uniform Resource Identifier (URI): Generic Syntax"">RFC3986</a>]).
See <a href="./rfc7227#section-5.7">Section 5.7 of [RFC7227]</a> for more examples of DHCP options with
URIs.
<span class="h3"><a class="selflink" id="section-2.3" href="#section-2.3">2.3</a>. The Captive-Portal IPv6 RA Option</span>
The format of the Captive-Portal Router Advertisement option is shown
below.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Length | URI .
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ .
. .
. .
. .
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
o Type: 37
o Length: 8-bit unsigned integer. The length of the option
(including the Type and Length fields) in units of 8 bytes.
<span class="grey">Kumari, et al. Standards Track [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="./rfc7710">RFC 7710</a> DHCP Captive-Portal December 2015</span>
o URI: The contact URI for the captive portal that the user should
connect to. For the reasons described above, the implementer
might want to use an IP address literal instead of a DNS name.
This should be padded with NULL (0x0) to make the total option
length (including the Type and Length fields) a multiple of 8
bytes.
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. IANA Considerations</span>
This document defines two DHCP Captive-Portal options, one for IPv4
and one for IPv6. An option code (160) has been assigned from the
"BOOTP Vendor Extensions and DHCP Options" registry
(<a href="http://www.iana.org/assignments/bootp-dhcp-parameters">http://www.iana.org/assignments/bootp-dhcp-parameters</a>), as specified
in [<a href="./rfc2939" title=""Procedures and IANA Guidelines for Definition of New DHCP Options and Message Types"">RFC2939</a>]. Also, an option code (103) has been assigned from the
"Option Codes" registry under DHCPv6 parameters
(<a href="http://www.iana.org/assignments/dhcpv6-parameters">http://www.iana.org/assignments/dhcpv6-parameters</a>).
IANA also has assigned an IPv6 RA Option Type code (37) from the
"IPv6 Neighbor Discovery Option Formats" registry under ICMPv6
parameters (<a href="http://www.iana.org/assignments/icmpv6-parameters">http://www.iana.org/assignments/icmpv6-parameters</a>).
Thanks, IANA!
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. Security Considerations</span>
An attacker with the ability to inject DHCP messages could include
this option and so force users to contact an address of his choosing.
As an attacker with this capability could simply list himself as the
default gateway (and so intercept all the victim's traffic), this
does not provide the attacker with significantly more capabilities,
but because this document removes the need for interception, the
attacker may have an easier time performing the attack. As the
operating systems and application that make use of this information
know that they are connecting to a captive-portal device (as opposed
to intercepted connections), they can render the page in a sandboxed
environment and take other precautions, such as clearly labeling the
page as untrusted. The means of sandboxing and how the user
interface presents this information are not covered in this document
-- by their nature, those are implementation specific and best left
to the application and user-interface designers.
Devices and systems that automatically connect to an open network
could potentially be tracked using the techniques described in this
document (forcing the user to continually authenticate, or exposing
their browser fingerprint). However, similar tracking can already be
performed with the standard captive-portal mechanisms, so this
technique does not give the attackers more capabilities.
<span class="grey">Kumari, et al. Standards Track [Page 5]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
<span class="grey"><a href="./rfc7710">RFC 7710</a> DHCP Captive-Portal December 2015</span>
Captive portals are increasingly hijacking TLS connections to force
browsers to talk to the portal. Providing the portal's URI via a
DHCP or RA option is a cleaner technique and reduces user
expectations of being hijacked; this may improve security by making
users more reluctant to accept TLS hijacking, which can be performed
from beyond the network associated with the captive portal.
By simplifying the interaction with the captive-portal systems and
doing away with the need for interception, we think that users will
be less likely to disable useful security safeguards like DNSSEC
validation, VPNs, etc. In addition, because the system knows that it
is behind a captive portal, it can know not to send cookies,
credentials, etc. By handing out a URI that is protected with TLS,
the captive-portal operator can attempt to reassure the user that the
captive portal is not malicious.
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. Normative References</span>
[<a id="ref-RFC2119">RFC2119</a>] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc2119">RFC 2119</a>,
DOI 10.17487/RFC2119, March 1997,
<<a href="http://www.rfc-editor.org/info/rfc2119">http://www.rfc-editor.org/info/rfc2119</a>>.
[<a id="ref-RFC2131">RFC2131</a>] Droms, R., "Dynamic Host Configuration Protocol",
<a href="./rfc2131">RFC 2131</a>, DOI 10.17487/RFC2131, March 1997,
<<a href="http://www.rfc-editor.org/info/rfc2131">http://www.rfc-editor.org/info/rfc2131</a>>.
[<a id="ref-RFC3315">RFC3315</a>] Droms, R., Ed., Bound, J., Volz, B., Lemon, T., Perkins,
C., and M. Carney, "Dynamic Host Configuration Protocol
for IPv6 (DHCPv6)", <a href="./rfc3315">RFC 3315</a>, DOI 10.17487/RFC3315, July
2003, <<a href="http://www.rfc-editor.org/info/rfc3315">http://www.rfc-editor.org/info/rfc3315</a>>.
[<a id="ref-RFC3986">RFC3986</a>] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform
Resource Identifier (URI): Generic Syntax", STD 66,
<a href="./rfc3986">RFC 3986</a>, DOI 10.17487/RFC3986, January 2005,
<<a href="http://www.rfc-editor.org/info/rfc3986">http://www.rfc-editor.org/info/rfc3986</a>>.
[<a id="ref-RFC4861">RFC4861</a>] Narten, T., Nordmark, E., Simpson, W., and H. Soliman,
"Neighbor Discovery for IP version 6 (IPv6)", <a href="./rfc4861">RFC 4861</a>,
DOI 10.17487/RFC4861, September 2007,
<<a href="http://www.rfc-editor.org/info/rfc4861">http://www.rfc-editor.org/info/rfc4861</a>>.
[<a id="ref-RFC7227">RFC7227</a>] Hankins, D., Mrugalski, T., Siodelski, M., Jiang, S., and
S. Krishnan, "Guidelines for Creating New DHCPv6 Options",
<a href="https://www.rfc-editor.org/bcp/bcp187">BCP 187</a>, <a href="./rfc7227">RFC 7227</a>, DOI 10.17487/RFC7227, May 2014,
<<a href="http://www.rfc-editor.org/info/rfc7227">http://www.rfc-editor.org/info/rfc7227</a>>.
<span class="grey">Kumari, et al. Standards Track [Page 6]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
<span class="grey"><a href="./rfc7710">RFC 7710</a> DHCP Captive-Portal December 2015</span>
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. Informative References</span>
[<a id="ref-RFC2939">RFC2939</a>] Droms, R., "Procedures and IANA Guidelines for Definition
of New DHCP Options and Message Types", <a href="https://www.rfc-editor.org/bcp/bcp43">BCP 43</a>, <a href="./rfc2939">RFC 2939</a>,
DOI 10.17487/RFC2939, September 2000,
<<a href="http://www.rfc-editor.org/info/rfc2939">http://www.rfc-editor.org/info/rfc2939</a>>.
Acknowledgements
Thanks to Vint Cerf for asking for this document to be written.
Thanks to Wes George for supplying the IPv6 text. Thanks to Lorenzo
and Erik for the V6 RA kick in the pants.
Thanks to Fred Baker, Paul Hoffman, Barry Leiba, Ted Lemon, Martin
Nilsson, Ole Troan, and Asbjorn Tonnesen for detailed reviews and
comments. Thanks for David Black for review and providing text for
the security considerations. Also, great thanks to Joel Jaeggli for
providing feedback and text.
<span class="grey">Kumari, et al. Standards Track [Page 7]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
<span class="grey"><a href="./rfc7710">RFC 7710</a> DHCP Captive-Portal December 2015</span>
Authors' Addresses
Warren Kumari
Google
1600 Amphitheatre Parkway
Mountain View, CA 94043
United States
Email: warren@kumari.net
Olafur Gudmundsson
CloudFlare
San Francisco, CA 94107
United States
Email: olafur@cloudflare.com
Paul Ebersman
Comcast
Email: ebersman-ietf@dragon.net
Steve Sheng
Internet Corporation for Assigned Names and Numbers
12025 Waterfront Drive, Suite 300
Los Angeles, CA 90094
United States
Phone: +1.310.301.5800
Email: steve.sheng@icann.org
Kumari, et al. Standards Track [Page 8]
</pre>
|