IPDeny: Country Block List
There have always been a lot of requests on how to block certain countries from accessing sites due to SPAMMERS, and while there are various modifications here to help weed these wonderful individuals out, they are not fool proof and or cause too many false positives for some.
Another method is to utilize blocking of IP addresses. Unfortunately vBulletin does not support IP prefixes thus you have to either use wild cards or enter each and every IP address you want to block. So we are left with utilizing .htaccess files as ultimately this might be the most secure way to block these individuals as they will never reach your site. You can even provide them with a custom message if you so desire as well. Of course this also can be circumvented with the use of open Proxy servers but at least we are making them jump through some hoops and possibly making them go find an easier target. I have taken the zone files from regional IP space providers and listed them into a singular .htaccess file listing each country individually. By default nothing is blocked. All you need to do is to un-remark any country or singular IP address block. Typically what I do is when a spammer registers I look at the IP address then lock out that block trying not to limit the entire country. This will work with ANY web site that is running an Apache web server or that can utilize a .htaccess file. Zone files are typically 99.5% accurate and rarely change. I have made every attempt to be careful in compiling this into a single file. However I am human and do make mistakes so I take no responsibility if there is a bad entry or two in there. 7/12/2012 Initial release 2/5/2014 File updated with Gargamello's fixes to my typos. Download
htaccess.zip (366.5 KB, 143 downloads) |