All pastes #455978 Raw Edit

jessica

public text v1 · immutable
#455978 ·published 2007-04-24 16:23 UTC
rendered paste body
[bugatti]$ cat .htaccess 
<Limit GET>
    Order Deny,Allow
    Deny from all
    Allow from internal.penguininside.net
</Limit>

the apache manual says:

The Allow directive affects which hosts can access an area of the server. Access can be controlled by hostname, IP address, IP address range, or other characteristics of the client request captured in environment variables.

The first argument to this directive is always from. The subsequent arguments can take three different forms. If Allow from all is specified, then all hosts are allowed access, subject to the configuration of the Deny and Order directives as discussed below. To allow only particular hosts or groups of hosts to access the server, the host can be specified in any of the following formats:

A (partial) domain-name
    Example: Allow from apache.org
    Hosts whose names match, or end in, this string are allowed access. Only complete components are matched, so the above example will match foo.apache.org but it will not match fooapache.org. This configuration will cause the server to perform a double reverse DNS lookup on the client IP address, regardless of the setting of the HostnameLookups directive. It will do a reverse DNS lookup on the IP address to find the associated hostname, and then do a forward lookup on the hostname to assure that it matches the original IP address. Only if the forward and reverse DNS are consistent and the hostname matches will access be allowed.