{"id":964,"date":"2014-05-28T10:27:07","date_gmt":"2014-05-28T14:27:07","guid":{"rendered":"http:\/\/www.blogseye.com\/?page_id=964"},"modified":"2014-06-20T12:14:30","modified_gmt":"2014-06-20T16:14:30","slug":"bad-neighborhood-ip-list","status":"publish","type":"page","link":"http:\/\/blogseye\/bad-neighborhood-ip-list.html","title":{"rendered":"Bad Neighborhood IP List"},"content":{"rendered":"
I am always looking for alternate ways to block spam. Spam is taking up about 70% of the bandwidth on my websites and causing problems for me. Web hosting companies charge me more because of the number of executions and bandwidth generated by spammers.<\/p>\n
I wound up having to pay for the bandwidth from spammers. If I “deny” an IP or range of IP numbers I am not charged for those hits. It never hits a PHP file and does not generate any CPU time.<\/p>\n
I have a program which adds to the htaccess file every time Akismet, Stop Spammers or my plugin kill-agents discovers an abusive user.<\/p>\n
The plugin just adds an IP address, but then I noticed that spammers tend to come from the same neighborhood or 24 bit subnet. This makes sense. A host, like China Mobile, that does nothing to stop a spam farm will harbor multiple spam farms on the same network. You make a normal IP address into a 24 bit subnet by dropping the stuff after the last period in the IP or using a \/24 at the end. I do this manually right now, and only when I see lots of spam coming from the same subnet.<\/p>\n
The upside of this is that the deny list is short. The downside is that you ban 256 IP addresses for each line of the file. It may be that one of those 256 is legit. This, however, is not likely. Most spammers need a host machine that they can use for installing complex software. The hosts that tolerate this behavior own blocks of IP addresses. Any traffic coming from that block is not human, it has to be a program. Humans come from Internet Service Providers who give different blocks out to the humans using the service to surf the web. Sometimes the PCs owned by humans can have malware that can send out spam, but often that is not comment spam or login dictionary attacks, it is simple email spam. It is generally safe to block a network neighborhood because of a spammer. Where there is one, there will soon be others.<\/p>\n
Here is my current .htaccess file. I am testing it with blogseye.com. Since I have started using it my spam hits are about 10% of what they used to be.<\/p>\n
Download the following list and add it to the top of your .htaccess file for your website. It is updated automatically whenever Akismet or Stop Spammers detects a spammer. <\/p>\n
If you intend to use this list you must go to the donate<\/a> page and leave a donation through PayPal or bitcoins as soon as possible.<\/p>\n