On Thu, Nov 14, 2002 at 12:26:59PM +0200, Sheldon Hearn wrote: > On (2002/11/13 10:23), Eric Anderson wrote: > > > Can I ask why the (near) duplicate rule sets in the message you're > > referring? Can I get away with just these two lines: > > > > pass in quick on hme0 proto tcp from any to any port 80 flags S/SA keep state head >20 > > block in quick from <offender>/32 to any group 20 > > I'd suggest you go over the HOWTO _very_ carefully; it looks like you > skimmed. :-) > > The second rule you specified will _never_ be reached for packets coming > in via hme0, because you pass them _quick_ in the first rule. From then > on, packets that form part of the initiated stream are passed by the > state table because the first rule does keep state. > > Drop the _quick_ modifier from the first rule, and then you're in > business. Of course, you're also back to a linear scan. :-)
I'm not sure who skimmed, but "quick" has a different meaning when included in a group head statement. According to the man page for ipf: "If quick is used with a head rule, rule processing isn't stopped until it has returned from processing the group." So the quick in the head statement does not mean that it will stop processing right away. Rather, it means that processing will stop after the group has been processed. So the second rule above _will_ be reached. -Andy
