Block an Entire Country by IP
Some web sites need to be so interconnected. Do me a Facebook bridge, and a Flickr one, and of course don't forget the Twitter. Umm, look left, see that grey bar, I'm a candidate myself to all this social buzz, oh... Google Buzz, get it on the list as well.
So we want to get our sites as much exposed as possible. Good thing is that potential socionet followers will help up spread the word about out web deeds and thus give some sense to all this agitation in front of our laptops.
But the world is far from perfect and the many opening doors allow bad robots to nest their avatars on our sites, to register and sit there for weeks, or months, waiting for some occasion to exploit and harm our web business. CAPTCHAS have been the acclaimed security keys, locking our registration pages —and other interacting forms— from the robots. But then, any new defense will challenge for a novel attack, as always. So the CAPTCHA forms never were the ultimate in stopping robots. Some experts are reasonably reassuring us that this security image system is compromised. More or less, some other experts may add. All in all, it's yet another deterrent to a degree. Good to have it in place but not enough. It all depends on how much attention your site collects. And how much spam load.
Here's a non-gracious method of defense, known from ancient times: the country ban. Simply put: your site sells horseshoes in Kentucky, right? Why on earth should you need visitors from North Korea?! Good, now go here:
and select your desired countries to get banned from your site, for ever and ever. Click the GO button and copy/paste the generated .htaccess file. Load it in your web root. Done.
Is this method perfect? Nope, nothing is perfect under the Sun. The workaround is that, say, a Korean-based attacker may use a proxy server situated in another country, from an allowed IP address, to attack your site.
Solution: Ban list as many countries as you deem secure, knowing that your business will never need clients from those places.
Results: Except for the rare case of some hostiles aiming at your server on purpose (attacking from Kentucky-based proxies), your site will get less to no spam in no time.
From the tech point of view, the solution is quasi-perfect because robots are crafted to attack at random, and when/if some humans will target your site, not at random, then it stops being a tech related issue. It's a legal one.
- Georg's blog
- Login or register to post comments
- Printer-friendly version
- Send to friend

Comments
China Blocks
'nother inspiring resource:
http://www.okean.com/antispam/china.html