{"id":98,"date":"2010-11-28T23:18:54","date_gmt":"2010-11-28T23:18:54","guid":{"rendered":"http:\/\/pgregg.com\/wp\/2010\/11\/referrer-and-comment-spammers-are-a-pita\/"},"modified":"2020-06-02T11:27:42","modified_gmt":"2020-06-02T10:27:42","slug":"referrer-and-comment-spammers-are-a-pita","status":"publish","type":"post","link":"https:\/\/blog.pgregg.com\/blog\/2010\/11\/referrer-and-comment-spammers-are-a-pita\/","title":{"rendered":"Referrer and Comment spammers are a PITA."},"content":{"rendered":"<p>This shouldn&#8217;t be news to anyone &#8211; but Referrer and Comment spammers are a real pain in the a*se.\u00a0 Polluting my web logs and making any meaningful log analysis problematic.<\/p>\n<p>So, I now have an itch to scratch and I&#8217;m going to do something about it. I would encourage you, the reader, to do something about it too.<\/p>\n<p>Firstly, get yourself over to <a href=\"http:\/\/www.projecthoneypot.org\/?rf=73568\">Project Honey Pot<\/a> and read up on the project.\u00a0 If you can, set up a Honey Pot or two yourself. Also be sure to read about the <a href=\"http:\/\/www.projecthoneypot.org\/faq.php#g\">http:BL<\/a> &#8211; this works along similar lines to the DNS blacklists used for Email spammers.<\/p>\n<p>Next, I&#8217;m going to write a general Apache mod_perl module which will provide integration (lookup) to the http:BL and allow the user to &#8220;action&#8221;* the abusers.\u00a0 Minimally, it will prevent the normal apache log files from being polluted by diverting the log entries to a httpbl logfile.<\/p>\n<p>* &#8220;action&#8221; &#8211; To provide flexibility, I&#8217;m thinking of running an external script with the IP of the abuser.\u00a0 The script can then perform any action you wish. The one I&#8217;m going for is an iptables firewall block.<\/p>\n<p>Comments and suggestions welcome.<\/p>\n<p>Project Honey Pot has implementations for several languages, including <a href=\"http:\/\/www.php.net\/\">PHP<\/a> and <a href=\"http:\/\/www.perl.org\/\">Perl<\/a> (the languages that mean most to me).\u00a0 There may be an implementation for your <a href=\"http:\/\/www.projecthoneypot.org\/httpbl_implementations.php\">Web application <\/a> so you might not be interested in what I&#8217;m doing at all \ud83d\ude42<\/p>\n<p><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.projecthoneypot.org\/images\/php_logo.gif?w=525&#038;ssl=1\" alt=\"Project Honey Pot Logo\" \/><\/p>\n<div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>This shouldn&#8217;t be news to anyone &#8211; but Referrer and Comment spammers are a real pain in the a*se.\u00a0 Polluting my web logs and making any meaningful log analysis problematic. So, I now have an itch to scratch and I&#8217;m going to do something about it. I would encourage you, the reader, to do something &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.pgregg.com\/blog\/2010\/11\/referrer-and-comment-spammers-are-a-pita\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Referrer and Comment spammers are a PITA.&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"1","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[10],"tags":[48,94],"class_list":["post-98","post","type-post","status-publish","format-standard","hentry","category-php","tag-httpbl","tag-spam"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pbQOUu-1A","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/blog.pgregg.com\/blog\/wp-json\/wp\/v2\/posts\/98","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.pgregg.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.pgregg.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.pgregg.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.pgregg.com\/blog\/wp-json\/wp\/v2\/comments?post=98"}],"version-history":[{"count":1,"href":"https:\/\/blog.pgregg.com\/blog\/wp-json\/wp\/v2\/posts\/98\/revisions"}],"predecessor-version":[{"id":875,"href":"https:\/\/blog.pgregg.com\/blog\/wp-json\/wp\/v2\/posts\/98\/revisions\/875"}],"wp:attachment":[{"href":"https:\/\/blog.pgregg.com\/blog\/wp-json\/wp\/v2\/media?parent=98"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.pgregg.com\/blog\/wp-json\/wp\/v2\/categories?post=98"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.pgregg.com\/blog\/wp-json\/wp\/v2\/tags?post=98"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}