Solved

Image hotlink - How to prevent and allow using ip address

Posted on 2007-03-26
1
183 Views
Last Modified: 2010-03-18
Hi Experts.

A customer has a Webserver (Apache 2) with a custom system that allow users to create his own websites. Like a Site Builder.

The Problem:

All websites images are store in a single directoty calles website_imgs, and each web site points the img links to www.isp.com/website_imgs/uploaded_image.jpg.

But a lot of customers are linking these images to orkut profiles, etc.. causing a lot of bandwitdht usage.

I see a lot of tutorials to block Hotlinking and only allow to specific referers. But i can´t do this because a have more than 100.000 authorized referrals.

Is there a way to allow link from a ip range ?

0
Comment
Question by:tullioc
1 Comment
 
LVL 27

Accepted Solution

by:
Nopius earned 500 total points
ID: 18797347
Did you read: http://httpd.apache.org/docs/2.0/misc/rewriteguide.html#access ?
There are interesting topics  'Referer-based Deflector' and 'Blocked Inline-Images'.
If you have >100k authorized referral domains, you may start from inverse rule: disallow access for specific refferers (from which you see the most traffic, i.e. from orkut.com domain).

I don't know any apache module to restrict referal for specific IP range. If such module exists, your apache probably would have degraded performance. For each request it should do domain-to-IP resove (which is quite long procedure).

It's possible to limit referal for domain names (via map file), but not for IP address.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now