Solved

Image hotlink - How to prevent and allow using ip address

Posted on 2007-03-26
1
182 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
CentOS7 Xvnc gdm login 9 179
Lame BIND 9.3 10 52
Help instaling linux on vmware 36 75
how to monitor remote shell execution on linux 9 93
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…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

757 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

16 Experts available now in Live!

Get 1:1 Help Now