Order of match extensions
Hi,
Does the order of match extensions matter for iptables rules? Can someone explain why the following 2 rules produce different results:
1. Matches lots of packets as expected:
iptables -t mangle -A FORWARD -i eth0 -m mark ! --mark 99 \ -m state --state NEW -m statistic --mode nth --every 1 -j LOG
2. Does not match any packets:
iptables -t mangle -A FORWARD -i eth0 -m state --state NEW \ -m statistic --mode nth --every 1 -m mark ! --mark 99 -j LOG
The only difference is the place of the "mark" match (either at the end or the beginning).
(Debian iptables v1.4.8)
Andy
Quoted 3 lines · Andrew Beverley
Hi,
Does the order of match extensions matter for iptables rules?
Clearly.
Quoted 7 lines · Jan Engelhardt
Quoted 3 lines · Andrew Beverley
Hi,
Does the order of match extensions matter for iptables rules?
Clearly.
Okay... so why does this rule appear to not match anything?
iptables -t mangle -A FORWARD -i eth0 -m state --state NEW \
-m statistic --mode nth --every 1 -m mark ! --mark 99 -j LOGIs the importance of the order documented anywhere?
Thanks,
Andy