Deny Access to IP Spammer

81.95.146.227 . From that manage several IP Spam bots to put an average of 1500 de comments a day in one blog. That means extra traffic on the server and made unnecessary stress Akismet ;-). The best example is webmasterscafe.info Where the 2-3 minute each one appears comment spam from IP: 81.95.146.227 .

click

Two easy ways to block IPSites or classes IP-hate spam-bot .

1. Block access to one or more IPs / classes of IPs and / or domains from .htaccess .

Be written to the file. Htaccess in webroot following lines:

<Limit GET>
order deny, allow
deny from all
allow from 81.95.146.227
(banning a single IP)
allow from. numedomeniu.tld (banning the entire field, including subdomains)
allow from 133.123. * (banaeaza all users who use IPs from 133.123. up.)
allow from 69. *. 255 (class banning all IPs that begin with 69)

2. Block an IP address or a domain using PHP code at the top of the page.

<? Php
$ block = array ("81.95.146.227", "123.123.69.69");

if (in_array ($ _SERVER ['REMOTE_ADDR'], $ block)) {
header ("Location: http://google.com/");
exit ();
}
?>

PS . And curse the ISP ... Well this time and the browser tells me who to swear :)

While reading the URL: http://www.webmasterscafe.info

I encountered the following error:

* Replica zero-length

Squid did not receive any information as a result of this request.

Cache administrator is YOUR .. : D.

.

Deny Access to IP Spammer

About the author

Stealth

Passionate about everything that means gadgets and IT, I write with pleasure stealthsettings.com from 2006 and I like to discover with you new things about computers and operating systems macOS, Linux, Windows, iOS and Android.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment is processed.