[Zope] blacklisting referers and/or specific hosts

Tim Hicks tim at sitefusion.co.uk
Mon Jul 4 08:36:57 EDT 2005


David Pratt wrote:
> Hi Tim.  I think what Jens has to say is the best solution. I have also
> made my own thing with zope as well since I don't always have control
> of the firewall.

Yes, this is the problem I have.  I'm hosted on zettai, so am a little
limited in the options available to me (I believe).  Zettai have said they
will have a solution in place within 2-3 months, but I'd really like to
sort something out in the meantime.

>  I worked out a simple ip and country-ip solution. I
> made a simple interface for adding ips to a black list or selecting
> countries to add to black list. The logic makes a final connection to
> my main site template so ips in black list or ip turning out to be from
> a black listed country get nothing but an empty page (including an
> empty page header) while those that I want to view my site will get
> rendered pages.  I use a county-ip database that gets updated once per
> week (about 50,000 records) representing ranges from all countries.

Blimey, 50,000 records sounds pretty heavy (for my purposes)!  As far as I
can tell, there are two or three IP addresses producing all of these pesky
requests.  Do you have code that you can share?

Tim


More information about the Zope mailing list