portal2

portal2 is my Python-based captive (as of 2.8.1, February 2010) portal software which is used to control internet connectivity at StreetGeek and SAGAfest. Unfortunately, because of the nature of the code (it is quite specific to StreetGeek and SAGAfest’s setup, and requires specific versions of various software and libraries), and because of the very long and manual installation process this software requires, it is not open-sourced, because there is no way I could expect anyone else to be able to install the software (just yet). The software has been in production use by StreetGeek since January 2009, and has undergone huge amounts of work to get it to the state it is in today.

It uses kernel-level iptables accounting for handling user access to the internet. It creates fancy network traffic graphs, reports, managing of quota resets, unmetered sites/services, blacklisted sites/services and an API to allow other LAN applications to use it as an authentication mechanism. To my knowledge, no other LAN parties in South Australia (or even Australia) have this kind of system in place. While some people have initially criticised the system for being “overly restrictive”, once they go without it, they immediately see the huge quality of service benefits that portal2 brings to an ADSL2+ internet connection with over 50 people on it. At StreetGeek, it gets over 100 people per LAN using it, and in August 2009 – April 2010 over 300 people have used the software.

I’ll be working on another version of the software suited to a more “generic” environment at a later date, and that will become open-sourced. This won’t have any of the LAN-party specific components in it.

It is written using Python and the Django framework for the frontend, and uses a Python backend daemon to do the firewall management. The two parts communicate via D-BUS.

It also exposes an API that allows you to develop applications that consume it’s data or use it as an intranet authentication mechanism.

Metrics for portal2 2.8.1 (2010-02-12):

                          Ohloh Line Count Summary                          

Language          Files       Code    Comment  Comment %      Blank      Total
----------------  -----  ---------  ---------  ---------  ---------  ---------
python               14       1881        462      19.7%        533       2876
html                 46       1477         57       3.7%        291       1825
css                   5        598         32       5.1%        156        786
make                  1         10          0       0.0%          2         12
javascript            3          3          0       0.0%          0          3
----------------  -----  ---------  ---------  ---------  ---------  ---------
Total                69       3969        551      12.2%        982       5502

Comments are closed.