micolous.id.au

the result of a blogging accident

Tuesday, February 2, 2010

portal2

Filed under: Uncategorized — micolous @ 23:38

portal2 is my Python-based captive (as of 2.8.0, January 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 150 people on it.

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.

Metrics for portal2 2.8.0 (2010-01-24):

                          Ohloh Line Count Summary                          

Language          Files       Code    Comment  Comment %      Blank      Total
----------------  -----  ---------  ---------  ---------  ---------  ---------
python               16       1915        463      19.5%        548       2926
html                 46       1464         57       3.7%        291       1812
css                   5        598         32       5.1%        156        786
javascript            3          3          0       0.0%          0          3
----------------  -----  ---------  ---------  ---------  ---------  ---------
Total                70       3980        552      12.2%        995       5527

Powered by WordPress