This allows a client to bypass the captive portal and access the open Internet by tunneling arbitrary traffic within DNS packets. In some deployments, the rule set will route DNS requests from clients to the Internet, or the provided DNS server will fulfill arbitrary DNS requests from the client. To limit the impact of DNS poisoning, a TTL of 0 is typically used.Ĭaptive portals have been known to have incomplete firewall rule sets. In order to perform redirection by DNS the captive portal uses DNS hijacking to perform an action similar to a man-in-the-middle attack.
This DNS server will return the IP address of the captive portal page as a result of all DNS lookups. In a captive portal, the firewall will make sure that only the DNS server(s) provided by the network's DHCP can be used by unauthenticated clients (or, alternatively, it will forward all DNS requests by unauthenticated clients to that DNS server).
When a client requests a World Wide Web resource, DNS is queried by the browser. RFC 6585 specifies 511 Network Authentication Required code.Ĭlient traffic can also be redirected using ICMP redirect on the layer 3 level.
Captive portal prompts are displayed when you are able to manipulate this first HTTP message to return a HTTP status code of 302 (redirect) to the captive portal of your choice. If the device receives a HTTP 200 status code, it assumes it has unlimited internet access. When a modern, internet-enabled device first connects to a network, it sends out an HTTP request to a detection URL predefined by its vendor and expects an HTTP status code 200 OK or 204 No Content. There is more than one way to implement a captive portal.Ī common method is to direct all World Wide Web traffic to a web server, which returns an HTTP redirect to a captive portal. The user can find many types of content in the captive portal, and it's frequent to allow access to the Internet in exchange for viewing content or performing a certain action (often, providing personal data to enable commercial contact) thus, the marketing use of the captive portal is a tool for lead generation (business contacts or potential clients). Over the past few years, such social Wi-Fi captive portals have become commonplace with various companies offering marketing centered around Wi-Fi data collection. This type of service is also sometimes known as "social Wi-Fi", as they may ask for a social network account to login (such as Facebook). This allows the provider of this service to display or send advertisements to users who connect to the Wi-Fi access point. In other words, the user is "captive" - unable to access the Internet freely until the user is granted access to the Internet and has "completed" the captive portal. The web-based form either automatically opens in a web browser, or appears when the user opens a web browser and tries to visit any web page.
Access to the Internet over open Wi-Fi is prohibited until the user exchanges personal data by filling out a web-based registration form in a web browser. Often captive portals are used for marketing and commercial communication purposes. Whether this delegation of responsibility is legally valid is a matter of debate. Administrators tend to do this so that their own users take responsibility for their actions and to avoid any legal responsibility.
The MAC address of attached clients can also be used to bypass the login process for specified devices.Ĭaptive portals are primarily used in open wireless networks where the users are shown a welcome message informing them of the conditions of access (allowed ports, liability, etc.).
Depending on the feature set of the gateway, websites or TCP ports can be white-listed so that the user would not have to interact with the captive portal in order to use them. The captive portal is presented to the client and is stored either at the gateway or on a web server hosting the web page. A captive portal can also be used to provide access to enterprise or residential wired networks, such as apartment houses, hotel rooms, and business centers. Captive portals are used for a broad range of mobile and pedestrian broadband services – including cable and commercially provided Wi-Fi and home hotspots.
Captive portals are commonly used to present a landing or log-in page which may require authentication, payment, acceptance of an end-user license agreement, acceptable use policy, survey completion, or other valid credentials that both the host and user agree to adhere by. An example of a captive web portal used to log onto a restricted network.Ī captive portal is a web page accessed with a web browser that is displayed to newly connected users of a Wi-Fi or wired network before they are granted broader access to network resources.