Help getting traffic value
Hello.
I am wondering how can I find out how much traffic a client has consumed on a linux router at a point of time. For example I guess I should run a script (bash or php) to find out how many bytes has pass through the router to and from ip 192.168.2.100. I would like to know how I can get that value. I know if I issue iptables -nvL | grep 192.168.2.100 I get some values but, if the router gets restarted or iptables rules are flushed I'll loose those values. Any idea? Thanks in advanced. |
Have a look at ulogd, or similar solutions. They allow you
to store iptables accounting information into e.g. a postgreSQL database (which will keep track over reboots). Cheers, Tink |
All times are GMT -5. The time now is 06:31 PM. |