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:
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?
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.
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.
__________________ Layershift :: DDS & Dedicated, UK & USA-basedManaged Virtuozzo VPS, Reseller & Shared Hosting
Experienced Parallels Platinum Partners (Plesk since 2001, Virtuozzo since 2004)