homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

htacess country ip blocking
we only want visitors from US and JP
steven mheakyle

 1:31 am on Sep 26, 2006 (gmt 0)

I would like to know if somebody already did this type of world wide IP blocking?

Is there a quick way to do this?

this is my existing blocking:

<Files *>
order deny,allow

# Nigerian/African 419 Scammers IP addresses follow:
deny from
deny from
deny from
deny from 62.56.235.
deny from 62.56.236.
(long long long long list)
(i have a 21mb list of ips)
deny from 58.71.0/17
deny from 61.9.0/17
deny from 61.14.192/18
deny from 61.28.128/18

allow from #*$!.#*$!.#*$!.#*$!




 7:13 pm on Sep 26, 2006 (gmt 0)

Blocks (ranges) of IP addresses are assigned on an as-needed/as-requested basis. Therefore, there is no direct correspondence between IP address ranges and countries.

The usual solution (other than long lists of 'Deny from' IPs) is to use GeoIP or similar services to get a country-code for the requesting IP, and then screen requests to your site based on that value.


Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved