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

When I'm looking at the output of iptables -L

# iptables -L
Chain INPUT (policy DROP)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere
ACCEPT     udp  --  anywhere             anywhere            udp dpt:1194
DROP       all  --  anywhere   
DROP       all  --  anywhere             anywhere            state INVALID

I've always assumed that the rules execute in order top to bottom. But reading the documentation I haven't been able to verify that. Can anyone confirm?

share|improve this question
up vote 3 down vote accepted

Yup, it does (

If the packet does not match, the next rule in the chain is the examined

). BTW, iptables-save gives a way more readable output.

share|improve this answer
Thanks! I didn't know about iptables-save ... that's super helpful. – Antonius Bloch Feb 2 '11 at 19:41

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.