0

I'm using hostApd to develop a captive portal. My machine provides à Wifi (password free), and I plan the clients to get a popup saying "hello". You know, like the popup of wifi providers, asking for credits or login...

(note: I want to open my machine local website when clients - iPad clients btw - connect the wifi. I don't care of making them pay or login).

How can I do such a thing, please ? One says the OS detects it by tryoing to ping google.com or so on, if not, it knows the portail is captive and display a html popup. Which url ? ...

Thanks

1

2 Answers 2

1

Please also investigate (and participate in) the IETF CAPPORT WG. https://datatracker.ietf.org/wg/capport/about/

New ICMPs, HTTP replies and DHCP responses will become available. As the Internet moves to HTTPS, many current methods will cease to work.

1
0
if ping -q -w 1 -c 1 $(ip r | grep default | cut -d ' ' -f 3) > /dev/null; then
    wget "http://clients3.google.com/generate_204?" -O /dev/null 2>&1 | grep "204 No Content" > /dev/null
    if [[ $? -ne 0 ]]; then
      # Perform login
    fi
fi

Reference:

1
  • thanks a lot, but this works only for Android, am i right ? and shouldnt the OS, by not getting 204 Ok, detect it is captive ? --- anyway, i can intercept ping, and then ?... I cannot enforce Android to display the splash... thanks though
    – ArchiT3K
    Jun 30, 2015 at 10:22

You must log in to answer this question.

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