Re: Restringir el acceso por IPs..
| From: | José Rodríguez | Date: | Sat, 04 Nov 2000 23:20:22 +0000 |
| Subject: | Re: Restringir el acceso por IPs.. | ||
| References: | 1 2 3 4 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-3217@lists.php.net to get a copy of this message | ||
También se puede hacer usando alguna configuración
de seguridad del servidor WEB.
En apache:
Es mucho mas poderoso que simplemente entregar una lista de IPs.
Se puede definir un dominio o una sub-red por ejemplo:
Order deny,allow
Deny from all
Allow from .ncsa.uiuc.edu
-------------------------
The allow directive affects which hosts can access a given directory. Host
is one of the following:
all
All hosts are allowed access
A (partial) domain-name
Hosts whose names match, or end in, this string are allowed access.
A full IP address
An IP address of a host allowed access
A partial IP address
The first 1 to 3 bytes of an IP address, for subnet restriction.
A network/netmask pair (Apache 1.3 and later)
A network a.b.c.d, and a netmask w.x.y.z. For more fine-grained subnet
restriction. (i.e., 10.1.0.0/255.255.0.0)
A network/nnn CIDR specification (Apache 1.3 and later)
Similar to the previous case, except the netmask consists of nnn high-order
1 bits. (i.e., 10.1.0.0/16 is the same as 10.1.0.0/255.255.0.0)
Example:
allow from .ncsa.uiuc.edu
All hosts in the specified domain are allowed
--------------------------
----- Original Message -----
From: <pgodel@vnco.net>
To: <lista@phpes.com>
Sent: Friday, November 03, 2000 7:08 PM
Subject: Re: [PHP-ES] Restringir el acceso por IPs..
> PHP guarda el IP de donde proviene el pedido en $REMOTE_ADDR
>
> Saludos,
> Pablo Godel
>
> Quoting luish <lugarcia@calvin.univalle.edu.co>:
>
> >
> >
> > Alguien me puede dar una idea para restringir accesos a
> un Sitio Web de
> > mi servidor usando PHP por los numeros IPs?...
> >
> >
> > gracias..
>
> ---------------------------------------------------------------------
> Manual PHP en español: http://www.php.net/manual/es/
> Para dar de baja la suscripción, mande un mensaje a:
> lista-unsubscribe@phpes.com
>