Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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 could list that which iptables rule has how many matched packets, then I could create a better/faster iptables script that's faster. That rule would be at top/first that has the more packets matched.

share|improve this question
up vote 1 down vote accepted

iptables -L -n -v

See also this article: http://greenmice.info/en/node/127, there are some other tips.

share|improve this answer
The link you shared seems to be dead. – Alix Axel Apr 4 '14 at 4:06

I wouldn't spend all that much time worrying about this. If you have a rule which you know gets hit extremely often (related,established rule for example), you could put that near the top. But in general I highly doubt that any more optimization will really pay off in any way.

share|improve this answer

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.