Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Web Hosting Forum


You are currently viewing our Web Hosting Forum as a guest. Please register to participate.
Login



Reply
Blocking all IP's except US & Canada
Old 07-13-2007, 02:01 PM Blocking all IP's except US & Canada
Novice Talker

Posts: 10
Name: Cody Singsaas
Trades: 0
I am looking to make changes to my .htaccess file so that all ip addresses are set to deny and I will explicitly allow only ip addresses from the US & Canada. I am able to discern which IP addresses are allocated to these two countries from the following URL:

http://www.ipmaster.org/ranges.php

I have two questions however.

1) How often are ip addresses reallocated, moved or added to a specific countries range of ip's? For instance, is there ever a conceiveable scenario where the US would take over an IP block that was previously allocated to Mexico? Will specific US IP ranges ever fall out of service or move to new countries? Are all IP addresses accounted for? Will the US be adding new IP's moving forward that did not exist (i.e. were not previously allocated to any other country)?

2) This will require a good number of entries in my .htaccess file. Will this in effect slow down the web site for all US & Canada users to the point where I will loose any benefit I will have received from keeping undesireables out?
__________________
IE Internet Solutions / Cody Singsaas (President)

Please login or register to view this content. Registration is FREE
from a trusted provider

URL
Please login or register to view this content. Registration is FREE
/ Email
Please login or register to view this content. Registration is FREE
csingsaas is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-13-2007, 06:56 PM Re: Blocking all IP's except US & Canada
Banned

Posts: 253
Name: Michel Samuel
Trades: 0
Your .htaccess file will be beyond huge !

Therefore...
1) Download the free maxmind database. Or pay for the really good one.
2) Setup msql with your IPs.
3) Use a script that can be called from each page.

Faster...
Cleaner....
Less work...
Michel Samuel is offline
Reply With Quote
View Public Profile
 
Old 07-14-2007, 08:06 AM Re: Blocking all IP's except US & Canada
damien_ls's Avatar
Layershift

Posts: 474
Name: Damien
Trades: 0
Take a look at this old thread which is pretty similar: GeoIP blocking of countries

It should get you going in the right direction...

What's your motivation for wanting to block all other traffic? There are always some anomalies which aren't accounted for, so I expect you'll probably block a small % of traffic which is "genuine" and let others (e.g. UK AOL users for a start) through as US visitors.
__________________

Please login or register to view this content. Registration is FREE
:: DDS & Dedicated, UK & USA-based
Please login or register to view this content. Registration is FREE
, Reseller & Shared Hosting
Experienced Parallels Platinum Partners (Plesk since 2001, Virtuozzo since 2003)
damien_ls is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Blocking all IP's except US & Canada
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.04517 seconds with 12 queries