[Zope] newbie q: how to block IP

Toby Dickenson tdickenson@geminidataloggers.com
Wed, 12 Feb 2003 15:09:38 +0000


On Wednesday 12 February 2003 2:34 pm, Sungmook Kim wrote:
> hi!
>
> i have this guestbook similar to what is shown in the
> zope book.
> i'd like to know if there are possibilities to write a
> script or a code which blocks unwanted ip addresses.
> thanks

For protectiong a single page you can check REQUEST[`REMOTE_ADDR`], or in Zope 
2.7 REQUEST.getClientAddr()

If you really care about security then it is best to run Zope behind a proxy 
such as squid, pound, or apache. All these proxies have IP address filtering.

-- 
Toby Dickenson
http://www.geminidataloggers.com/people/tdickenson