Mon0wall now supports captive portal! It is available in the version 1.1 (non-beta) release. These pages will be left here for historic interest and to help others building captive portals.
The m0n0wall captive portal project is trying to add captive portal support to the already awesome m0n0wall project. Here we'll keep specs, status and any other relevant information. Ongoing discussions will take place on the m0n0wall developer mailing list, but feel free to add comments to these pages too - someone will get them to the right place.
What is it? A captive portal forces anyone who connects to a network for the first time to a specific web page. There they can find out who is providing this access and typically acknowledge the rules of access. More complex portals require a validated login but that is beyond the scope of this project.
The motivation for this project is simple: there are growing numbers of free wireless networks around the world looking for gateway software like m0n0wall which is small, fast, reliable, powerful and easy to maintain and configure. The main thing missing is captive portal support.
Many thanks to the Personal Telco CaptivePortal page which formed the genesis of this page.
Another approach to this (as done by NoCat?) is to hand out very short leases (15 secs) in another range until the user 'Continue's, and then give them a lease that lets them outside. Maybe this would be easier given the questions that Manuel raises.
We won't try and do everything in this release. Here are some things we can
do next:
M0n0wall is succesful in large part due to the vision of its designer. Manuel provided the following guidelines that a captive portal needs to meet for him to consider adding it to the core m0n0wall release (taken from Manuel's email):
Manual also asks:
Did you check that it fits in with the rest of m0n0wall
without requiring a complete overhaul thereof? I mean - you know that
ipfilter doesn't do layer 2 filtering, and that ipfw has got a kinda
"reserved" function for the traffic shaper, which must work no matter if the
captive portal is on or off. Same goes for other functions like VPN etc. of
course.
A little googling reveals a few FreeBSD captive portals:
http://www.cc.saga-u.ac.jp/opengate/index-e.html http://opensplash.qalab.com/ http://software.stockholmopen.net/index.shtml
and a bunch of others (not necessarily FreeBSD based) at:
http://www.personaltelco.net/index.cgi/PortalSoftware
I admit I'm out of my depth here when it comes to the level of hacking required for this, but I figure I know enough to be dangerous and can kick start this conversation, so here goes...
Manuel asked here:
Did you check that it fits in with the rest of m0n0wall without requiring a complete overhaul thereof? I mean - you know that ipfilter doesn't do layer 2 filtering, and that ipfw has got a kinda "reserved" function for the traffic shaper, which must work no matter if the captive portal is on or off. Same goes for other functions like VPN etc. of course.
Two different ways I've heard of implementing captive portals are:
1) change the filtering rules to re-direct newly leased IPs to a specific page, then reset the rules when they're approved
2) change the DHCP server to initially supply very short leases in a different, walled-off, subnet and then provide a new IP when they're approved.
One problem with (2) is that someone might simply create their own static IP in the right (2nd) range, but if (1) proves hard, maybe its a good 80% solution?
I think NoCatSplash is an example of (1), http://nocat.net/download/NoCatSplash/.
Perhaps a better starting point is http://www.geekspeed.net/wicap/, which is a captive portal that runs on OpenBSD (presumably closer to FreeBSD than Linux?).
Btw, for those new to m0n0wall, read the full description of its FreeBSD based underlying software and configuration.
There is a $222.50 reward(*), plus 1 yr NYCWireless membership and T-Shirt, to anyone who can add captive portal support and an additional $222.50 to Manuel (m0n0wall's developer) to reflect the work he's done to date and the work doubtless involved with integrating even the best made additions. I'm doing this to try and speed up the appearance of captive portal support which is vital for using m0n0wall in more community projects.
Please email me if you'd like to add to this amount.
The rules are (hopefully) simple:
Feel free to post comments directly to this page or on the m0n0wall mailing list. Thanks! Michael Mee.
(*) This total reflects $200 of my own money and, so far, $100 of an anonymous contributor, another $100 from www.openacces.org, $20 from Barry Murhpy and $25 from Benjamin Henry, as well as a contribution from NYCWireless. I'll continue to split contributions 50-50 with the contributor and Manuel.