Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
iptables counter
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
epsilon_da
n00b
n00b


Joined: 17 Jan 2006
Posts: 28

PostPosted: Thu Jan 19, 2006 8:38 pm    Post subject: iptables counter Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum