6

My project was to make a Wifi captive access point. i.e. once you connect this wifi spot, you cannot surf the Internet, only the local website. I achieve it, when you hit any domain, any IP, for all ports possible, the client is redirected to the local website. It works. Yeah.

Unless I'm wrong somewhere, It is 100% captive. No IP forwarding, no Internet access.

However I'm not considered as a captive portal by OSes.The OSes I tested with (Mac OS X, iOS, Android) seems not to see it as captive. Therefore I get no popup/splash/notifications. ( Apple CNA : I have get informed on it, and Assistant should show, regarding the redirections I configured).

Is someone owning a bulk of help at this ? Am I missing/misunderstanding some stuff in being detected as a walled garden.

Thanks for any piece of help.

EDIT ___________ In the console, here is a bunch of lines I get when Mac OS X join the Wifi Spot :

UserEventAgent[40]: Captive: CNPluginHandler en1: Authenticated

UserEventAgent[40]: Captive: [CNInfoNetworkActive:1709] en1: SSID 'MyWifiTest2' not making interface primary (no cache entry)

UserEventAgent[40]: Captive: CNPluginHandler en1: Evaluating

UserEventAgent[40]: Captive: en1: Not probing 'MyWifiTest' (cache indicates not captive)

A similar issue @ https://discussions.apple.com/thread/6251349 : "So, we see the cache is no longer the issue, but something goes buggy with the probe (i.e., when Captive Network Assistant requests the Apple success webpage), and in its error state it assumes we are online, which we are not. This also seems buggy. What's a little funny, is that as soon as the computer assumes it's online, all my little background processes start making requests, and I get can see a dump of the captive portal login page markup in the errors that those processes throw."

In Library/Preferences/SystemConfiguration/CaptiveNetworkSupport/Settings.plist ProbeURL is:

http://captive.apple.com/hotspot-detect.html
4
  • I think that you'll not have notifications if they can't reach Internet from the AP... Give it a try, let the clients surf and tell us if you get the notifications.
    – edumgui
    Jul 7, 2015 at 12:52
  • @Santeador ok, i see... (i have added infos to my question if useful). But I my clients surf, Apple will correctly ping what they want, this is not captive anymore...
    – ArchiT3K
    Jul 7, 2015 at 13:16
  • A captive portal with no Internet access is similar to a honeypot. Didn't tried, but it won't be logic that any OS "promote" that kind of AP to the user...
    – edumgui
    Jul 7, 2015 at 14:28
  • possible duplicate of Captive portal : external splash page specs?
    – jornane
    Jul 23, 2015 at 20:59

3 Answers 3

1

While your question references other operating systems, a look at how Windows detects captive portals will likely lead you to a solution.

In order to detect the presence of a captive portal, Windows performs a DNS lookup request for dns.msftncsi.com. This DNS address should resolve to 131.107.255.255. If the DNS resolution fails (resolves to 0.0.0.0), or the resolved IP is not correct, then it is assumed that the internet connection is not functioning correctly. If the DNS query is resolved properly but the page is inaccessible, then it is assumed that there is a working internet connection, but that DNS requests are being redirected to an in-browser authentication page (captive portal).

See the following blog for details: http://blog.superuser.com/2011/05/16/windows-7-network-awareness/

1
  • Thanks for noting it. Actually, Apple does the same but with an url that - of not captive - return "Success" html content. I havent tried yet Windows... I'll do.
    – ArchiT3K
    Jul 16, 2015 at 7:35
1

To me, it has worked since I had the WispR xml standard to my page.

Without this, my portal was detected captive by Android, not by iOS...

1
  • Could you provide a link or more information?
    – jornane
    Jul 23, 2015 at 20:55
0

I have progressed on it, so I answer my question.

In Library/Preferences/SystemConfiguration/CaptiveNetworkSupport/Settings.plist ProbeURL is: http://captive.apple.com/hotspot-detect.html

First of all, this is not really the probeUrl. ProbeUrl is unique fort each attempt. Even the rumor about 200 Apple urls is wrong. Apple generates a new URL each time OSX/iOS probes Wifi. *If you want to avoid displaying the Popup, just serve the Success body. *

Then, being 100% captive is not suffisiant. Redirection is a half part of the matter. The second part is a matter of protocol about Wifi, You have to learn about it, about wifi roaming and so third.

1
  • 1
    Can you provide more information about wifi roaming, so that somebody else may learn from it?
    – jornane
    Jul 23, 2015 at 20:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .