On Wednesday 13 November 2002 17:28, Eric Anderson wrote:
> > i've implemented groups and it's not that confusing, documentation is
> > a bit terse, but I heard that is being updated. I grouped rules based
> > on interface like:
> >
> > block in quick on hme0 all head 20
> > pass in quick <something> group 20
> > ....
> >
> > you clould basically put anything in the 'head' rule and it will work
> > more or less as you'd explect. The howto has some usefull remarks.
> >
> > Now I have only a small ruleset, but it helps to keep thing organised....
>
> I just finished re-reading the groups section in the how-to and I'm not
> sure it's what I'm looking for.
>
> Let me reiterate: I've got a rules list of about 2500 items, each of
> them blocking a single IP address which has been misused (typically an
> misconfigured anonymous proxy):
>
> block in quick on hme0 proto tcp from w.x.y.z/32 to any
>
> I'm not sure how groups would help me with this? All incoming packets
> are:
>
> a) on the same interface
> b) the same protocol (http)
> c) basically the same type of packets that I'm trying to block
>
> so there's no way to "shortcut" the list. It's going to have to be
> scanned each and every time. Or am I missing something?
However, the only packets you need to check against your ruleset, are those
with SYN set....
pass in on hme0 proto tcp from any to any port 80 flags S/SA head 20
pass in quick on hme0 proto tcp from any to any port 80 flags S/SA keep state
block in quick on hme0 proto tcp from <offender>/32 to any group 20
block in quick on hme0 proto tcp from <offender>/32 to any group 20
block in quick on hme0 proto tcp from <offender>/32 to any group 20
block in quick on hme0 proto tcp from <offender>/32 to any group 20
block in quick on hme0 proto tcp from <offender>/32 to any group 20
block in quick on hme0 proto tcp from <offender>/32 to any group 20
block in quick on hme0 proto tcp from <offender>/32 to any group 20
block in quick on hme0 proto tcp from <offender>/32 to any group 20
block in quick on hme0 proto tcp from <offender>/32 to any group 20
block in quick on hme0 proto tcp from <offender>/32 to any group 20
....
This way, only SYN packets without ACK set, to port 80 would be checked
against your filter rules for offending IP addresses.
Anything which gets through this will cause an entry in the state table, and
match further connections without a problem.
At least, that's the theory ;)
(Ok, I've not used groups before, but then our firewall ruleset isn't that
complicated....).
-Antony
*************************************************************************
This e-mail and any attachments may contain confidential or privileged
information. If you are not the intended recipient, please contact the
sender immediately and do not use, store or disclose their contents.
Any views expressed are those of the individual sender and not of Kinetic
Information System Services Limited unless otherwise stated.
www.kinetic.co.uk