DEV Community

Edwin Mak
Edwin Mak

Posted on

Explain Required Sign In Forms For Wifi Access Like I'm Five

Hello there!

I've always wondered how some wifi connections require you to sign in or fill out a form on a page before you can freely access the internet. How is this effect implemented?

I know little about the actual hardware and the networking that may or may not be involved.

Thanks!

Top comments (10)

Collapse
 
damian profile image
damian

In the case of the captive portal I made for a local cafe, the "Guest Network" allows a certain range of IP addresses. This would contain the web page/app that lets you "sign in" to the AP. After signing into the AP you now have a different range of IP addresses you can access (or be denied from!)

I used Unifi in my implementation. The interface to configure this via unity can be seen here (I just binged "unifi guest" this is not my config)

community.ubnt.com/ubnt/attachment...

Collapse
 
edwinthinks profile image
Edwin Mak

Thanks damian! This was a good explanation!

Collapse
 
tommygebru profile image
tommy • Edited

Captive portal logins, it's such a pain not only because I have to do this with almost every cafe I work out of daily, but also because my wifi at home requires this for all my devices, and some devices don't have the cookies/cache to save my login info..

Collapse
 
edwinthinks profile image
Edwin Mak

Bummer :(

Collapse
 
tommygebru profile image
tommy

I spent hundreds of dollars a year to use Wi-Fi outdoors, but save money for home use hehe

Collapse
 
elmuerte profile image
Michiel Hendriks

Originally they used a bunch of tricks to intercept traffic. But with the up-rise of HTTPS and HSTS these tricks fail a lot. The solution has move however, OS and browsers perform a special DNS lookup to a domain withing their control. If this does not return the expected response the OS/Browser assumes it is the host of the portal.

Here is a more detailed explanation for Windows 7 and probably later version.

And this one is for Firefox.

Collapse
 
nielsbom profile image
Niels Bom
Collapse
 
edwinthinks profile image
Edwin Mak

Thanks! I'll have to take a look at this to get my curiosity fed!

Some comments may only be visible to logged-in visitors. Sign in to view all comments.