Mobile app version of vmapp.org
Login or Join
Si4351233

: How to preventing massive hotlinking of images before Apache? A very popular website has begun using my Flickrshow javascript slideshow, but failed to notify me beforehand, and so is using a

@Si4351233

Posted in: #Hotlinking

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: 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.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Si4351233

1 Comments

Sorted by latest first Latest Oldest Best

 

@Samaraweera270

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
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:
www.servercircle.com/Server-Firewalls/IPtables-match-on-string-of-characters_415 spamcleaner.org/en/misc/w00tw00t.html

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme