luger.205
Posts: 3
Joined: Wed Mar 18, 2015 10:57 am

Captive portal assistant

Wed Mar 18, 2015 11:00 am

Hi guys,

I am working on a network controller based on Raspberry Pi 2. I have nicely working WiFi AP, DHCP server, captive portal (via DNSmasq) and a web server. The unit will be fully offline, no internet access is available.

My only problem now is that users need to initiate interaction by running their browser and typing in a random domain so they are served my content.

I was searching the internet for a way to make my iPhone initiate captive network assistant, but couldn't find a way to do so on iOS 8.

Given that my network is offline with no access to the internet it is clear to me that my iPhone detected a captive portal as it presumably pings many websites in order to determine it's online status. Why doesn't it display my login screen automatically?

Also is there any similar solution for Android client devices?

n3tm4n
Posts: 29
Joined: Tue Jun 10, 2014 11:34 am
Location: East Midlands, UK
Contact: Website

Re: Captive portal assistant

Wed Mar 18, 2015 1:58 pm

I know with IOS7 Apple made some significant changes to how it determined if it had internet access, I presume IOS8 builds on that approach. This cisco document https://supportforums.cisco.com/documen ... os7-public talks in more details although I am sure other resources are only a google away.

I would initially try to configure the web server you are using to rewrite any request it receives for other domains to display your log on page. I don't know specifically how to do that, but it should work I think.

HTH - Cheers Jon.
http://0x25.blogspot.co.uk/

luger.205
Posts: 3
Joined: Wed Mar 18, 2015 10:57 am

Re: Captive portal assistant

Thu Mar 19, 2015 5:41 pm

Thanks n3tm4n Yes, I have it configured so any DNS request resolves to Raspberry and it serves it, which makes me curious why it doesn't invoke the CNA on iPhone with iOS 8.
Any lead would be appreciated.

dk7188
Posts: 2
Joined: Wed Mar 25, 2015 7:27 am

Re: Captive portal assistant

Wed Mar 25, 2015 7:43 am

Hi
I also have exactly the same problem with yours
But I have a little difference
While I setup the captive portal first time, I use the hostapd + dnsmasq + nginx
The popup page appears automatically and normally
But after that
I change my web server to Apache2, then it failed
Maybe there is some configuration changed, but I already forgot which one effects this

luger.205
Posts: 3
Joined: Wed Mar 18, 2015 10:57 am

Re: Captive portal assistant

Fri Mar 27, 2015 12:55 pm

That is a good leas as I am using Apache2 as well.
What I would like to know is what are the conditions triggering the CNA? Obviously all of the 200+ sites iOS pings are not accessible, so that's not the only thing that needs to be satisfied.

I have also read something about 302 redirect, so maybe it is necessary to make everything 302 to the captive landing page.

Did you manage to get it working? Did you revert back to the previous web server?

dk7188
Posts: 2
Joined: Wed Mar 25, 2015 7:27 am

Re: Captive portal assistant

Sun Mar 29, 2015 6:22 am

Hi luger.205
Yes, I revert back to hostapd + dnsmasq + nginx, and it's running normally
And I also had a strange situation just happen yesterday
My raspberry pi has done every configuration, and the captive portal is working
Then, I bring the RPI to my office, the office has so many wifi signal and I believe the signal is interference each others
My cellphone(iPhone4S with iOS8) is connected to the RPI through WIFI hotspot
and it detected a "reachable" internet connection
It's really a strange situation
because I never setup the internet accessibility for RPI, and the ethernet cable has never connected
I'm still trying to figure out the problem
If you have any progress we may keep discuss

Currently, I have some conclusion as below
1. hostapd + dnsmasq + nginx is working
2. apache2, lighttpd is not working
3. even it's working, but it's not stable
4. The multiple wifi signal environment may effects
5. while connect to RPI's wifi hotspot, iPhone may still send data through 3G to apple to check if that wifi source is available

edulce
Posts: 2
Joined: Tue Feb 02, 2016 9:25 pm

Re: Captive portal assistant

Tue Feb 02, 2016 9:33 pm

Hi guys,

In response to dk7188 or anybody else,

I have problems trying to get this: "I want to make device which makes AP and by connecting through mobile it shows specific page which I create but without accessing their browser like popup automatically when connecting to wifi. "

I have read that you reach this. I need this solution for a little museum and I am very interested if you can share with me the solucion. Even I could found some gratification if anybody help me. My email is dulcechamorro@gmail.com

Thank you

Eduardo

Return to “Networking and servers”