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.
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.
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
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)!
As per our discussion on email, it seems you had installed the plugin meant for Joomla 1.5 on Joomla 2.5. Installing the correct version fixed the issue.
Thanks for the review and feedbak. We shall fix this issue in 2.5 version and let you know.
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 ...
Thanks for the good rating and comments. I agree with what you have suggested and we shall incorporate that functionality soon!
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
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.
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.
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.
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 firstname.lastname@example.org. Also we have released Joomla 2.5 version may be you would want to try that.
I would like to see some further information: Is every page request checked or only once per session, which would prove not such a good solution for those robots, which request a page again and again per session...
Many thanks for providing such useful suggestions on the plugin. We shall definitely implement these in near future and update you once done.
Thanks for the feedback and rating. I agree with your suggestion on excluding a certain IP address from the given country. We shall implement this in near future and keep you updated.
Installed locally on my XAMPP server and it is not working (popuing up an error). also it would be nice to attach a country code list to the extension.
Thanks for the feedback. Though you have not provided the exact errors that you encountered on local setup, but a lot of times cURL is not enabled by default and that could lead to errors displaying.
We have released a new version for Joomla 2.5, if you try the same and still get any error message please feel free to contact me (email@example.com) and I will ensure that all issues are taken care of!
All of us who are running forums as part of our Joomla! sites or have enabled user comments, especially when our user base is relatively local, want to restrict who can access the site in order to reduce spam/hacking attempts. That's what this does, on a country basis using a geo-ip address database.
There are even two modes of operation - external or local. The local option means that you can install the database (free, monthly download from www.maxmind.com) and therefore not be dependent on maxmind's online service being available.
It's early days (I only just installed and tested it) but I would say this is a winner.
I'm not a joomla expert but this product seems to work ok, and like the review above I tested it on my own country which it blocked.
I've no doubt some spammers will figure out a way around it within a week using proxy servers or something but at least for now it works great on my site. ....thanks.
This plugin was easy to install even for a novice like myself.
Configuring the plugin is simple, because you can just add the two letter country codes instead of IP ranges.
It works perfectly (I tested it for my own country) and I have not noticed any incompatibility issues.
The developer responded quickly to my inquiry.
In the future it would be nice to be able to block back-end admin interface also and see somekind of statistics of blocked attempts.