lakinduakash/linux-wifi-hotspot

Web browser pop up to captive portal on connection to the AP

alexandre-bonnefond opened this issue · 0 comments

Hello,

I am using create_ap on a remote computer (Ubuntu 20.04) with the following comamnd: create_ap -n --redirect-to-localhost wlan0 server_wifi admin_password
I also have a web_server running on 0.0.0.0:5000 on this remote computer. Everything works fine so far and whenever I connect to the AP with a local computer I am able to reach the web server by browsing any website on the web. But I would like for the web browser to pop up automatically when I connect to the AP like a captive portal, is that possible ?

I saw that some known URLs could be added to dnsmasq.conf for different OS to check connectivity before redirecting to localhost.

address=/connectivity-check.ubuntu.com/192.168.12.1
address=/clients3.google.com/192.168.12.1
address=/www.msftconnecttest.com/192.168.12.1
address=/www.apple.com/192.168.12.1

So my next question is can I modify the dnsmasq.conf file generated by create_ap in order to include those and try it out ?

Thanks for your help :)