Deny Access to Spammer IP
81.95.146.227 . From this IP I manage a few spam bots to average over 1500 of comments per day in one blog. This means unnecessary extra traffic on the server and stress for Acism ;-) . The best example is webmasterscafe.info , where one appears every 2-3 minutes spam comment from ip: 81.95.146.227 .
Two simple methods of blocking a IPof or classes of IP-uri spam-bot .
1 . Blocking access to one or more IPs/classes of IPs and/or domains from .htaccess .
The following lines are written in the .htaccess file from the webroot:
order deny,allow
deny from all
allow from 81.95.146.227 (baneaza un singur IP)
allow from .numedomeniu.tld (baneaza intreg domeniul, inclusiv subdomeniile) allow from 133.123.* (banaeaza toti userii care folosesc ip-uri de la 133.123. in sus .)
allow from 69.*.255 (baneaza toata clasa de IP-uri care incep cu 69)
2. Blocking an IP or a domain using the PHP code at the top of the page.
$block = array(“81.95.146.227”, “123.123.69.69”);
if (in_array ($_SERVER[‘REMOTE_ADDR’], $block)) {
header(“Location: http://google.com/”);
exit();
}
P.S. And I curse the ISP … Good thing that this time it also tells me in the browser who I have to curse :)
While reading the URL: http://www.webmasterscafe.info I encountered the following error:
* Zero-length replica
Squid has not received any information as a result of this request.
Your cache administrator is .. :D .
Deny Access to Spammer IP
What’s New
About Stealth
Passionate about technology, I write with pleasure on stealthsetts.com starting with 2006. I have a rich experience in operating systems: Macos, Windows and Linux, but also in programming languages and blogging platforms (WordPress) and for online stores (WooCommerce, Magento, Presashop).
View all posts by StealthYou may also be interested in...
2 thoughts on “Deny Access to Spammer IP”