Image hotlink - How to prevent and allow using ip address

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 ?

tulliocAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Artysystem administratorCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Networking

From novice to tech pro — start learning today.