The captive portal is presented to the client and is stored either at the gateway or on a web server hosting the web page. 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 MAC address of attached clients can also be used to bypass the login process for specified devices.
Often captive portals are used for marketing and commercial communication purposes. 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. 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. 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. This allows the provider of this service to display or send advertisements to users who connect to the Wi-Fi access point. 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). 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.
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).
A common method is to direct all World Wide Web traffic to a web server, which returns an HTTP redirect to a captive portal. 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. If the device receives a HTTP 200 status code, it assumes it has unlimited internet access. 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. .mw-parser-output cite.citationfont-style:inherit;word-wrap:break-word.mw-parser-output .citation qquotes:\"\\\"\"\"\\\"\"\"'\"\"'\".mw-parser-output .citation:targetbackground-color:rgba(0,127,255,0.133).mw-parser-output .id-lock-free a,.mw-parser-output .citation .cs1-lock-free abackground:url(\"//upload.wikimedia.org/wikipedia/commons/6/65/Lock-green.svg\")right 0.1em center/9px no-repeat.mw-parser-output .id-lock-limited a,.mw-parser-output .id-lock-registration a,.mw-parser-output .citation .cs1-lock-limited a,.mw-parser-output .citation .cs1-lock-registration abackground:url(\"//upload.wikimedia.org/wikipedia/commons/d/d6/Lock-gray-alt-2.svg\")right 0.1em center/9px no-repeat.mw-parser-output .id-lock-subscription a,.mw-parser-output .citation .cs1-lock-subscription abackground:url(\"//upload.wikimedia.org/wikipedia/commons/a/aa/Lock-red-alt-2.svg\")right 0.1em center/9px no-repeat.mw-parser-output .cs1-ws-icon abackground:url(\"//upload.wikimedia.org/wikipedia/commons/4/4c/Wikisource-logo.svg\")right 0.1em center/12px no-repeat.mw-parser-output .cs1-codecolor:inherit;background:inherit;border:none;padding:inherit.mw-parser-output .cs1-hidden-errordisplay:none;color:#d33.mw-parser-output .cs1-visible-errorcolor:#d33.mw-parser-output .cs1-maintdisplay:none;color:#3a3;margin-left:0.3em.mw-parser-output .cs1-formatfont-size:95%.mw-parser-output .cs1-kern-leftpadding-left:0.2em.mw-parser-output .cs1-kern-rightpadding-right:0.2em.mw-parser-output .citation .mw-selflinkfont-weight:inheritRFC 6585 specifies 511 Network Authentication Required code.
When a client requests a resource on a remote host by name, DNS is queried to resolve that hostname. 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). This DNS server will return the IP address of the captive portal page as a result of all DNS lookups.
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. To limit the impact of DNS poisoning, a TTL of 0 is typically used.
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. This allows a client to bypass the captive portal and access the open Internet by tunneling arbitrary traffic within DNS packets.
Some captive portals may be configured to allow appropriately equipped user agents to detect the captive portal and automatically authenticate. User agents and supplemental applications such as Apple's Captive Portal Assistant can sometimes transparently bypass the display of captive portal content against the wishes of the service operator as long as they have access to correct credentials, or they may attempt to authenticate with incorrect or obsolete credentials, resulting in unintentional consequences such as accidental account locking.
A captive portal that uses MAC addresses to track connected devices can sometimes be circumvented by re-using the MAC address of a previously authenticated device. Once a device has been authenticated to the captive portal using valid credentials, the gateway adds that device's MAC address to its allowlist; since MAC addresses can easily be spoofed, any other device can pretend to be the authenticated device and bypass the captive portal. Once the IP and MAC addresses of other connecting computers are found to be authenticated, any machine can spoof the MAC address and Internet Protocol (IP) address of the authenticated target, and be allowed a route through the gateway. For this reason some captive portal solutions created extended authentication mechanisms to limit the risk for usurpation.
Similarly, as HTTPS connections cannot be redirected (at least not without triggering security warnings), a web browser that only attempts to access secure websites before being authorized by the captive portal will see those attempts fail without explanation (the usual symptom is that the intended website appears to be down or inaccessible).
Platforms that have Wi-Fi and a TCP/IP stack but do not have a web browser that supports HTTPS cannot use many captive portals. Such platforms include the Nintendo DS running a game that uses Nintendo Wi-Fi Connection. Non-browser authentication is possible using WISPr, an XML-based authentication protocol for this purpose, or MAC-based authentication or authentications based on other protocols.
It is also possible for a platform vendor to enter into a service contract with the operator of a large number of captive portal hotspots to allow free or discounted access to the platform vendor's servers via the hotspot's walled garden. For example, in 2005 Nintendo and Wayport partnered to provide free Wi-Fi access to Nintendo DS users at certain McDonald's restaurants. Also, VoIP SIP ports could be allowed to bypass the gateway to allow phones to work.[clarification needed]
Determine the captive portal state of the user's connection. A captive portal is a web page displayed when a user first connects to a Wi-Fi network. The user provides information or acts on the captive portal web page to gain broader access to network resources, such as accepting terms and conditions or making a payment.
A splash page (also known as a 'captive portal') can provide a customized branding experience to wireless users in addition to prompting for username/password credentials. For example, the splash page can display a corporate logo and color scheme. The splash page can also show the terms of service, which might include an acceptable use agreement or a privacy statement.
In the event that you need an Acceptable Usage Policy that should be translated in different languages in the captive portal, you can create specially named templates that will be used for different languages.
The remediation page shown to the user during isolation are specified throughthe URL parameter of the given security event in /usr/local/pf/conf/security_events.conf.In its default configuration, PacketFence uses Template Toolkit to render text providedin the directory /usr/local/pf/html/captive-portal/templates/security_events and obeysto everything mentioned in the Presentation section.
The language of the user registration pages is selected through thegeneral.locale configuration parameter. Translatable strings are handleddifferently for the Remediation pages and the rest of the captive portal:
Strings defined in the security event pages (in /usr/local/pf/html/captive-portal/templates/security_events)will be looked up in the translation files in /usr/local/pf/conf/locale/..and if a translation is available the translated string will be the onevisible on the captive portal.
Also, if you create a security event template with the name of your locale in/usr/local/pf/html/captive-portal/templates/security_events in the format:..html. It will be loaded instead of the default.html and so you can put strings and HTML directly in yourtarget language without the hassle of escaping everything properly as youwould need to do with gettext.
You can choose to provide your employees and guests with a WiFi connection for their personal devices, or even use captive portal authentication for their work devices. If you configure the connection to your LDAP server, you don't need to take care of user