Welcome to the new directory. If you find a bug, please report it on our Issue Tracker.

Arrow up
Arrow down

Joomla! Extensions Directory

logo

Introduction

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

Configuration:

  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


Notworking with php 5.4


Posted on 10 March 2014

Hi,



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.

Best!
Pranjal

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!

Best!
Pranjal

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.

Best!
Pranjal
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!



thanks



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.

Best!
Pranjal

After installing the pluging it did not work, but GREAT support from Pranjal, at it works perfectly.


This Does Not Work


Posted on 12 May 2011

I appreciate the attempt at creating a plugin for joomla using MaxMind...however it did not work for me.



Here is what I went through.... I installed the plugin. I went to configure the plugin....it gives you 2 options... to check the country codes database externally or... to run the db locally. My first choice was to try to run it externally since there was absolutely no setup required (minus entering in country codes, and page message for the blocked user)... after choosing that option I refreshed my website and I was getting a website is not available error... and I dont think it was the plugin at work. Therefore I tried the local option...and I followed the instructions left in the readme file... those instructions told me to move the geoip folder to the libraries directory under my joomla site... then get the .dat file from the Maxmind site, then overwrite the blank file in the libraries/geoip folder... after doing all of that... i got the same results as when i tried to run it externally... the whole website does not work unless I disable the plugin. Wasted a lot time trying to figure this out, and still cannot get it to work properly.

Owner's reply: Hi jthompson,

I am really sorry that the plugin did not work for you. We would be willing to work on this and resolve the issue. Either post a comment here or send an email to pranjal@codefire.in. Also we have released Joomla 2.5 version may be you would want to try that.

Best!
Pranjal

CFBlockCountry

Version:
1.0
Developer:
Pranjal
Date added:
Nov 18 2014
License:
GPLv2 or later
Type:
Free download
Uses updater:
Includes:
Compatibility:
2.5
Download Demo SupportNot available Documentation
  • Overall
  • Functionality

  • Ease of use

  • Documentation

  • Support