Summary

Some Android-based devices are not redirected to the Captive Portal when the user gets connected to WiFi network with Android device.

The Captive Portal Notification is not getting triggered automatically or the Splash Page is closed immediately when is the testing domain accessible.

In some cases is necessary to keep the splash page open even if the client is connected and authorised on CP, or the connection is temporarily opened due to authentication or payment.

This practice can be especially helpful when using SOCIFI with the Social Network Login on a system with IP-based Walled Garden (eg. Cisco WLC, Ubiquiti), or with the Off-site Payment Gateway.

How Android determine if it has an Internet Connection

The Android devices check for the following domains which are hosted on Akamai network:

http://clients1.google.com/
http://clients3.google.com/
http://connectivitycheck.gstatic.com
http://connectivitycheck.android.com
and other domains used for this purpose by Google.

If the domain is accessible and returns “generate204” code, the captive portal is not triggered automatically. “generate204” response means the device is connected to the internet.

How to make Android believe it has no Internet Access

The simple method to keep the SP and CPN active is to block access to the testing domains by fake DNS translation.

To configure the DNS server to response with not valid IP to DNS request, add records for testing domains that point to an inactive private IP, that cannot generate response 204.

The network clients have to use the DNS service configured to mask the testing domains.

Configuration Examples

Not all services support this type of configuration. The following examples are for the selected DNS services, of course, any other type of DNS service that supports this configuration is possible to use.

Mikrotik

add these entries manually using WinBox:

Go to IP-DNS

Check if the Servers entries are set with required superior DNS or at least Dynamic server is assigned.

If not, enter the servers manually: (the IP of DNS servers are just example, use the servers according to your requirements)

Click on “Static”

Click on “+” (Add)

Enter the Name clients1.google.com and an inactive private IP

Click OK

Repeat the steps for each test domain.

clients1.google.com
clients3.google.com,a.b.c.d
connectivitycheck.android.com
connectivitycheck.gstatic.com