Using a Linux Box, how can a meter IP addresses for data transfer per month?

TechBoyJK

Lifer
Oct 17, 2002
16,699
60
91
Hi,

I need to find a way to meter data transfer per month from my linux server. There will be 5 sites, each with a dedicated IP address. I need to meter each IP address to track how much data is transfered to and from each IP address. Is this possible? If so, how can I cut off access to the IP after a certain quota has been met? I would like to redirect any visitor to a different URL when a certain threshold has been met. Any and all advice is greatly appreciated. =)
 

azev

Golden Member
Jan 27, 2001
1,003
0
76
is it on a lan or wan ??
On a lan, you can use managed switch. They have port counter information normally.
I am not so sure about wan, but I am sure there are some routers that has counters.
 

Haden

Senior member
Nov 21, 2001
578
0
0
iptables count information about passed bytes/packets for rules. You could make different rules for all 5 IPs and then look at statistics with:
iptables -L -v.
Try ipac-ng, thought I think there is better fitting software for this purpose (quota and all).
 

TechBoyJK

Lifer
Oct 17, 2002
16,699
60
91
:) Metered on a LAN, but traffic would be going to and from the internet. Data Center web hosting situation.