0

Is there a way to block users from a particular region. Currently I have compiled a list of over 100 IP addresses that I block in my .htaccess file. Unfortunately as the list grows I see a great number of offenders come for the same areas, like China. Can I block that entire country? Or region?

4
  • Are you really prepared to firewall off a billion people because of 100 bad apples?
    – sarnold
    Feb 27 '11 at 6:18
  • Yep! They are not a part of my market but a few rotten tomatoes spoil the experience for my community here. And I'd like to add to it Korea too.
    – santa
    Feb 27 '11 at 6:19
  • Isn't this taking the naughty & nice thing a little bit too far? :-)
    – David Gelhar
    Feb 27 '11 at 6:21
  • Not sure what you mean. When you site with thousands of members goes blank for a few hours -- is it time to be nice?
    – santa
    Feb 27 '11 at 6:24
3

Use GeoMax lite to identify the country and block them. mod_geoip apache module can help you in what you want to do.

1

You can try this in the .htaccess file:

<Limit GET HEAD POST>
order allow,deny
Country: China
ISO Code: CN
allow from all
</Limit>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy