- RRD logging & graphing
- Webmin module
- Curses interface
- Captive portal
- Scales up to 2000 user, but easy to shape traffic on small scale too
- I'm currently using it to ensure my bandwidth in family shared lined as kids consume lot's of bandwidth
- Either per device or per user bw
- blacklist
- timed events
This was in production usage between 2000-2012 and it performed quite nicely
- linux kernel with htc support
- mysql > 4.0.0
- http-server
- iptables
- perl > 5.0
- Curses::Application
- DBI
- DBH::mysql
- radius
- Authen::Radius
- iptraf
- apt-get install git
- apt-get install libdbi-perl librrdtool-oo-perl
- apt-get install libdbd-mysql libdbd-mysql-perl libmysqlclient18
- apt-get install libconvert-ber-perl mysql-server freeradius-mysql libauthen-radius-perl
- apt-get install libcurses-perl libjson-perl libsnmp-perl libsnmp-session-perl libexporter-autoclean-perl
- cpan -i Curses::Application
- cd /opt/
- git clone https://github.com/mongrelx/perl-traffic-control.git
- apt-get install git
- apt-get install libdbi-perl librrdtool-oo-perl
- apt-get install libdbd-mysql libdbd-mysql-perl
- apt-get install libconvert-ber-perl mysql-server freeradius-mysql libauthen-radius-perl
- apt-get install libcurses-perl libjson-perl libsnmp-perl libsnmp-session-perl libexporter-autoclean-perl
- cpan -i Curses::Application
- cd /opt/
- git clone https://github.com/mongrelx/perl-traffic-control.git
- mysqladmin create ptc -p
- mysqladmin create ptc_auth -p
- mysql -p
mysql>GRANT ALL PRIVILEGES ON ptc.* TO 'ptc_user'@'%' IDENTIFIED BY 'ptc_pass'; mysql>GRANT ALL PRIVILEGES ON ptc_auth.* TO 'ptc_user'@'%' IDENTIFIED BY 'ptc_pass'; - (DEBIAN 8) mysql -p ptc_auth < /etc/freeradius/sql/mysql/schema.sql
- (DEBIAN 9) mysql -p ptc_auth < /etc/freeradius/3.0/mods-config/sql/main/mysql/schema.sql
- edit sql.conf to match db_user,db_pass,db_name
- include sql.conf from freeradius.conf
- add to /etc/freeradius/users
DEFAULT Autz-Type :=PTC_USER
Fall-Through = Yes
- add to /etc/freeradius/sites-enable/default
under Authorization section
Autz-Type PTC_USER { sql }
- edit /etc/freeradius/3.0/mods-available/sql to match db_user,db_pass,db_name
- enable mod sql
- add to /etc/freeradius/3.0/users
DEFAULT Autz-Type :=PTC_USER
Fall-Through = Yes
- add to /etc/freeradius/sites-enabled/default
under Authorization section
Autz-Type PTC_USER { sql } edit dictionary to have clientid string attribute
edit /opt/perl-traffic-control/etc/AAA/home.AAA.conf to match your network
/opt/perl-traffic-control/bin/iptable-basic > /etc/iptables.up.rules iptables-restore < /etc/iptables.up.rules
if nat is used on output , you'll need to enable ifb device to control traffic from in to out