CloudGuard


It was not long ago that I was looking for a way to block visitors from some countries on some of my clients websites. The sites really only needed to be accessible from North America and did not need to be exposed to the extra visitors, bandwidth and possible hackers that might just want to hack their websites for fun. Since I setup all my clients with CloudFlare now it is possible to turn on IP Geolocation in CloudFlare to know what country users are from, but unless you are an enterprise customer with CloudFlare you cannot outright block a whole country.

I had been using a simple PHP function on my customers websites to simply look for the CloudFlare IP Geolocation header and if the person was not from the country that was not allowed I was blocking them, but had never gotten around to turning it into a full blown WordPress plugin. Now thanks to CloudGuard I can retire my quick test and use their plugin to only allow visitors from the countries we want to be able to access a website.

Using CloudGuard you can simply whitelist the countries you want to be able to login to the website and know that the rest will be blocked. You even get a nice map showing you the countries that have been blocked.

The plugin has cut down on the number of hacking attempts on WordPress considerably and it is very easy to use if you are a CloudFlare user, even free users are able to use it. Just a matter of turning on the IP Geolocation in CloudFlare so CLoudGuard can read the location header that CloudFlare adds to a visitor when they visit your website. The only feature that might be nice to have on CloudGuard would be the ability to block people not just from the login but from the whole website altogether.

If you want to cut down on the number of hacking attempts and limit access to your WordPress login to a country or two and are a CloudFlare user as well I suggest you give CloudGuard a try. It has been a great help since I installed it on clients websites.

Download it at the WordPress plugin repository.

Categories: wordpress