Re: [LARTC] IMPT!!! - What software to use to gauge if Bandwidth control is working/successful ??

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have tried IPCHAINS IP Accounting.

However, the amount of traffic as accounted for by IPCHAINS for the amount
of bandwidth going through the ports of my linux box, is not accurate at
all. In fact, the number is completely off!

Could u send me your ipchains scripts? thanks in advance.

*******************************************
Below is what i did, which give me the wrong figures. Am I missing something
here??

In rc.firewall, i added the following lines:

# To accept traf-stats for MRTG
/sbin/ipchains -N web
/sbin/ipchains -A web -j ACCEPT
/sbin/ipchains -N ftp
/sbin/ipchains -A ftp -j ACCEPT
/sbin/ipchains -N dns
/sbin/ipchains -A dns -j ACCEPT
/sbin/ipchains -N telnet
/sbin/ipchains -A telnet -j ACCEPT
/sbin/ipchains -A input -p tcp --dport www -j web
/sbin/ipchains -A output -p tcp --sport www -j web
/sbin/ipchains -A input -p udp --dport www -j web
/sbin/ipchains -A output -p udp --sport www -j web
/sbin/ipchains -A input -p tcp --dport ftp -j ftp
/sbin/ipchains -A output -p tcp --sport ftp -j ftp
/sbin/ipchains -A input -p tcp --dport domain -j dns
/sbin/ipchains -A output -p tcp --sport domain -j dns
/sbin/ipchains -A input -p udp --dport domain -j dns
/sbin/ipchains -A output -p udp --sport domain -j dns
/sbin/ipchains -A input -p tcp --dport telnet -j telnet
/sbin/ipchains -A output -p tcp --sport telnet -j telnet


traffic.sh  -->  the script to be run under MRTG.

#!/bin/sh
#Courtesy of xidus.net.
statname=$1
uptime=unused
stat=`cat /proc/net/ip_fwchains | grep $statname | tail -1 | awk '{print
$10}'`
echo $stat
echo $stat
echo $statname
echo $uptime





[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux