Hello,
We just went through a period where someone was seriously leeching
bandwidth. See the attached graph. It started just after midnight and I
noticed it this morning and took care of it.
We run a proxy on that server and someone was referring requests for
YouTube videos on their site to be served via our proxy.
What I did was to use a location block to return a nasty jpg to all
requests that match their requests.
location ~ /part-of-encoded-URL {
rewrite ^(.*)$ /bandwidth-leech.jpg permanent;
}
You can see the results. The requests went away completely after a short
while.
I initially tried using the HTTP Referer Module but it seems it is
designed to require a list of valid referrers and others default to
invalid. Given the nature of my app, pretty much all referring sites are
"valid" and I would rather be able to list "invalid_referers", perhaps
in "http" section. Then I could add them to my list as they arose, and
not need a location block for each, in each server. If there's a way to
do this, I missed it in the Wiki and the Russian docs.
Attachments:
open |
download -
localhost-if_eth0-day.png
(23.1 KB)