IP-Accounting by iptables?
Hi,
is it possible to log the moved (kilo|mega|giga)bytes per ip on every interface by iptables? I'll to see, how many MegaBytes and from where flows trought my routerinterfaces per diem. I don't want any huge statistic tools like mtrg, nagios, etc, only the amount of bytes per diem and per IP. ie: Code:
[...] THX TobyD |
Here's one idea:
Code:
# Create two new chains with default action of RETURN Use: Code:
iptables -L ether0-out -v Code:
iptables -Z ether0-out You could do something similar for the INPUT or FORWARD chains depending on what you need to monitor. |
exactly this! :)
now, i must create one rule for each of my ip and my log could be then: iptables -nxvL $RULE | awk '{ print $2; }' many thanks! TobyD btw: found this even by google: http://k12linux.mesd.k12.or.us/nag2/...ccounting.html :) |
All times are GMT -5. The time now is 09:14 PM. |