A chisel-end hammer, cracked, near smashed to pieces by Anti-Hammer, in semi-transparent greyscale.Setup
Anti-Hammer

This page will (hopefully!) tell you everything you need to know to setup Anti-Hammer protection on your web site. It's usually straightforward.

If you need help with any aspect of the seup, I am an email away.

Quick-Start Guide:

Feedback

If you have a question, feel free to leave a comment, below. I don't expect it to get too busy; Anti-Hammer usually just works. If you think you have found a bug, please mail me about it, with full details, preferably attaching your script to thte mail. Thanks!


Welcome to the comments facility!


previous comments (three pages)   show all comments

Mickey - 03.11.11 3:25 pm

I've gotten this to work with WordPress, but I'm having a problem getting it to work with Joomla. Does anyone know of any settings that need to be adjusted for this to work with Joomla? Any settings with the anti-hammer.php file? smiley for :roll:

I have no idea, but if you let us know the kind of error(s) you are getting, someone might.

[edit]I just installed anti-hammer at my son's Joomla site, works great.

As for yours, if something isn't working your php error log should be your fist port of call.[/edit]

;o)



Max - 14.03.12 9:30 pm

If you wanted to block the 777 from others you could just make it so only your servers ip can access the file.

That is what the .htaccess file in that directory is for.


Now as a question I have is do you have an updated ip list the one thing im scared of is this thread is somewhat old and I do not want my search engine ranking to go down because certain bots cannot access it.

Old? Seriously? smiley for :lol: You are a funny one!

At any rate, it is your responsibility to keep your own exemptions up to date. See the links provided (above). They don't change much.

Also note: good spiders will NOT hammer your site in the first place, so your "ranking" cannot be affected. Want proof? Google: Anti-Hammer.

;o)



Leo - 20.04.12 4:44 pm

Hi, Cor.

The content of your site is really amazing. It's a powerful reference.

Yesterday, I was refreshing the Anti-Hammer Test Page (https://corz.org/hammer-test.php) to test it. After some (a lot!) clicks, I received a 503 HTTP error. I thought "Dude! I broke the site! Sh*t!". But then I came back to reality and realized this could be another protection.

Using an online proxy service, I could reach your site again. But without it, I was still seeing the 503 HTTP error.

The question is: this 503 HTTP error page is an Anti-Hammer feature or another security resource you use?

Thanks in advance for the answer and thanks for sharing your rich knowledge.

Best regards,
Leo.

I'm actually working on Anti-Hammer right now, adding many new features. A 503 ("503 Service Temporarily Unavailable") response is the standard response Anti-Hammer sends when you activate its protections. The idea being, if you back off, the service will become available again. After 50 violations (configurable) the ban is permenent (well, 24 hours at corz.org. Again, configurable)

The latest version (currently running at corz.org) will also send 501 and 403 responses, depending on the kind of violation encountered. Anti-Hammer can now protect referer spam (via black & white lists as well as by direct interrogation of referring pages), deny script-kiddie and h4x0r requests, bad IPs, user agents and more.

Download coming soon. More testing and documentation still required!

;o)



Mickey - 30.05.12 5:59 am

Hi Cor,

It's Mickey again. I believe the issue I had with my Joomla site is that the root directory where all of the Joomla files were stored had an underscore "_" in the directory name. If I moved the Anti-Hammer scripts outside of that directory to it's own directory with no underscores in it's directory name, it worked fine.

Curious! I have it inside a directory with an underscore on one of my dev sites and it works fine. If you have any error output from Anti-Hammer in the old location, I'd love to see it! ;o)



Carlos Rene Rangel Salazar - 26.07.12 8:48 am

First let me tell you... I AM VERY GRATEFUL FOR YOUR SITE AND SCRIPTS! Never in my whole life I have found and individual so useful... really, thank you!

Now, my question is... in my site I have a chat bar similar to facebook that is run via javascript in all my website BUT handles the chat messages in another server making the polling OUTSIDE my page, sometimes many times per second, but itself the chat bar checks every minute for changes (mainly online/offline users check).

Will this be an issue with the hammering? If you want to know what I mean by chat (I'm a spanish speaking person so I dont know if I'm making myself clear) this is my site www.nsm.mx you can see the chat as a guest.

Anyway... thank you for everything done here!


Check the preferences - there are many ways to ignore certain files/types/directories. Your chat should be fine. ;o)



Carlos Rene Rangel Salazar - 03.08.12 7:17 am

I dunno if this info could help you, but here it goes.

I use this script in my forums... its awesome! But in the log I found that it was blocking some files that I think are common this days... the tapatalk forum app its very popular in both ios and android, and its script (mobiquo.php) was blocked SECONDS after initial load of anti-hammer.

Also, I think its blocking the Opera Turbo service... you know, the one that uses Opera servers to compress a webpage to send it again to the smartphone... because in my log I found a LOT of bannings from opera-mini.net and their IP (I think) 141.0.9.7

I already let Tapatalk in... but the info on Opera Turbo (available in desktop too) I dont know how to "interpret" it...



Carlos Rene Rangel Salazar - 03.08.12 7:11 pm

Also having problems with Opera Turbo... is there a way to use the "X-Forwarder" as explained here http://tiffanybbrown.com/2011/08/11/opera-turbo-and-ip-address-blocking/ for preventing the IP from Opera Turbo/mini to be "restricted" to a lot of my users...

Or how do i write an excemption for Opera Turbo? I cant seem to find the "range" of IP Adresses that they use... Onlye the user agent, like this

visitor: s05-12.opera-mini.net [141.0.11.26] (Opera/9.80 (Series 60; Opera Mini/6.5.29702/28.2197; U; es) Presto/2.8.119 Version/11.10)
accepts: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/webp, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1

But... a lot with different IP :S I know its a proxy, but a VERY USED ONE to appear a lot of times, many peaople just use turbo witout knowing its a proxy, and Opera Kindly gives us the right IP in the X-Forwarder

Also this one is showing (and, as its from the allmighty this times facebook... It should be important)

69.171.224.0 [69.171.224.0] (facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php))

Same.... different IP now and then... this doesnt appear to be a bot either, just informing it to you (widely used service)

I'll look into it. ;o)



Ross - 12.08.12 1:19 pm

Hi,

I like your site and had bookmarked it on delicious.com. My delicious feeds appear on my website (lower right hand corner of the home page).

When I click your link it says.

Bad vibes from referring page!

Why do you have bad vibes about my page?

Because the first time an inward link came from that domain, it was from /wp-admin/, so when Anti-Hammer attempted to check the page for a real link, none was found (it could not login to your admin area). Finding no link, Anti-Hammer blacklisted the domain. I've white-listed it now. ;o)



Ross - 13.08.12 1:30 pm

That is weird. I can't imagine why it came from wp-admin, I am not using a plugin or anything for that, it's just a php script that parses the delicious RSS feed written directly into the sidebar...

anyhow thank you for following up and white-listing my website.


Marius - 15.01.13 8:59 pm

Nice script! for VPS you must to add the php_value in php.ini not in .htaccess (for me when i was trying to add to htaccess generate Internal Server Error)

Cheers


Voyager - 24.06.13 3:22 am

Hello.

Since php_value auto_prepend_file is not an option for us, i would like to ask if this script could be turned in a function(s) and called with an available "hook" that most php applications have.

thanks


I have no idea what you mean by 'hooks' (php has similar things, which you may be referring to) but sure, I'm happy to do any custom work on Anti-Hammer.

Just get in touch. ;o)



next comments (1 page)

First, confirm that you are human by entering the code you see..

(if you find the code difficult to decipher, click it for a new one!)


gd verification image

 

Welcome to corz.org!

I'm always messing around with the back-end.. See a bug? Wait a minute and try again. Still see a bug? Mail Me!