This is a list of frequently asked questions for WiCap-PHP.
Does it support ________ authentication type?
If you really want authentication, one easy way would be to use Apache to restrict access to the splash page (using a .htaccess file in /usr/local/wicap-php/htdocs). Here is a little guidance on doing that:
Here is an example of a .htaccess file:
Then you use the program "htpasswd" that ships with Apache to manually add users:
$ htpasswd -c /usr/local/wicap-php/var/htpasswd.users firstusername
With subsequent user additions you don't need the "-c" option (which creates the password database).
You may also have a line like this to your httpd.conf in the directory entry for the virtual host for WiCap-PHP (to allow use of a .htaccess file):
Using Apache for authentication is documented many places on the internet, but these notes should get you started. It should be noted that this isn't the most secure thing in the world. Any use who has login access to the CaptivePortal server will be able to manually feed their lease information to the allow daemon. Also, unless you set the splash page to use HTTPS, you will be sending your authentication info over the wireless link unencrypted, so any listening party can hear it.
If you end up hacking on WiCap-PHP to add an authentication system, I would love to see your changes.
Under what circumstances does a client loose a lease? When the browser window is closed?
Clients lose leases if:
- They are idle (so yes, when the browser window has been closed for a little while and they have no other network applications open).
- The maximum lease time expires.
the daemon takes two related arguments:
-m max lease time (in seconds)
- default: 24*60*60 = 24 hours
-i evict interval (in seconds)
- default: 5*60 = 5 minutes
So, for instance, if you started the daemon like:
/usr/local/wicap-php/bin/allow -m 3600 -i 600
This would cause all leases to lapse after 3600 seconds (one hour) and every 600 seconds (ten minutes) the daemon will expire any idle leases. Leases are idle if their MAC address is not in the ARP table, indicating that they haven't made any traffic for a little while.
If you want to configure these options, you probably want to do it in:
Which is the small shell-script that starts the daemon.
Does it work on FreeBSD?
As of December 23rd, 2005, the answer is yes. At least, it seems to. I have ported the software to FreeBSD 4.9. It should work on newer versions too. At this point, I havn't done much testing on FreeBSD (mostly because I don't have a machine to do the testing on).
To make it work on freebsd, you will need the libevent port:
# cd /usr/ports/devel/libevent
# make && make install
Check out the latest source using subversion:
$ svn co http://svn.smallwhitecube.com/wicap-php/trunk wicap-php
Compile the source with the provided alternate makefile
$ cd wicap-php/source
$ mv makefile makefile.dist
$ mv makefile.freebsd makefile
$ cd ..
Then continue as instructed by the included documentation. I am interested to hear how well WiCap-PHP works on FreeBSD, so please, drop me an email if it does, or doesn't.