I have some loser from China that keeps trying to hack my server about 50-60 times a day, literally. Does anybody know of a way I can block China from my sites and servers? I would like to block the entire country from my main server if I can. I have a VPS account with hostgator if that helps or if anybody knows of a service or script that they have that would be awesome. I was wondering if it could be done with .htaccess but don't know how to do that, where to put the file and what to include in it. I would really like to block all Asian countries and Russia from my sites and servers if anybody can help that would be awesome. Thanks, Rob
Install CSF firewall, in the configuration (usually found in /etc/csf/csf.conf) search for "CC_DENY" and add the 2-letter ISO country codes (comma separated) there such as "CN" for China, "RU" for Russia, etc...save and restart CSF and there you go Personally I would avoid loading up too many blocks in .htaccess since this can make the file quite heavy and it is read on every visit by the web server.
Better idea: Install Cloudflare as your DNS manager and use this feature with Cloudflare. It significantly cuts down on spambots and malicious things, including DDoS.