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?
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.
awesome...waiting for the code!
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