3

A very popular website has begun using my Flickrshow javascript slideshow, but failed to notify me beforehand, and so is using a version that downloads the images used from my server. This is resulting in my server being inundated with 100+ requests per second for these images, and crashing or slowing the server to the point that it times out. Its also eating a load of bandwidth.

I am running a VPS using Ubuntu from Rackspace cloud, and have access to IPTables and/or Ubuntu Uncomplicated Firewall (UFW), but need to block by referrer since I can't tell what the IPs requesting the image will be. I don't want to let the request get as far as Apache as that is already affecting performance. Is it possible to block with a firewall or is there a better way? Something like ...

-A INPUT -m string --string "Referrer: http://www.rockinrio.com.br" --algo bm --to 65535 -j DROP

... was recommended but I can't get it to work, but then normally I use UFW.

1 Answer 1

2

Using javascript's document.referrer string you can add an overlay on your thumbs saying : Unlicensed used of Flickrshow :-)

or better, display some ads by replacing the thumbnail with an ads display script and make money with them, they will quickly correct their website and offload your Apache web server :-)

You may find this interesting also

https://stackoverflow.com/questions/7232344/link-flickrshow-image-to-a-url

To block them at iptables rules level (to answer the real question) Don't forget that it will drop connections with everything with this string.

iptables -t raw -A PREROUTING -m string --algo bm --string "THE REFERRER DOMAIN ONLY" -j DROP

ref:

http://www.servercircle.com/Server-Firewalls/IPtables-match-on-string-of-characters_415 http://spamcleaner.org/en/misc/w00tw00t.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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