Home > Questions and Answers > General Questions

How to SHUT OFF Russia from my WP sites? (5)


09-25-2011 12:39 AM #1 index (Member)
How to SHUT OFF Russia from my WP sites?

I was just looking through the logs on a few of my affiliate sites, and I consistently see people from Russia doing stuff I don't like. I've had at least two DDOS attacks (one on my P202 server) which I'm guessing is from them. That russian traffic never clicks affiliate links, and seem to be only there to try and screw with things. This is over 3 different hosting accounts, at different webhosts, and I have 5 or 6 sites on each one.

How can I shut off Russia? Sure, not all Russians are bad hackers, but enough is enough. I don't want to let people from countries where everyone is trying to hack my stuff access my sites in the first place.

Is there a simple way to do it?
Would I be doing more harm than good by blocking them? Will they just get mad and be even more motivated to cause me stress?
Is there a good hosting company to work with that is on top of preventing this kind of stuff?


09-25-2011 01:20 AM #2 polarbacon (Moderator)

Quote Originally Posted by index View Post
I was just looking through the logs on a few of my affiliate sites, and I consistently see people from Russia doing stuff I don't like. I've had at least two DDOS attacks (one on my P202 server) which I'm guessing is from them. That russian traffic never clicks affiliate links, and seem to be only there to try and screw with things. This is over 3 different hosting accounts, at different webhosts, and I have 5 or 6 sites on each one.

How can I shut off Russia? Sure, not all Russians are bad hackers, but enough is enough. I don't want to let people from countries where everyone is trying to hack my stuff access my sites in the first place.

Is there a simple way to do it?
Would I be doing more harm than good by blocking them? Will they just get mad and be even more motivated to cause me stress?
Is there a good hosting company to work with that is on top of preventing this kind of stuff?
just geo redirect them.....people do it all the time for russia and china......

you can do it thru a pretty basic htaccess and the apache_mod from maxmind...

just block or redirect at the country code...


09-25-2011 01:26 AM #3 index (Member)

thx. The geo-redirect is an easy fix. I'm familiar with the javascript one, but htaccess sounds like the best way to do it. Once I get it working I'll post the htaccess code here for everyone else.


09-25-2011 02:02 AM #4 constantin (Member)

awesome...waiting for the code!


09-25-2011 03:47 AM #5 mediadude (AMC Alumnus)

Hi index and constantin, I just did exactly that a few days ago. If you have a virtual server, get the support staff to install geoip support on the server (I use KnownHost, fast support and speed). Don't use csf as that will overload your server as the firewall will have to check all the rules. htaccess is best to go, here's an example I'm using to block China, India, Pakistan, Israel and Russia.

GeoIPEnable On
GeoIPDBFile /usr/share/GeoIP/GeoIP.dat

SetEnvIf GEOIP_COUNTRY_CODE CN BlockCountry
SetEnvIf GEOIP_COUNTRY_CODE IN BlockCountry
SetEnvIf GEOIP_COUNTRY_CODE PK BlockCountry
SetEnvIf GEOIP_COUNTRY_CODE IL BlockCountry
SetEnvIf GEOIP_COUNTRY_CODE RU BlockCountry

Deny from env=BlockCountry


Home > Questions and Answers > General Questions