Car Support Version 1.0.6

Among innovations:
1) Changed the format of data storage for XML. In this regard, the old base in the new version were not able to open. I will try to make the conversion ater

2) Added highliting (red) parts that need to be changed in the car.
3) no longer uses the registry key HKEY_CURRENT_USER \ Software \ CarSup (Kilometraj). Now kilometers (passed) is stored in the database along with parts (XML) – which is very convenient … you may be several machines for each of their parts, your mileage. Section registry HKEY_CURRENT_USER \ Software \ CarSup can be deleted manually.
4) Added handling errors (the program does not “fall” If we have the wrong format base.)

5) Multilanguage support added. Russian and English interfaces. 

Downloads: https://sourceforge.net/project/showfiles.php?group_id=201020&package_id=299247

Posted in CarSupport | Comments closed

alLANBilling and alSUMBilling database optimization

Please delete old indexes before!

I recomend to add this indexes to speedup processing:

KEY `unix_secs` (`unix_secs`),
KEY `dstusecs` (`dstaddr`,`unix_secs`),
KEY `srcusecs` (`srcaddr`,`unix_secs`),
KEY `output` (`output`,`unix_secs`)

KEY `unix_secs` (`unix_secs`),

KEY `dstusecs` (`dstaddr`,`unix_secs`),

KEY `srcusecs` (`srcaddr`,`unix_secs`),

KEY `output` (`output`,`unix_secs`)

Posted in alLANBilling, alSUMBilling | Comments closed

In alLANBilling added database cleanup

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)

Posted in alLANBilling | Comments closed

New fixes! alSAMSBilling. 25042008

New version of the alSAMSBilling. 25042008

Changes:

Fixed counting money.

Added new columns in the user traffic table called “From Cache”, “From Internet”

Right now when counting user trafic you’ll see 3 colums “Total trafic”, “From Cache” and “From Internet”.

This meens trafic from squid cache or from internet and total traffic. In the cost column value will be only for the internet-traffic (i think this correct)

New version avaible at SourceForge. You should download asb250408-2.zip! In the asb250408.zip in user traffic table no column “Total trafic”!

Posted in alSAMSBilling | Comments closed

New project alStaff!

Today I starded new project called alStaff. This will be a database with web-interface for bussines phonebook and invventory database.

Wait for screenshots..

Posted in site | Comments closed

alb 2008!

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.

Posted in alLANBilling | Comments closed

asb 2008!

Oh… Happy new year!

Today me have woken and have informed, that it is impossible to see internet-statistics (in the alSAMSBilling) of work in December 2007…

Fixed! Right now you can select 2007 or 2008 year.

Month selection also fixed (“december bug”).

Posted in alSAMSBilling | Comments closed

New in asb071130

Displaying client’s IP address of the query (because same user name (login) may be used from the different computers):

Download from sourceforge.net

Posted in alSAMSBilling | Comments closed

Typical errors

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..

Posted in alLANBilling | Comments closed

Installing engine for alLANBilling

1) I hope that the NAT, routing, httpd, php, mysql,fprobe-ulog, flow-tools packages already installed
2) Add iptables rule to which all packages will be NAT-pass through ULOG
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
3) Also you will need the flow-tools (flow-tools-0.68-12.fc4.i386.rpm) (download and install)
4) Create a folder /var/flows/acct/ (storage flows)
5) Create a folder /root/flows/
6) In the folder /root/flows/ create two executable files:
Startup-script: /root/flows/runflow

#!/bin/sh
killall fprobe-ulog
killall flow-capture
/usr/bin/flow-capture -R /root/flows/rota -e 2 -w /var/flows/acct 127.0.0.1/127.0.0.1/2055
/usr/local/sbin/fprobe-ulog 127.0.0.1:2055

Script for exporting data to MySQL database: /root/flows/rota

#!/bin/sh
/usr/bin/flow-export -f3 -mUNIX_SECS,DOCTETS,SRCADDR,DSTADDR,SRCPORT,DSTPORT -u “root:pass:localhost:3306:ulog:raw” < $1

7) In the file /root/flows/rota change "root:pass:localhost:3306:ulog:raw"
to the your "login:password:mysqlhostname:port:databasename:tablename" to access MySQL
(the user must have write access to the database!)!
8) Login to the MySQL and create ulog database:

create database ulog

9) Create a table raw to store the data:

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(15) NOT NULL default ’0′,
`dstaddr` varchar(15) 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 `dstusecs` (`dstaddr`,`unix_secs`),
KEY `srcusecs` (`srcaddr`,`unix_secs`),
KEY `output` (`output`,`unix_secs`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

10) Add new user to the MySQL:
GRANT ALL PRIVILEGES ON ulog.* TO USER@localhost IDENTIFIED BY "PASSWORD";
You must change user and password!
11) Run /root/flows/runflow (add path to this script in the rc.local for autostart)
12) After 15-20 minutes watch the mysql database:

select unix_secs, srcaddr, dstaddr, doctets, srcport, dstport from raw;

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.
Check it, it must countain "-mUNIX_SECS,DOCTETS,SRCADDR,DSTADDR,SRCPORT,DSTPORT"!
13) Install the web-interface alLANBilling to view statistics
Posted in alLANBilling, alSUMBilling | Comments closed