Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevention from entire website downloading?

Tags:

iptables

yii

There is one IP (from China) which is trying to download my entire website. It downloads all my pages and loads the server significantly (I have more than 500 000 pages). Looking at the access logs I can tell it's definitely not a Google bot or any other search engine bot.

Temporarily I've banned it (using iptables rules), but it's not a solution for me, because some of my real users also have the same IP, so they are also banned and cannot acces the website.

Is there any way to prevent such kind of "user activity"? Maybe a mechanism which implements captcha if you try to request more than 5 requests a second or something?

P.S. I'm using Yii framework (PHP).

Any suggestions are greatly appreciated.

thank you!

like image 870
Mensch Avatar asked Aug 30 '10 05:08

Mensch


People also ask

Is it possible to save a whole website for offline browsing?

You can save webpages to read later, even if you're offline, like when you're on an airplane or somewhere else without an Internet connection. To read webpages later offline, download them in Chrome ahead of time.


1 Answers

You have answered your own question!

Make captcha appear if the request exceeds certain number per second or per minute!

You should use CCaptchaAction to implement, like this.

like image 188
pavanlimo Avatar answered Nov 15 '22 10:11

pavanlimo