#linux trafic accounting system KERNEL_VERSION="2.4.31" #wget http://kernel.org/pub/linux/kernel/v2.4/${KERNEL_VERSION}.tar.bz2 IPTABLES_VERSION="1.3.3" #wget ftp://ftp.netfilter.org/pub/iptables/${IPTABLES_VERSION}.tar.bz2 POM_VERSION="20051026" #wget ftp://ftp.netfilter.org/pub/patch-o-matic-ng/snapshot/patch-o-matic-ng-${POM_VERSION}.tar.bz2 #wget http://malster.nnov.ru/traf/trafcnt-0.2.1-m.tar.bz2 cd /usr/src/ tar xvfj linux-${KERNEL_VERSION}.tar.bz2 ln -s linux-${KERNEL_VERSION}.tar.bz2 linux tar xvfj iptables-${IPTABLES_VERSION}.tar.bz2 ln -s iptables-${IPTABLES_VERSION}.tar.bz2 iptables tar xvfj patch-o-matic-ng-${POM_VERSION}.tar.bz2 tar xvfj trafcnt-0.2.1-m.tar.bz2 tar xvfz linux-${KERNEL_VERSION}-ow1.tar.gz patch -p0 < linux-${KERNEL_VERSION}-ow1/linux-${KERNEL_VERSION}-ow1.diff cp trafcnt-0.2.1-m/ipt_TRAFCNT.h linux/include/linux/netfilter_ipv4/ cp trafcnt-0.2.1-m/ipt_TRAFCNT.c linux/net/ipv4/netfilter/ patch -p0 < trafcnt-0.2.1-m/linuxconf.patch patch -p0 < trafcnt-0.2.1-m/linuxmake.patch cp patch-o-matic-ng-${POM_VERSION}/Netfilter_POM.pm /usr/lib/perl5/5.8.0/i686-linux/ cd patch-o-matic-ng-${POM_VERSION} ./runme --batch --kernel-path=/usr/src/linux --iptables-path=/usr/src/iptables connlimit ./runme --batch --kernel-path=/usr/src/linux --iptables-path=/usr/src/iptables connrate ./runme --batch --kernel-path=/usr/src/linux --iptables-path=/usr/src/iptables mport ./runme --batch --kernel-path=/usr/src/linux --iptables-path=/usr/src/iptables time ./runme --batch --kernel-path=/usr/src/linux --iptables-path=/usr/src/iptables u32 ./runme --batch --kernel-path=/usr/src/linux --iptables-path=/usr/src/iptables pptp-conntrack-nat cd .. cp trafcnt-0.2.1-m/libipt_TRAFCNT.c iptables/extensions/ patch -p0 < trafcnt-0.2.1-m/iptables.patch cd iptables make #make install #iptables cd .. cd linux make menuconfig make dep make bzImage #edit /etc/lilo.conf; #install kernel cd trafcnt-0.2.1-m for i in trafcnd trafsum trafcat ; do gcc -Os -s -o $i $i.c ; done #install trafcnt-utils #DONE