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             ip-x.x.x.nydsl.com
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?

link|improve this question

feedback

1 Answer

up vote 2 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.

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

Your Answer

 
or
required, but never shown

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