how to count byte flow of a host in iptables
hello all,
I am a fresh user to iptables. And I want to use iptables on my LAN
gateway.
I know that in ipchains byte flow is how to be counted:
A counter rule is insert to chain FORWARD with specified $ip and
without target.
Packets whose source ip equals to $ip will match the rule, and its
byte flow
will be recorded.
Then we can read out the record from /proc/net/ip_fwchains.
But in iptables there is no file as /proc/net/ip_fwchains. And I do not know which chain to insert the rule in , filter/FORWARD or
chains in table
nat/mangle?
And if I had the counter rule, how can I get the flow record out? ( I
mean by code , maybe I
can copy the source code of iptables :-)).
thanks.
Hugh.Liu
_________________________________________________________________
享用世界上最大的电子邮件系统— MSN Hotmail。 http://www.hotmail.com