You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Joshua Slive <jo...@slive.ca> on 2002/04/01 20:59:23 UTC

Re: I need help with access configuration by host and by IP for my mirror server I host...

On Mon, 1 Apr 2002, Apolinaras "Apollo" Sinkevicius wrote:
> 1. I would like to only allow poeple from USA, UK, Germany, Canada access
> those file on my Apache. How can I achieve that? Something like Allow
> directive . What I have now does not seem to work.

What you want isn't possible in any real sense.  People from ".com"
addresses can come from all over the world, and conversely, people from
the USA may be using many different top-level-domains other than
com/net/org.  People who want to do this in a serious way look at who owns
the IP address in question, but even that technique is full of holes.

> <Directory "/mysql">
Do you really have a directory "mysql" in your filesystem root?  I suspect
this should be <Directory /usr/local/apache/htdocs/mysql> or something
similar.

Also, you probably want to have
Order deny,allow

> deny from all
> allow from .com
> allow from .ca
> allow from .net
> allow from .org
> allow from .de
> allow from .uk
> </Directory>
>
> 2. I would like to block access from any unresolved host users (the ones
> who's IP can not be resolved into a host). How can that be done for just
> one directory?

The configuration you have above should block unresolved domain names.  If
you want to do it without a "deny from all/allow from ...", you can use
mod_rewrite.

> Is there a place I can download list of IP blocks for
> mentioned countries and do allow function for those blocks?

Not that I know of.

Joshua.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org