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

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 ?

Who is Participating?
NopiusConnect With a Mentor Commented:
Did you read: ?
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 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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.