Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
iptables -t filter -A COUNT -d
iptables -t filter -I FORWARD -j COUNT
share|improve this question
up vote 2 down vote accepted

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.

share|improve this answer
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 '11 at 15:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.