wifi splash page not disappearing

Hi all,


I am trying to add a splash page/ wifi landing page/ wifi agreement page (or whatever the name is) to my network by modifying my dns server.

We know this is not the so call "correct" way to do it, and will not block attacks in a meaningful way. (as they can always use a better DNS server)


Here is how my implementation works:

1) DHCP point device to use my DNS server

2) DNS server reslove all request as an local ip address, in which it host a web server for the agreement page

3) After user agree to the terms, DNS server will start resloving the request correctly, thus, user will be able to get to the web


It works on computers, however, when I tested it on iOS devices, here's what happen

1) connect iPhone to wifi network

2) iPhone tried resolve a number of sites to determine if the system has internet connection

3) DNS server reslove all these request as a local web server's ip address, with ttl=1

4) splash page comes up on iPhone

5) user click I agree, and DNS server starts giving out correct ip, the page also redirect user to an internet address

These all works as expected, however, the "Cancel" button on the top right corner does not turn into "Done", nor the splash page goes away.

The user would have to click the option: use this network without internet access (or something like that) to dismiss the page. (Clicking home here will results in disconnecting from the network)


I wonder if there is a special (javascript?) method I can call in the page, or some package I need to send to the device?


Thanks a lot,

Kyle

I also uploaded a demo of my code on GitHub: https://github.com/kylelam/dnsd_wifi

To test it, run it in your local network (sudo node demo.js). Then, change your phone's dns to your machine's IP. Disconnect your phone from wifi and connect to it again. (on iOS, you might need to go into detail, and enable auto-login, and auto-join, or if you can't, just reboot.)

*note1: the server will need to run on port 53, and 80, so it need sudo.

*note2: please don't laugh at my code, I'm very new to this. But please do point out.

*note3: you will need to npm install these packages: os, express, dns, dnsd

wifi splash page not disappearing
 
 
Q