Best way to block a country by IP address?

Posted by George Edison on Server Fault See other posts from Server Fault or by George Edison
Published on 2010-08-03T20:50:29Z Indexed on 2012/09/07 21:40 UTC
Read the original article Hit count: 260

Filed under:
|
|

I have a website that needs to block a particular country based on IP address. I am more than aware that IP-based blocking is not a foolproof method for blocking visitors, but it is a necessary step in the right direction.

Since I'm using PHP, what I would do is use a GeoIP database like geoplugin.net. However, I'm curious to know if there's a better way of doing this.

The website is on a shared webserver (I don't have root access) and it is running Apache on centOS. I guess my question is "can an .htaccess file be configured to block by IP using an external source to lookup IP addresses."

© Server Fault or respective owner

Related posts about apache2

Related posts about block