epsilon_da n00b
Joined: 17 Jan 2006 Posts: 28
|
Posted: Thu Jan 19, 2006 8:38 pm Post subject: iptables counter |
|
|
hi.
I am finding some tool which uses the iptables counters and make statistics, like with vnstats but with the ports which i want to monitor.
I think this could be stripped with normal tools like grep, sed, cut, etc. directly from iptables -L -v -n -t mangle, but it turns dificult when you have lots of ports or ips which you want to monitor. The best way, i think is tell to iptables to count to a separate file on /proc/net/whatever, maybe some new target like
${iptables_bin} -A POSTROUTING -o ${LAN_IF} -t mangle -j COUNT --name LAN
${iptables_bin} -A PREROUTING -i ${LAN_IF} -t mangle -j COUNT --name LAN
and then look at the files on /proc/net/count/LAN
somebody know something like that?
i looked for account module but it makes counts depending on the ip who sends the packet. |
|