Apache Conf

Hi guys,

our server has been getting attacked everyday by some people,,, what happens is that they find one file on our server (lets say a zip file 5 meg ) and they make soooo many connections to the same file that the server stops functioning pretty much, I looked over the maxclient config for httpd.conf and doubled the number, but after 2 minutes, it would reach the new maxclient again,,, i ended up grabbing that ip and block it in the iptable, now my question is,,, is there a way that in apache you can limit the number of requests for each ip and reject all the other connections? or can you suggest any other way to protect our selfs agains this attacks?

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Pétur Ingi EgilssonSoftware Engineer -- ConsultantCommented:
Use a script
I lack the time to learn/write one for you right now but i'll provide the blueprints.

add something like this as a cronjob, to be run every x-minutes ( 2 minutes? ) .. would still give your attacker 2 minutes to hammer your server :S
tail -n 500 /var/log/apache2/access_log
if 3 or more lines contain the same IP and the same *.zip filename then block that ip in your firewall

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
The answer is Intrusion Prevention (IPS)

You can install an IPS hardware (such as Tipping Point) in your Internet gateway or install an IPS agent software on the machine itself.

There are many vendors that offer different IPS software agents such as Symmantec, Cisco, McAfee, and many others.

There might be free software available for this but I have not experimented any.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.