Page 1 of 1

Apache1.3 und Autentifikation

Posted: 2003-03-28 13:05
by cyberline
Hallo, kann ich in einer .htaccess angeben das die Hosts, die keinen Zugriff erhalten sollen, aus einem DBM File gelesen werden ?

Re: Apache1.3 und Autentifikation

Posted: 2003-03-28 15:18
by freeze
Du kannst die erlaubten Benutzer/Gruppen in einer DBM ablegen: http://httpd.apache.org/docs/mod/mod_auth_dbm.html

Re: Apache1.3 und Autentifikation

Posted: 2003-03-28 15:19
by cyberline
Freeze wrote:Du kannst die erlaubten Benutzer/Gruppen in einer DBM ablegen: http://httpd.apache.org/docs/mod/mod_auth_dbm.html
Das weiss ich aber ich habe ein Modul was denied Hosts in eine DBM Datei schreibt und die will ich Blocken lassen...

Re: Apache1.3 und Autentifikation

Posted: 2003-03-28 16:08
by freeze
Wenn Du mit Perl klar kommst mach es doch mit PerlAccessHandler. Infos dazu z. B. auf http://perl.apache.org/docs/1.0/guide/security.html.

Oder aus den Docs zu Apache 2.0:
http://perl.apache.org/docs/2.0/user/ha ... essHandler
PerlAccessHandler
The access_checker phase is the first of three handlers that are involved in what's known as AAA: Authentication and Authorization, and Access control.

This phase can be used to restrict access from a certain IP address, time of the day or any other rule not connected to the user's identity.

This phase is of type RUN_ALL.

The handler's configuration scope is DIR.

The concept behind access checker handler is very simple, return Apache::FORBIDDEN if the access is not allowed, otherwise return Apache::OK.

The following example handler denies requests made from IPs on the blacklist.[...]
Und an der Stelle

Code: Select all

my %bad_ips = map {$_ => 1} qw(127.0.0.1 10.0.0.4);
kommt dann natürlich der Code zum Auslesen aus DBM.