idnits 2.17.00 (12 Aug 2021) /tmp/idnits51480/draft-wkumari-dhc-capport-12.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (March 04, 2015) is 2635 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Missing Reference: 'RFC2939' is mentioned on line 359, but not defined ** Obsolete normative reference: RFC 3315 (Obsoleted by RFC 8415) Summary: 1 error (**), 0 flaws (~~), 2 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group W. Kumari 3 Internet-Draft Google 4 Intended status: Standards Track O. Gudmundsson 5 Expires: September 5, 2015 CloudFlare 6 P. Ebersman 7 Comcast 8 S. Sheng 9 ICANN 10 March 04, 2015 12 Captive-Portal identification in DHCP / RA 13 draft-wkumari-dhc-capport-12 15 Abstract 17 In many environments offering short-term or temporary Internet access 18 (such as coffee shops), it is common to start new connections in a 19 captive portal mode. This highly restricts what the customer can do 20 until the customer has authenticated. 22 This document describes a DHCP option (and a RA extension) to inform 23 clients that they are behind some sort of captive portal device, and 24 that they will need to authenticate to get Internet Access. 26 Status of This Memo 28 This Internet-Draft is submitted in full conformance with the 29 provisions of BCP 78 and BCP 79. 31 Internet-Drafts are working documents of the Internet Engineering 32 Task Force (IETF). Note that other groups may also distribute 33 working documents as Internet-Drafts. The list of current Internet- 34 Drafts is at http://datatracker.ietf.org/drafts/current/. 36 Internet-Drafts are draft documents valid for a maximum of six months 37 and may be updated, replaced, or obsoleted by other documents at any 38 time. It is inappropriate to use Internet-Drafts as reference 39 material or to cite them other than as "work in progress." 41 This Internet-Draft will expire on September 5, 2015. 43 Copyright Notice 45 Copyright (c) 2015 IETF Trust and the persons identified as the 46 document authors. All rights reserved. 48 This document is subject to BCP 78 and the IETF Trust's Legal 49 Provisions Relating to IETF Documents 50 (http://trustee.ietf.org/license-info) in effect on the date of 51 publication of this document. Please review these documents 52 carefully, as they describe your rights and restrictions with respect 53 to this document. Code Components extracted from this document must 54 include Simplified BSD License text as described in Section 4.e of 55 the Trust Legal Provisions and are provided without warranty as 56 described in the Simplified BSD License. 58 Table of Contents 60 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 61 1.1. Requirements notation . . . . . . . . . . . . . . . . . . 3 62 2. Background . . . . . . . . . . . . . . . . . . . . . . . . . 3 63 2.1. DNS Redirection . . . . . . . . . . . . . . . . . . . . . 4 64 2.2. HTTP Redirection . . . . . . . . . . . . . . . . . . . . 4 65 2.3. IP Hijacking . . . . . . . . . . . . . . . . . . . . . . 4 66 3. The Captive-Portal Option . . . . . . . . . . . . . . . . . . 5 67 3.1. IPv4 DHCP Option . . . . . . . . . . . . . . . . . . . . 5 68 3.2. IPv6 DHCP Option . . . . . . . . . . . . . . . . . . . . 6 69 4. The Captive-Portal IPv6 RA Option . . . . . . . . . . . . . . 6 70 5. Use of the Captive-Portal Option . . . . . . . . . . . . . . 7 71 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 72 7. Security Considerations . . . . . . . . . . . . . . . . . . . 8 73 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 9 74 9. Normative References . . . . . . . . . . . . . . . . . . . . 9 75 Appendix A. Changes / Author Notes. . . . . . . . . . . . . . . 10 76 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 12 78 1. Introduction 80 In many environments, users need to connect to a captive portal 81 device and agree to an acceptable use policy and / or provide billing 82 information before they can access the Internet. 84 Many devices perform DNS, HTTP, and / or IP hijacks in order to 85 present the user with the captive portal web page. These workarounds 86 and techniques resemble attacks that DNSSEC and TLS are intended to 87 protect against. This document describe a DHCP ([RFC2131]) option 88 (Captive Portal) and an IPv6 Router Advertisement (RA) ([RFC4861]) 89 extension that informs clients that they are behind a captive portal 90 device and how to contact it. 92 This document neither condones nor condemns the use of captive 93 portals; instead, it recognises that their apparent necessity, and 94 attempts to improve the user experience. 96 [ Ed note: This solution is somewhat similar / complements 802.11u / 97 WiFi Passpoint Online Sign-up, but is much simpler, easier to deploy, 98 and works on wired as well ] 100 1.1. Requirements notation 102 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 103 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 104 document are to be interpreted as described in [RFC2119]. 106 2. Background 108 Some ISPs implement a captive portal (CP) - a system that intercepts 109 user requests and redirects them to an interstitial login page - in 110 order to require the user accept an Acceptable Use Policy (AUP), 111 provide billing information, or otherwise authenticate a user prior 112 to allowing them to access the Internet. 114 Captive portals intercept and redirect user requests in a number of 115 ways, including: 117 o DNS Redirection 119 o IP Redirection 121 o HTTP Redirection 123 o Restricted scope addresses 125 o Traffic blocking (until the user is authenticated) 127 In order to ensure that the user is unable to access the Internet 128 until they have satisfied the requirements, captive portals usually 129 implement IP based filters, or place the user into a restricted VLAN 130 (or restricted IP range) until after they have been authorized / 131 satisfied. 133 These techniques are very similar to attacks that protocols (such as 134 VPNs, DNSSEC, TLS) are designed to protect against. The interaction 135 of these protections and the interception leads to poor user 136 experiences, such as long timeouts, inability to reach the captive 137 portal web page, etc. The interception may also leak user 138 information (for example, if the captive portal intercepts and logs 139 an HTTP Cookie, or URL of the form http://fred:password@example.com). 140 The user is often unaware of what is causing the issue (their browser 141 appears to hang, saying something like "Downloading Proxy Script", or 142 simply "The Internet doesn't work"), and they become frustrated. 143 This may result in them not purchasing the Internet access provided 144 by the captive portal. The connectivity attempts may also facilitate 145 OS fingerprinting even before a client attempts to connect to the 146 portal itself. 148 2.1. DNS Redirection 150 The CP either intercepts all DNS traffic or advertises itself (for 151 example using DHCP) as the recursive server for the network. Until 152 the user has authenticated to the captive portal, the CP responds to 153 all DNS requests listing the address of its web portal. Once the 154 user has authenticated, the CP returns the "correct" addresses. 156 This technique has many shortcomings. It fails if the client is 157 performing DNSSEC validation, is running their own resolver, is using 158 a VPN, or already has the DNS information cached. 160 2.2. HTTP Redirection 162 In this implementation, the CP acts like a transparent HTTP proxy; 163 but when it sees an HTTP request from an unauthenticated client using 164 HTTP/1.0, it intercepts the request and responds with an HTTP status 165 code 302 to redirect the client to the Captive Portal Login. If the 166 client is using HTTP/1.1, we respond with a status code 303 See 167 Other. 169 This technique has a number of issues, including: 171 o It fails if the user is only using HTTPS. 173 o It exposes various private user information, such as HTTP Cookies, 174 etc. 176 o It doesn't work if the client has a VPN and / or proxies their web 177 traffic to an external web proxy. 179 2.3. IP Hijacking 181 In this scenario, the captive portal intercepts connections to any IP 182 address. It spoofs the destination IP address and "pretends" to be 183 whatever the user tried to access. 185 This technique has issues similar to the HTTP solution, but may also 186 break other protocols, and may expose more of the user's private 187 information. 189 3. The Captive-Portal Option 191 The Captive Portal DHCP / RA Option informs the client that it is 192 behind a captive portal and provides the URI to access an 193 authentication page. This is primarily intended to improve the user 194 experience; for the foreseeable future (until such time that most 195 systems implement this technique) captive portals will still need to 196 implement the interception techniques to serve legacy clients. 198 In order to support multiple "classes" of clients (e.g: IPv4 only, 199 IPv6 only with DHCPv6([RFC3315]), IPv6 only with RA) the captive 200 portal can provide the URI via multiple methods (IPv4 DHCP, IPv6 201 DHCP, IPv6 RA). The captive portal operator should ensure that the 202 URIs handed out are equivalent to reduce the chance of operational 203 problems. 205 In order to avoid having to perform DNS interception, the URI SHOULD 206 contain an address literal, but MAY contain a DNS name if the captive 207 portal allows the client to perform DNS requests to resolve the name. 209 [ED NOTE: Using an address literal is less than ideal, but better 210 than the alternatives. Recommending a DNS name means that the CP 211 would need to allow DNS from unauthenticated clients (as we don't 212 want to force users to use the CP's provided DNS) and some users 213 would use this to DNS Tunnel out, which may make the CP admin block 214 external recursives). DNS is needed to allow operators to serve SSL/ 215 TLS for e.g billing (certificates with IP addresses are frowned upon 216 :-))] 218 3.1. IPv4 DHCP Option 220 The format of the IPv4 Captive-Portal DHCP option is shown below. 222 Code Len Data 223 +------+------+------+------+------+-- --+-----+ 224 | code | len | URI ... | 225 +------+------+------+------+------+-- --+-----+ 227 o Code: The Captive-Portal DHCPv4 Option (TBA1) (one octet) 229 o Len: The length, in octets of the URI. 231 o URI: The URI of the authentication page that the user should 232 connect to. 234 3.2. IPv6 DHCP Option 236 The format of the IPv6 Captive-Portal DHCP option is shown below. 238 0 1 2 3 239 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 240 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 241 | option-code | option-len | 242 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 243 . URI (variable length) . 244 | ... | 245 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 247 o option-code: The Captive-Portal DHCPv6Option (TBA2) (two octets) 249 o option-len: The length, in octets of the URI. 251 o URI: The URI of the authentication page that the user should 252 connect to. 254 See [RFC7227], Section 5.7 for more examples of DHCP Options with 255 URIs. 257 4. The Captive-Portal IPv6 RA Option 259 This section describes the Captive-Portal Router Advertisement 260 option. 262 0 1 2 3 263 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 264 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 265 | Type | Length | URI . 266 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ . 267 . . 268 . . 269 . . 270 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 271 Figure 2: Captive-Portal RA Option Format 273 Type TBA3 275 Length 8-bit unsigned integer. The length of the option (including 276 the Type and Length fields) in units of 8 bytes. 278 URI The URI of the authentication page that the user should connect 279 to. For the reasons described above, the implementer might want 280 to use an IP address literal instead of a DNS name. This should 281 be padded with NULL (0x0) to make the total option length 282 (including the Type and Length fields) a multiple of 8 bytes. 284 5. Use of the Captive-Portal Option 286 [ED NOTE: This option provides notice to the OS / User applications 287 that there is a CP. Because of differences in UI design between 288 Operating Systems, the exact behaviour by OS and Applications is left 289 to the OS vendor/Application Developer.] 291 The purpose of the Captive-Portal Option is to inform the operating 292 system and applications that they are behind a captive portal type 293 device and will need to authenticate before getting network access 294 (and how to reach the authentication page). What is done with this 295 information is left up to the operating system and application 296 vendors. This document provides a very high level example of what 297 could be done with this information. 299 Many operating systems / applications already include a "connectivity 300 test" to determine if they are behind a captive portal (for example, 301 attempting to fetch a specific URL and looking for a specific string 302 (such as "Success"). These tests sometimes fail or take a long time 303 to determine when they are behind a CP, but are usually effective for 304 determining that the captive portal has been satisfied. These tests 305 will continue to be needed, because there is currently no definitive 306 signal from the captive portal that it has been satisfied. [ Editor 307 note: It may be useful to write another document that specifies how a 308 client can determine that it has passed the CP. This document could 309 also contain advice to implementors on only intercepting actually 310 needed ports, how to advertise that the CP needs to be satisfied 311 *again*, etc. This should not be done in this document though. ] The 312 connectivity test may also need to be used if the captive portal 313 times out the user session and needs the user to re-authenticate. 314 The operating system may still find the information about the captive 315 portal URI useful in this case. 317 When the device is informed that it is behind a captive portal on a 318 particular network interface, it should: 320 1. Not initiate new IP connections through that interface until 321 until the CP has been satisfied (other than those to the captive 322 portal browser session and connectivity checks). Existing 323 connections should be quiesced (this will happen more often than 324 some expect -- for example, the user purchases 1 hour of Internet 325 at a cafe and stays there for 3 hours -- this will "interrupt" 326 the user a few times). 328 2. Present a dialog box to the user informing them that they are 329 behind a captive portal and ask if they wish to proceed. 331 3. If the user elects to proceed, the device should initiate a 332 connection to the captive portal login page using a web browser 333 configured with a separate cookie store, and without a proxy 334 server. If there is a VPN in place, this connection should be 335 made outside of the VPN and the user should be informed that 336 connection is outside the VPN. Some captive portals send the 337 user a cookie when they authenticate (so that the user can re- 338 authenticate more easily in the future) - the browser should keep 339 these CP cookies separate from other cookies. 341 4. Once the user has authenticated, normal IP connectivity should 342 resume. The CP success page should contain a string, e.g 343 "CP_SATISFIED." The OS can then use this string to provide 344 further information to the user. 346 5. The device should (using an OS dependent method) expose to the 347 user / user applications that they have connected though a 348 captive portal (for example by creating a file in /proc/net/ 349 containing the interface and captive portal URI). This should 350 continue until the network changes, or a new DHCP message without 351 the CP is received. 353 6. IANA Considerations 355 This document defines two DHCP Captive-Portal options, one for IPv6 356 and one for IPv6. It requires assignment of an option code (TBA1) to 357 be assigned from "Bootp and DHCP options" registry (http://www.iana 358 .org/assignments/ bootp-dhcp-parameters/bootp-dhcp-parameters.xml), 359 as specified in [RFC2939]. It also requires assignment of an option 360 code (TBA2) from the "DHCPv6 and DHCPv6 options" registry 361 (http://www.iana.org/assignments/dhcpv6-parameters/ 362 dhcpv6-parameters.xml). 364 IANA is also requested to assign an IPv6 RA Option Type code (TBA3) 365 from the "IPv6 Neighbor Discovery Option Formats" registry. Thanks 366 IANA! 368 7. Security Considerations 370 An attacker with the ability to inject DHCP messages could include 371 this option and so force users to contact an address of his choosing. 372 As an attacker with this capability could simply list himself as the 373 default gateway (and so intercept all the victim's traffic), this 374 does not provide them with significantly more capabilities. Fake 375 DHCP servers / fake RAs are currently a security concern - this 376 doesn't make them any better or worse. 378 Devices and systems that automatically connect to an open network 379 could potentially be tracked using the techniques described in this 380 document (forcing the user to continually authenticate, or exposing 381 their browser fingerprint.) However, similar tracking can already be 382 performed with the standard captive portal mechanisms, so this 383 technique does not give the attackers more capabilities. 385 By simplifying the interaction with the captive portal systems, and 386 doing away with the need for interception, we think that users will 387 be less likely to disable useful security safeguards like DNSSEC 388 validation, VPNs, etc. In addition, because the system knows that it 389 is behind a captive portal, it can know not to send cookies, 390 credentials, etc. Redirection to a portal where TLS can be used 391 without hijacking can ameliorate some of the implications of 392 connecting to a potentially malicious captive portal. 394 8. Acknowledgements 396 Thanks to Vint Cerf for the initial idea / asking me to write this. 397 Thanks to Wes George for supplying the IPv6 text. Thanks to Lorenzo 398 and Erik for the V6 RA kick in the pants. 400 Thanks to Fred Baker, Ted Lemon, Ole Troan and Asbjorn Tonnesen for 401 detailed review and comments. Also great thanks to Joel Jaeggli for 402 providing feedback and text. 404 9. Normative References 406 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 407 Requirement Levels", BCP 14, RFC 2119, March 1997. 409 [RFC2131] Droms, R., "Dynamic Host Configuration Protocol", RFC 410 2131, March 1997. 412 [RFC3315] Droms, R., Bound, J., Volz, B., Lemon, T., Perkins, C., 413 and M. Carney, "Dynamic Host Configuration Protocol for 414 IPv6 (DHCPv6)", RFC 3315, July 2003. 416 [RFC4861] Narten, T., Nordmark, E., Simpson, W., and H. Soliman, 417 "Neighbor Discovery for IP version 6 (IPv6)", RFC 4861, 418 September 2007. 420 [RFC7227] Hankins, D., Mrugalski, T., Siodelski, M., Jiang, S., and 421 S. Krishnan, "Guidelines for Creating New DHCPv6 Options", 422 BCP 187, RFC 7227, May 2014. 424 Appendix A. Changes / Author Notes. 426 [RFC Editor: Please remove this section before publication ] 428 From -11 to -12: 430 o Integrated a whole bunch of comments from Ted Lemon, including 431 missing references, track, missing size of DHCP option, 433 From 10 to 11: 435 o Updared Olafur's affiliation. 437 From 09 to 10: 439 o Ted Lemon and Joel Jaeggli: there's no benefit to insisting on an 440 ordering. I think you should just say that the ordering is 441 indeterminate, and if different mechanisms give non-equivalent 442 answers, this is likely to cause operational problems in practice. 444 From 08 to 09: 446 o Put back the DHCPv6 option, and made the fact that is separate 447 from the DHCPv4 option clearer (Ted Lemon) 449 From 07 to 08: 451 o Incorporated comments from Ted Lemon. Made the document much 452 shorter. 454 o Some cleanup. 456 From 06 to 07: 458 o Incoroprated a bunch of comments from Asbjorn Tonnesen 460 o Clarified that this document is only for the DHCP bits, not 461 everything. 463 o CP's *can* do HTTP redirects to DNS banes, as long as they allow 464 access to all needed services. 466 From 05 to 06: 468 o Integrated comments from Joel, as below 470 o Better introduction text, around the "kludgy hacks" section. 472 o Better "neither condones nor condems" text 474 o Fingerprint text. 476 o Some discussions on the v4 literal stuff. 478 o More Security Consideration text. 480 From 04 to 05: 482 o Integrated comments, primarily from Fred Baker. 484 From 03 to 04: 486 o Some text cleanup for readability. 488 o Some disclaimers about it working better on initial connection 489 versus CP timeout. 491 o Some more text explaining that CP interception is 492 indistinguishable from an attack. 494 o Connectivity Check test. 496 o Posting just before the draft cutoff - "I love deadlines. I love 497 the whooshing noise they make as they go by." -- Douglas Adams, 498 The Salmon of Doubt 500 From -02 to 03: 502 o Removed the DHCPv6 stuff (as suggested / requested by Erik Kline) 504 o Simplified / cleaned up text (I'm inclined to waffle on, then trim 505 the fluff) 507 o This was written on a United flight with in-flight WiFi - 508 unfortunately I couldn't use it because their CP was borked. :-P 510 From -01 to 02: 512 o Added the IPv6 RA stuff. 514 From -00 to -01: 516 o Many nits and editorial changes. 518 o Whole bunch of extra text and review from Wes George on v6. 520 From initial to -00. 522 o Nothing changed in the template! 524 Authors' Addresses 526 Warren Kumari 527 Google 528 1600 Amphitheatre Parkway 529 Mountain View, CA 94043 530 US 532 Email: warren@kumari.net 534 Olafur Gudmundsson 535 CloudFlare 536 San Francisco, CA 94107 537 USA 539 Email: olafur@cloudflare.com 541 Paul Ebersman 542 Comcast 544 Email: ebersman-ietf@dragon.net 546 Steve Sheng 547 Internet Corporation for Assigned Names and Numbers 548 12025 Waterfront Drive, Suite 300 549 Los Angeles 90094 550 United States of America 552 Phone: +1.310.301.5800 553 Email: steve.sheng@icann.org