Author image Héctor Daniel Cortés González

NAME

Apache::Access::Abuse - Perl extension for avoid access abuse to your web site

SYNOPSIS

  # /etc/httpd.conf
  Alias /pub/ /var/ftp/pub/
  <Directory /var/ftp/pub/>
     PerlAcessHandler Apache::Access::Abuse
     PerlSetVar AllowFrom "127. 172.16."
     PerlSetVar MaxConnections 1
  </Directory>

ABSTRACT

Limits the number of simultaneous connections from the same network to your web site.

DESCRIPTION

Apache::Access::Abuse limits the simultaneous connections from the same network to your web site. All networks are presumed to be Class B.

You can define one or more trusted networks, which have unlimited access, setting the perl var AllowFrom

  PerlSetVar AllowFrom "127. 172.16."

You probably want unlimited access to your loopback interface and your local network.

Apache::Access::Abuse works as follows:

First, it grants access if the connection is comming from your trusted networks. Second, it ties a hash to a shared memory block named "ApAc", and it pushes a PerlLogHandler. Later, it denies access if the number of connections from the given network has reached the max number of connections. Otherwise it grants access. Finaly, when the request reaches the PerlLogHander, it decrements the counter and deletes the hash slice if needed.

TODO

There is only one shared memory block, so you can't select differens access rules for different directories or locations in your web server filesystem space.

AUTHOR

'Aztec Eagle' Turbo, <turbo@cie.unam.mx>

COPYRIGHT AND LICENSE

Copyright (C) 2003. Centro de Investigación en Energía, Universidad Nacional Autónoma de México.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

IPC::Shareable

1 POD Error

The following errors were encountered while parsing the POD:

Around line 166:

Non-ASCII character seen before =encoding in 'Investigación'. Assuming ISO8859-1