We are starting to phase out Joomla 2.5 listings Read More

Arrow up
Arrow down

Joomla! Extensions Directory



Site Access

Block Country from accessing your site. No need to enter IP ranges.

  • Get this

cfBlockCountry (Plugin)

The plugin cfBlockCountry can be used to block IP address from certain countries. For example if you want to block access of the site from any IP in United States you can use this plugin.

Some important points:

  1. It only blocks access to website and not the admin interface so that if you accidently block your own country you can reset the country list
  2. We use free DB from MaxMind. As per the MaxMind this DB is 99.5% accurate.
  3. There are 2 options in the plugin, if you want to use geoip database from local server, you can select the Local option after installing the plugin. But before you select local option please upload geoip folder in the plugin zip file to /libraries/ folder of joomla installation. If this operation is not performed and local option is selected this will cause error on Joomla and you may not be able to access joomla site unless plugin is disabled from DB.
  4. The benefit of choosing local option is that you can buy the latest more accurate DB from and use that DB


  1. Country Codes: This requires comma (,) separated list of Country codes that need to be blocked. For example US, IN, FR to block IP Address from United States, India and France.

  2. Verification: External (default) or Local. External will use CodeFire.org Server to validate the country. We use latest Free DB from MaxMind In case you want to use local Verification you will need to install the geoip DB on your server. Please do not enable Local without installing the DB. (Refer below for installing the DB)

  3. Message or Redirect: In case a user from blocked country accesses the site, you can display an error message or redirect them to some other site.

  4. Text Message: This is the error message that will be displayed.

  5. Site: You need to set url for the site where you want to redirect the user example http://www.CodeFire.org

Install GeoIP DB for local option.

  1. Extract the geoip folder from the plugin zip.
  2. Upload the folder geoip to libraries/ folder of Joomla installation
  3. Get the latest GeoIP.dat. and replace the existing (blank file with same name)one in /library/geoip folder
  4. Enable Local option in plugin settings.

Bug Fixed

  1. When Verification is set to Local plugin was not blocking countries. This has been fixed and will be available in new releases today forward (30 June 2010). Thanks to Markus for reporting the bug.

Joomla 2.5

This plugin now supports Joomla 2.5. all the above instructions apply to the new version as well. The default download from here is for Joomla 1.5. You will need to go to http://codefire.org/open-source.html to get the plugin for Joomla 2.5


It works, you can display a message or redirect

Ease of use

Very simple, enter country codes

I used this to: 1. This plugin uses a free API that is not for commercial use.. you can get banned if caught
2. Free API is limited to 250 requests per minute, more gets you banned
3. It's not the most accurate API, but it works.. but again, not for business sites!


Just followed the instructions and it worked nicely on first try. I tested with a proxy and it redirected to the designated page. Thanks!

Ease of use

Notworking with php 5.4

Posted on 10 March 2014


it seems to be a very good and simple plugin.

But its not working with php 5.4.

If they solve this issue, its a great deal

Excellent extension

Posted on 02 January 2014

It was so easy to setup.

I have a note though, I blocked my country in order to see how the site will behave, but I could not login to the admin backend.

I had to go through the phpmyadmin to remove my counrty from the table record. this should be revised again.

Very simple to install using your instructions. I used the local option, WOW what a difference on the server. Some of those hackers were hitting it fast & hard and it has been slow for weeks but after installing this and blocking the countries in question pages are loading instantly again. Thank you for making this free!

I originally tried this plugin some years ago but wasn't really sure about its usefulness. However recently my site has been really suffering from spurious sign-ups and, in another case a serious attempt at MySql insertion. Revisiting this plugin and installing it has eliminated the problem (till the bad boy start using proxies on me, I guess).

Oh and to avoid a wee panic and much blinking - ensure you use the correct version for 2.5 (as mentioned in the instructions above)!

Hi, I have been using this plugin on my 1.5 sites with great benefit. It does what it says and is hassle free. I installed this for my 2.5 site and now when I include US in the list of countries to test this plugin, the administrator page gets blocked as well. This doesn't happen on 1.5. It would be great if this could be fixed. Thanks!

Owner's reply: Hi,
Thanks for the review and feedbak. We shall fix this issue in 2.5 version and let you know.


Very usefull

Posted on 09 March 2012

Hi, I installed this plugin and find it very usefull, wathever, I can't really juge its results, but I think it works as it said.

To developper : admin needs to feel all country codes he wants to block , I think it could be better and easier to feel only country you want to allow and block all others, something like : block country = all exept us,ca,fr ... as you can permit only to your choice without searching all country codes.

Thanks whenever ...

Owner's reply: Hi Snooky147,

Thanks for the good rating and comments. I agree with what you have suggested and we shall incorporate that functionality soon!


Great product

Posted on 30 August 2011

Product was VERY easy to install and worked the first time I tried. I did notice that MaxMind has a city list as well. Sure would be nice to have that option as well!

Owner's reply: Hi There,

Thanks for the rating and comment. We initially thought that allowing this to work at city level would probably be an overkill as not too many sites are only focused on a very limited area. However, if you could provide more details on how this would be useful, we can go ahead and implement the same.

PS: By the way we have released the Joomla 2.5 version so you may want to use that for latest joomla installs

Works great!

Posted on 22 June 2011

Great job...works as it says.

1) install plugin

2) setup redirect www

3) setup an external IP database automatically or for local just copy the GeoIP as readme says

4) tested with FoxyProxy IP adresses from various country...WORKS!


One thing: it should be defined as a Redirect IP tool as well, not just a ban IP.

Owner's reply: Hi McLaren,

Thanks for the cool rating and great comments!
I agree that we should list this under "Redirect IP tool", but somehow I could not find that category on joomla extensions.



Date added:
Nov 18 2014
GPLv2 or later
Free download
Uses updater:
Download Demo SupportNot available Documentation
  • Overall
  • Functionality

  • Ease of use

  • Documentation

  • Support