Skip to main content

Posts

Showing posts from December, 2012

ban Asian ip addresses. Ban chinese spammers with htaccess

After receiving tons of spam on a few websites I've decided to ban the whole apnic addresses Since I've not found anything to ban the whole APNIC I've searched for the assigned classes that they manage. How to ban chinese spammers. P.S. I've added a few LACNIC (last update 2012-11-16) Download here the file or just add the content in a .htaccess file and the spam from the Asia should be gone. Put the .htaccess in the main (or any other) folder of your website. You can use the same approach to ban any other ipv4 address space. __________.htaccess____________ #list retrieved from #http://www.iana.org/assignments/ipv4-address-space/ipv4-address-space.txt #Banning APNIC deny from 1.0.0.0/8 deny from 14.0.0.0/8 deny from 27.0.0.0/8 deny from 36.0.0.0/8 deny from 39.0.0.0/8 deny from 42.0.0.0/8 deny from 43.0.0.0/8 deny from 49.0.0.0/8 deny from 58.0.0.0/8 deny from 59.0.0.0/8 deny from 60.0.0.0/8 deny from 61.0.0.0/8 deny from 101.0.0.0/8 deny f