1

If I want to build traffic counter for each IP on Iptables, Which table shall I put the rules in? Mangle, Raw, Nat or Filters?

I used to put it in Filters, but it seem doesn't count correctly

iptables -t filter -N COUNT
iptables -t filter -A COUNT -s 192.168.10.10
iptables -t filter -A COUNT -d 192.168.10.10
iptables -t filter -I FORWARD -j COUNT

1 Answer 1

2

Filter is the correct table to put the rules in. If you want help debugging your incorrect counts, you should probably give some details about that.

1
  • I Finally agree with your answer after 4 hours testing and debug between each table. Actually Mangle and Filters are quiet equals in counting.
    – Ta Coen
    Jul 20, 2011 at 15:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .