Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How to block IP adresses which access more than n pages in m period of time? I want to block all auto-traffic and I am not sure how to approach this issue.

share|improve this question
The answer could probably involve involve fail2ban, which can monitor logfiles and dynamically add and later remove iptable rules depending on the results, though many of the tutorials you'll find probably deal with avoiding brute-force login attempts. – Ulrich Schwarz Jul 18 '12 at 6:00

I moved my entire site (name-based VHosts) to SSL and redirect every Request with HTTP 301 "Moved permanently". This had the benefit of having a much much simpler apache-config (one 100 line file) AND most spammers / bots are completely gone. Apparently the don't manage the redirect or SSL.

And your users data is protected!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.