
If you are a webmaster and you want to prevent a specific computer from browsing your blog, you know that the only solution you have got is to determine the IP address of his Internet connection and block it by adding to the .htaccess file the following code: deny from xxx.xxx.xxx.xxx. That’s quite easy, isn’t it? But what if you want to block the population of a whole country? This is quite a hard task because it is not easy to know all of the IP addresses used by the telephone companies of that country to deliver Internet connections to its users. Today with BlockaCountry.com this is not a problem anymore. As a matter of fact it is sufficent to select the country you want to block and hit GO, to get not only the IP addresses used by that country, but the whole code to add to the .htaccess also! That’s really easy!
Tags: security, web utility
Related ArticlesLatest Articles
- How to Automatically Login (Access) to Windows 8
- How to See and Read Unread, Archived and Sent Messages on Facebook
- Switch to the New Facebook Profile Layout (Timeline)
- How to Discover and Recover All Stored Passwords in your Windows Computer
10 Comments to “Block an entire country by stopping its IP addresses with BlockaCountry”
Leave a Comment
Web Talk is best viewed in Firefox.
September 14th, 2008
Here is another website which does the same thing:
http://www.countryipblocks.net/
November 19th, 2008
You can check also:
http://shoxt.com/block.php – free service with biggest ip database. Select a counties and the site will generate htaccess automatically.
November 19th, 2008
Hi webtalk
I need help. I think I have a few pages with strange url, that i can see from my wassUp stats. That xxx is a porn site. And Google crawls it all the time. I never link to them in the first place. Please help. How to remove and block it because it’s not only one page

eg :
/page/92/?ref=www.xxx.com-www.xxx.com-www.xxx.com-www.xxx.com
Sorry I always want help
November 19th, 2008
How do you know that Google crawls them all? As a matter of fact I think that Google is not crawling them. Look for yourself here site:www.balisugar.com
As you see google is not crawling them. What it seems to me is that spam bots are trying to spam your site. Anyway what you can do is use your robots.txt to stop Google to crawl them, just in case you think that you may have got duplicate contents:
Here is a quick solution:
Disallow: *?ref=www.xxx.com*
By the way, are you sure that you have not got any mysql injection? In fact spammers could add to your blog address other strings to redirect your traffic somewhere else even though it doesnt seem your case.
Just apply the tag above and you should be fine.
November 19th, 2008
Hey John, thanks for your link. It seems to have a bigger IP database even though I dont like their adult sponsors. I also like their service to mask webasite addresses. Thanks again!
November 19th, 2008
Thanks, Webtalk. I have added that code to my robots.text. I don’t know if I have a mysql injection or not. How can I tell?
November 21st, 2008
My Friend, according to wordpress.org I been hack
I’m trying to fix slowly.
May 15th, 2009
Blockacountry.com has one of the worst IP databases around. There data is stale, out of date, incorrect and missing major portions of data. Country IP BLocks IP database is updated at least once a day and includes every currently active network in the world.
Country IP Blocks also has a searchable database and country blocks in 7 different formats.
My advice is to compare the data between the two. A perfect example is to compare countries. For example here is the data on Afghanistan on blockacountrt.com:
Now compare that with the accurate data at Country IP BLocks
blockacountry.com is missing almost half the active networks and that’s just for Afghanistan.
May 15th, 2009
Thanks for this great insight! Your are definitly right, Country IP BLocks is definitly better!
October 1st, 2009
http://www.ip2location.com/blockvisitorsbycountry.aspx
They offer the latest country list for free with the most up-to-date IP database.