Captive-Portal Identification in DHCP and Router Advertisements (RAs)Google1600 Amphitheatre ParkwayMountain ViewCA94043United States of Americawarren@kumari.netLoon1600 Amphitheatre ParkwayMountain ViewCA94043United States of Americaek@loon.comCaptive Portal InteractionCaptive PortalWalled GardenCoffee-shopHotelIn 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 user can do
until the user has satisfied the captive portal conditions.This document describes a DHCPv4 and DHCPv6 option and a Router Advertisement
(RA) option to inform clients that they are behind some sort of
captive portal enforcement device, and that they will need to satisfy the
Captive Portal conditions 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 one
component of a standardized approach for hosts to interact with such
portals. While this document defines how the network operator may convey
the captive portal API endpoint to hosts, the specific methods of
satisfying and interacting with the captive portal are out of
scope of this document.This document replaces RFC 7710, which used DHCP code point 160.
Due to a conflict, this document specifies 114. Consequently, this
document also updates RFC 3679.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 Section 2 of
RFC 7841.
Information about the current status of this document, any
errata, and how to provide feedback on it may be obtained at
.
Copyright Notice
Copyright (c) 2020 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
() 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
. Introduction
. Requirements Notation
. The Captive-Portal Option
. IPv4 DHCP Option
. IPv6 DHCP Option
. The Captive-Portal IPv6 RA Option
. Precedence of API URIs
. IANA Considerations
. Captive Portal Unrestricted Identifier
. BOOTP Vendor Extensions and DHCP Options Code Change
. Update DHCPv6 and IPv6 ND Options Registries
. Security Considerations
. References
. Normative References
. Informative References
. Changes from RFC 7710
. Observations from IETF 106 Network Experiment
Acknowledgements
Authors' Addresses
IntroductionIn 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. Regardless of
how that mechanism operates, this document provides functionality
to allow the client 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, a captive
portal enforcement device presently has to intercept the user's connections and
redirect the user to a captive portal server, 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.This document describes a DHCPv4 and DHCPv6
option (Captive-Portal) and an IPv6
Router Advertisement (RA) option that informs
clients that they are behind a captive portal enforcement device and
the API endpoint that the host can contact for more information.This document replaces RFC 7710 , which used DHCP code point 160. Due to a conflict,
this document specifies 114. Consequently, this document also updates
.Requirements Notation
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
when, and only when, they appear in all capitals, as shown here.
The Captive-Portal OptionThe Captive-Portal DHCP/RA Option informs the client that it may be
behind a captive portal and provides the URI to access an API as defined
by . This is primarily intended to improve the
user experience by showing the user the captive portal information faster and more
reliably. Note that, for the foreseeable future, captive portals will
still need to implement interception techniques to serve legacy
clients, and clients will need to perform probing to detect captive
portals; nonetheless, the mechanism provided by this document provides
a more reliable and performant way to do so, and is therefore the preferred
mechanism for captive portal detection.Clients that support the Captive Portal DHCP option SHOULD include the
option in the Parameter Request List in DHCPREQUEST messages. DHCP servers
MAY send the Captive Portal option without any explicit request.In order to support multiple "classes" of clients (e.g., IPv4 only,
IPv6 only with DHCPv6 (), and
IPv6 only with RA), the captive network can provision the client with the
URI via multiple methods (IPv4 DHCP, IPv6 DHCP, and IPv6 RA). The
captive portal operator SHOULD ensure that the URIs
provisioned by each method are identical to reduce the chance of
operational problems. As the maximum length of the URI that can be
carried in IPv4 DHCP is 255 bytes, URIs longer than this SHOULD NOT be provisioned by any of the IPv6 options described in this
document. In IPv6-only environments, this restriction can be
relaxed.In all variants of this option, the URI MUST be that of the captive
portal API endpoint ().
A captive portal MAY do content negotiation () and attempt to
redirect clients querying without an explicit indication of support for
the captive portal API content type (i.e., without
application/capport+json listed explicitly anywhere within an Accept
header field as described in ). In so doing, the captive portal SHOULD
redirect the client to the value associated with the "user-portal-url"
API key. When performing such content negotiation (), implementors of
captive portals need to keep in mind that such responses might be
cached, and therefore SHOULD include an appropriate Vary
header field () or set the Cache-Control header field in any
responses to "private" or a more restrictive value such as "no-store"
().
The URI SHOULD NOT contain an IP address literal. Exceptions to this
might include networks with only one operational IP address family where
DNS is either not available or not fully functional until the captive
portal has been satisfied. Use of IP Address certificates ()
adds considerations that are out of scope for this document.Networks with no captive portals may explicitly indicate this
condition by using this option with the IANA-assigned URI for this
purpose. Clients observing the URI value
"urn:ietf:params:capport:unrestricted" may forego time-consuming forms of
captive portal detection.IPv4 DHCP OptionThe format of the IPv4 Captive-Portal DHCP option is shown
below.
Code:
The Captive-Portal DHCPv4 Option (114) (one octet).
Len:
The length (one octet), in octets, of the URI.
URI:
The URI for the captive portal API endpoint to which the
user should connect (encoded following the rules in ).
See for more on the format
of IPv4 DHCP options.Note that the URI parameter is not null terminated.IPv6 DHCP OptionThe format of the IPv6 Captive-Portal DHCP option is shown below.
option-code:
The Captive-Portal DHCPv6 Option (103) (two octets).
option-len:
The unsigned 16-bit length, in octets, of the URI.
URI:
The URI for the captive portal API endpoint to which the user should
connect (encoded following the rules in ).
See for
more examples of DHCP Options with URIs. See for more on the format of IPv6
DHCP options.Note that the URI parameter is not null terminated.As the maximum length of the URI that can be carried in IPv4 DHCP is
255 bytes, URIs longer than this SHOULD NOT be provisioned via
IPv6 DHCP options.The Captive-Portal IPv6 RA OptionThis section describes the Captive-Portal Router Advertisement
option.
Type:
37
Length:
8-bit unsigned integer. The length of the
option (including the Type and Length fields) in units of 8
bytes.
URI:
The URI for the captive portal API endpoint to
which the user should connect. This MUST be padded with NUL
(0x00) to make the total option length (including the Type and
Length fields) a multiple of 8 bytes.
Note that the URI parameter is not guaranteed to be null terminated.As the maximum length of the URI that can be carried in IPv4 DHCP is
255 bytes, URIs longer than this SHOULD NOT be provisioned via
IPv6 RA options.Precedence of API URIsA device may learn about Captive Portal API URIs through more than
one of (or indeed all of) the above options. Implementations can select
their own precedence order (e.g., prefer one of the IPv6 options before
the DHCPv4 option, or vice versa, et cetera).If the URIs learned via more than one option described in are not all identical, this condition should be logged
for the device owner or administrator; it is a network configuration error
if the learned URIs are not all identical.IANA ConsiderationsIANA has registered a new IETF URN protocol parameter (). IANA has also reallocated two
DHCPv4 option codes (see for
background) and updated the references for previously registered DHCPv6
and IPv6 ND options.Captive Portal Unrestricted IdentifierIANA has registered a new entry in the "IETF URN Sub-namespace
for Registered Protocol Parameter Identifiers" registry defined in
:
Registered Parameter Identifier:
capport:unrestricted
Reference:
RFC 8910
IANA Registry Reference:
RFC 8910
Only one value is defined (see URN above). No hierarchy is defined
and, therefore, no sub-namespace registrations are possible.BOOTP Vendor Extensions and DHCP Options Code ChangeIANA has updated the "BOOTP Vendor Extensions and DHCP
Options" registry ()
as follows.
Tag:
114
Name:
DHCP Captive-Portal
Data Length:
N
Meaning:
DHCP Captive-Portal
Reference:
RFC 8910
Tag:
160
Name:
Unassigned
Data Length:
Meaning:
Previously assigned by ; known to also be used by Polycom.
Reference:
RFC 8910
Update DHCPv6 and IPv6 ND Options RegistriesIANA has updated the DHCPv6 (103 - DHCP Captive-Portal) and IPv6 ND
(37 - DHCP Captive-Portal) options previously
registered in to reference this
document.Security ConsiderationsBy removing or reducing the need for captive portals to perform
MITM hijacking, this mechanism improves security by
making the portal and its actions visible, rather than hidden, and
reduces the likelihood that users will disable useful security
safeguards like DNSSEC validation, VPNs, etc. in order to interact with
the captive portal. 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.Clients processing these options SHOULD validate that the option's
contents conform to the validation requirements for URIs, including
those described in
.Each of the options described in this document is presented to a
node using the same protocols used to provision other information
critical to the node's successful configuration on a network. The
security considerations applicable to each of these provisioning
mechanisms also apply when the node is attempting to learn the
information conveyed in these options. In the absence of security
measures like RA-Guard (, ) or DHCPv6-Shield , an attacker could inject, modify,
or block DHCP messages or RAs.An attacker with the ability to inject DHCP messages or RAs
could include an option from this document to force users to contact
an address of the attacker's choosing. An attacker with this capability could
simply list themselves as the default gateway (and so intercept all the
victim's traffic); this does not provide them with significantly more
capabilities, but because this document removes the need for
interception, the attacker may have an easier time performing the
attack.However, as the operating systems and application(s) that make use of
this information know that they are connecting to a captive portal
device (as opposed to intercepted connections where the OS/application
may not know that they are connecting to a captive portal or hostile
device), 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 a user interface presenting this information is
not covered in this document; by its nature, it is 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 resatisfy the Captive Portal
conditions or exposing their browser fingerprint). However,
similar tracking can already be performed with the presently common
captive portal mechanisms, so this technique does not give the attackers
more capabilities.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.ReferencesNormative ReferencesKey words for use in RFCs to Indicate Requirement LevelsIn many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.Dynamic Host Configuration ProtocolThe Dynamic Host Configuration Protocol (DHCP) provides a framework for passing configuration information to hosts on a TCPIP network. DHCP is based on the Bootstrap Protocol (BOOTP), adding the capability of automatic allocation of reusable network addresses and additional configuration options. [STANDARDS-TRACK]DHCP Options and BOOTP Vendor ExtensionsThis document specifies the current set of DHCP options. Future options will be specified in separate RFCs. The current list of valid options is also available in ftp://ftp.isi.edu/in-notes/iana/assignments. [STANDARDS-TRACK]An IETF URN Sub-namespace for Registered Protocol ParametersThis document describes a new sub-delegation for the 'ietf' URN namespace for registered protocol items. The 'ietf' URN namespace is defined in RFC 2648 as a root for persistent URIs that refer to IETF- defined resources. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.Uniform Resource Identifier (URI): Generic SyntaxA Uniform Resource Identifier (URI) is a compact sequence of characters that identifies an abstract or physical resource. This specification defines the generic URI syntax and a process for resolving URI references that might be in relative form, along with guidelines and security considerations for the use of URIs on the Internet. The URI syntax defines a grammar that is a superset of all valid URIs, allowing an implementation to parse the common components of a URI reference without knowing the scheme-specific requirements of every possible identifier. This specification does not define a generative grammar for URIs; that task is performed by the individual specifications of each URI scheme. [STANDARDS-TRACK]Neighbor Discovery for IP version 6 (IPv6)This document specifies the Neighbor Discovery protocol for IP Version 6. IPv6 nodes on the same link use Neighbor Discovery to discover each other's presence, to determine each other's link-layer addresses, to find routers, and to maintain reachability information about the paths to active neighbors. [STANDARDS-TRACK]Guidelines for Creating New DHCPv6 OptionsThis document provides guidance to prospective DHCPv6 option developers to help them create option formats that are easily adoptable by existing DHCPv6 software. It also provides guidelines for expert reviewers to evaluate new registrations. This document updates RFC 3315.Hypertext Transfer Protocol (HTTP/1.1): Semantics and ContentThe Hypertext Transfer Protocol (HTTP) is a stateless \%application- level protocol for distributed, collaborative, hypertext information systems. This document defines the semantics of HTTP/1.1 messages, as expressed by request methods, request header fields, response status codes, and response header fields, along with the payload of messages (metadata and body content) and mechanisms for content negotiation.Hypertext Transfer Protocol (HTTP/1.1): CachingThe Hypertext Transfer Protocol (HTTP) is a stateless \%application- level protocol for distributed, collaborative, hypertext information systems. This document defines HTTP caches and the associated header fields that control cache behavior or indicate cacheable response messages.Ambiguity of Uppercase vs Lowercase in RFC 2119 Key WordsRFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.Dynamic Host Configuration Protocol for IPv6 (DHCPv6)This document describes the Dynamic Host Configuration Protocol for IPv6 (DHCPv6): an extensible mechanism for configuring nodes with network configuration parameters, IP addresses, and prefixes. Parameters can be provided statelessly, or in combination with stateful assignment of one or more IPv6 addresses and/or IPv6 prefixes. DHCPv6 can operate either in place of or in addition to stateless address autoconfiguration (SLAAC).This document updates the text from RFC 3315 (the original DHCPv6 specification) and incorporates prefix delegation (RFC 3633), stateless DHCPv6 (RFC 3736), an option to specify an upper bound for how long a client should wait before refreshing information (RFC 4242), a mechanism for throttling DHCPv6 clients when DHCPv6 service is not available (RFC 7083), and relay agent handling of unknown messages (RFC 7283). In addition, this document clarifies the interactions between models of operation (RFC 7550). As such, this document obsoletes RFC 3315, RFC 3633, RFC 3736, RFC 4242, RFC 7083, RFC 7283, and RFC 7550.Informative ReferencesUnused Dynamic Host Configuration Protocol (DHCP) Option CodesPrior to the publication of RFC 2489 (which was updated by RFC 2939), several option codes were assigned to proposed Dynamic Host Configuration Protocol (DHCP) options that were subsequently never used. This document lists those unused option codes and directs IANA to make these option codes available for assignment to other DHCP options in the future. The document also lists several option codes that are not currently documented in an RFC but should not be made available for reassignment to future DHCP options.X.509 Extensions for IP Addresses and AS IdentifiersThis document defines two X.509 v3 certificate extensions. The first binds a list of IP address blocks, or prefixes, to the subject of a certificate. The second binds a list of autonomous system identifiers to the subject of a certificate. These extensions may be used to convey the authorization of the subject to use the IP addresses and autonomous system identifiers contained in the extensions. [STANDARDS-TRACK]IPv6 Router Advertisement GuardRouted protocols are often susceptible to spoof attacks. The canonical solution for IPv6 is Secure Neighbor Discovery (SEND), a solution that is non-trivial to deploy. This document proposes a light-weight alternative and complement to SEND based on filtering in the layer-2 network fabric, using a variety of filtering criteria, including, for example, SEND status. This document is not an Internet Standards Track specification; it is published for informational purposes.Implementation Advice for IPv6 Router Advertisement Guard (RA-Guard)The IPv6 Router Advertisement Guard (RA-Guard) mechanism is commonly employed to mitigate attack vectors based on forged ICMPv6 Router Advertisement messages. Many existing IPv6 deployments rely on RA-Guard as the first line of defense against the aforementioned attack vectors. However, some implementations of RA-Guard have been found to be prone to circumvention by employing IPv6 Extension Headers. This document describes the evasion techniques that affect the aforementioned implementations and formally updates RFC 6105, such that the aforementioned RA-Guard evasion vectors are eliminated.DHCPv6-Shield: Protecting against Rogue DHCPv6 ServersThis document specifies a mechanism for protecting hosts connected to a switched network against rogue DHCPv6 servers. It is based on DHCPv6 packet filtering at the layer 2 device at which the packets are received. A similar mechanism has been widely deployed in IPv4 networks ('DHCP snooping'); hence, it is desirable that similar functionality be provided for IPv6 networks. This document specifies a Best Current Practice for the implementation of DHCPv6-Shield.Captive-Portal Identification Using DHCP or Router Advertisements (RAs)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.Captive Portal APIChanges from RFC 7710This document incorporates the following changes from .
Clarified that IP string literals are NOT RECOMMENDED.
Clarified that the option URI MUST be that of the captive portal
API endpoint.
Clarified that captive portals MAY do content negotiation.
Added text about Captive Portal API URI precedence in the event
of a network configuration error.
Added urn:ietf:params:capport:unrestricted URN.
Noted that the DHCPv4 Option Code changed from 160 to 114.
Observations from IETF 106 Network ExperimentDuring IETF 106 in Singapore, an experiment
enabling clients compatible with the Captive Portal API to discover a
venue-info-url (see experiment
description for more detail) revealed that some Polycom devices
on the same network made use of DHCPv4 option code 160 for other
purposes.The presence of DHCPv4 Option code 160 holding a value indicating the
Captive Portal API URL caused these devices to not function as desired.
For this reason, IANA has deprecated option code 160 and
allocated a different value to be used for the Captive Portal API URL.AcknowledgementsThis document is a -bis of RFC 7710. Thanks to all of the original
authors (, , , and )
and original contributors.Also thanks to the CAPPORT WG for all of the discussion and
improvements, including contributions and review from ,
, , , , ,
, ,
, , ,
and .Authors' AddressesGoogle1600 Amphitheatre ParkwayMountain ViewCA94043United States of Americawarren@kumari.netLoon1600 Amphitheatre ParkwayMountain ViewCA94043United States of Americaek@loon.com