http://phpal.sourceforge.net/engineforallanbilling
1) Manual rewrited for Ubuntu users
2) New (minimized) variant of the raw table (storage for billing data) in ulog database with new keys!
3) Modified script /root/flows/rota
Just useful PHP-scripts and Windows-programms
http://phpal.sourceforge.net/engineforallanbilling
1) Manual rewrited for Ubuntu users
2) New (minimized) variant of the raw table (storage for billing data) in ulog database with new keys!
3) Modified script /root/flows/rota
Right now folder with langs moved to separated package.
This lang used in all Billings.
http://sourceforge.net/project/showfiles.php?group_id=201020&package_id=311740
Right now i’m testing new project alSUMBilling.
As you remember, this is complete solution for accouting all traffic (proxy+NAT) in you bussines.
This is alSAMSBilling + alLANBilling.
alSUMBilling will be released after adding multilang and some fixes for another people (right now its configured only for my databases).
Also new version of the alLANBilling and alSAMSBilling coming with fixed month selection (select any month, not just currently and prevous) .
New planned project: alTelbookLDAP. This is simply PHP-script to show contents (Name, Phone Number, email) of the your Microsoft LDAP Server (Active Directory). Like a phone book for your bussines with storage in Active Directory. May be it will be merged with “alStaff” (Telephone book for small organizations (old project name - “alPhoneBook”) integrated with base of inventory.)
I recomend to add this indexes to speedup processing:
ALTER TABLE raw ADD INDEX ( `unix_secs` );
ALTER TABLE raw ADD INDEX ( `srcaddr` );
ALTER TABLE raw ADD INDEX ( `dstaddr` );
In the alLANBilling version 20080928 added textbox where you can type date.
All records BEFORE entered date will be deleted from database.
After delete database will optimize and check.
Don’t forget to grant delete privilege to the user!
grant delete on DATABSE.TABLE to USER;
UPD: After mistake in the code…i’ve lost all records in my database…. After that I added protection:
You will be unable to delete records with date > -2 mont (this means, that you can delete only recods thats old more than 2 month)
Oh… Happy new year!
Today me have woken and have informed, that it is impossible to see internet-statistics (in the alLANBilling) of work in December 2007…
Fixed! Right now you can select 2007 or 2008 year.
Month selection also fixed (”december bug”).
Some code and UI fixes.
If not working web, check this:
1) if mysql extension for php is installed (php-mysql-*.rpm must be installed)
2)when you are filling “Your local network address” you should enter 192.168.1.0 (if computers in your network has addreses like 192.168.1.1, 192.168.1.5), and so on..
(Instructions for Ubuntu)
Where FLOW_COLLECTOR is an your host, where running flow-capture
This is only EXAMPLE:
*filter :INPUT ACCEPT [0:0] :FORWARD DROP [0:0] :OUTPUT ACCEPT [0:0] :NETFLOW - [0:0] -A FORWARD -s 192.168.0.0/24 -d 123.123.123.123/32 -p tcp -m tcp --dport 25 -j NETFLOW -A FORWARD -s 192.168.0.0/24 -d 123.123.123.123/32 -p tcp -m tcp --dport 110 -j NETFLOW -A FORWARD -s 192.168.0.0/24 -d 123.123.123.123/32 -p tcp -m tcp --dport 4444 -j NETFLOW -A FORWARD -s 192.168.0.0/24 -d 2123.123.123.123/32 -p tcp -m tcp --dport 25 -j NETFLOW -A FORWARD -s 192.168.0.0/24 -d 123.123.123.123/32 -p tcp -m tcp --dport 110 -j NETFLOW -A FORWARD -s 192.168.0.0/24 -d 123.123.123.123/32 -p udp -j NETFLOW -A FORWARD -s 192.168.0.0/24 -d 123.123.123.123/32 -p udp -j NETFLOW -A FORWARD -s 192.168.0.5/32 -j NETFLOW -A FORWARD -s 192.168.0.200/32 -p udp -m udp --dport 123 -j NETFLOW -A FORWARD -s 192.168.0.200/32 -p udp -m udp --dport 53 -j NETFLOW -A FORWARD -d 192.168.0.0/24 -j NETFLOW -A FORWARD -s 192.168.0.0/24 -d 123.123.123.123/32 -p tcp -j NETFLOW -A FORWARD -s 192.168.0.0/24 -d 123.123.123.123/32 -p tcp -m tcp --dport 110 -j NETFLOW -A FORWARD -s 192.168.0.0/24 -d 123.123.123.123/32 -p tcp -m tcp --dport 25 -j NETFLOW -A NETFLOW -j ULOG -A NETFLOW -j ACCEPT COMMIT
Script for exporting data to MySQL database: /root/flows/rota
#!/bin/sh
/usr/bin/flow-export -f3 -mUNIX_SECS,DOCTETS,SRCADDR,DSTADDR,INPUT,OUTPUT,SRCPORT,DSTPORT,PROT -u “root:pass:localhost:3306:ulog:raw” < $1
(the user must have write access to the database!)!
create database ulog
CREATE TABLE IF NOT EXISTS `raw` (
`unix_secs` int(11) unsigned NOT NULL default ‘0′,
`dpkts` int(11) unsigned NOT NULL default ‘0′,
`doctets` int(11) unsigned NOT NULL default ‘0′,
`srcaddr` varchar(45) NOT NULL default ‘0′,
`dstaddr` varchar(45) NOT NULL default ‘0′,
`input` smallint(5) unsigned NOT NULL default ‘0′,
`output` smallint(5) unsigned NOT NULL default ‘0′,
`srcport` smallint(5) unsigned NOT NULL default ‘0′,
`dstport` smallint(5) unsigned NOT NULL default ‘0′,
`prot` tinyint(3) unsigned NOT NULL default ‘0′,
KEY `unix_secs` (`unix_secs`),
KEY `srcaddr` (`srcaddr`),
KEY `dstaddr` (`dstaddr`),
KEY `input` (`input`),
KEY `output` (`output`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
GRANT ALL PRIVILEGES ON ulog.* TO USER@localhost IDENTIFIED BY "PASSWORD";
You must change user and password!
service fprobe-ulog startservice flow-capture start
select * from raw limit 5;
You should see someting like this:
unix_secs doctets srcaddr dstaddr srcport dstport
1919283189 46934 123.123.123.123 192.168.1.123 443 1120
If you don's see data in the any column (like 0), than export-script working incorrectly.
With release of the alSAMSBilling “lang” folder will be one for all projects (files with langs will contain traslation for both projects)
Added English translation of Engine (NetFlow, flow-tools) installation.
Original version avaible at opennet.ru.
Visit alLANBilling for links.