Portal Home > Knowledgebase > Articles Database > I want to block all visitors from country X


I want to block all visitors from country X




Posted by hknight, 10-05-2007, 03:30 PM
Hello, I have experianced a number of attacks all from a specific country. I would like to completely block access to all users from that country. I realize that this is not fool proof because people from that country could still use a proxy. I also realize that people in that country that are not hackers would not be able to access my web site but for the time being I still want to put this in place. I use Linux / Cpanel / Apache. I have iptables installed. Is there any way I can block all access to people from the problem country? Thanks!

Posted by Patrick, 10-05-2007, 03:42 PM
Do you want to block these visitors for a single website or the whole server?

Posted by hknight, 10-05-2007, 04:20 PM
The whole server would be best.

Posted by Patrick, 10-05-2007, 04:47 PM
What country? You're going to have to find out the IP ranges for local ISP's and go from there... if it's a large country you could be in for a very long night. If you're lucky, they only have a few ISP's in which case finding their IP ranges will be somewhat easy.

Posted by -Edward-, 10-05-2007, 07:02 PM
http://www.blackholes.us/zones/countries/ Add them to deny_hosts or iptables.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Using rsync and ftp (Views: 506)
Experience (Views: 512)