nixCraft Linux Forum

nixCraft

Linux / UNIX Tech Support Forum

Lighttpd Wildcard based hotlink prevention

This is a discussion on Lighttpd Wildcard based hotlink prevention within the Web servers forums, part of the Mastering Servers category; Originally Posted by rockdalinux Try this Code: #### stop image hijacking (anti-hotlinking) $HTTP["referer"] =~ ".*BADDOMIN\.com.*" { url.access-deny = ( "jpg", ...


Go Back   nixCraft Linux Forum > Mastering Servers > Web servers

Linux answers from nixCraft.


Web servers Discussion on Apache, Nginx and Lighttpd HTTP/web server and configuration issues.

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 19-05-2008, 12:12 PM
Junior Member
User
 
Join Date: May 2008
OS: CENTOS
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
Lamba is on a distinguished road
Default Lighttpd Wildcard based hotlink prevention

Quote:
Originally Posted by rockdalinux View Post
Try this
Code:
#### stop image hijacking (anti-hotlinking)
$HTTP["referer"] =~ ".*BADDOMIN\.com.*" {
      url.access-deny = ( "jpg", "png", "js", "jpeg", "gif" )
}
Replace BADDOMIN with actual domain i.e. block hotlinking domain
Would you be able to add a wild card to block all domains and then add a rule to allow just your site?
Reply With Quote
  #2 (permalink)  
Old 19-05-2008, 01:23 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash and Python
Posts: 2,710
Thanks: 11
Thanked 245 Times in 184 Posts
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

First block all referer
Code:
$HTTP["referer"] =~ "*"{
   url.access-deny = ( "" )
}
$HTTP["referer"] =~ ".*onedamdomain\.com.*" {
    url.access-allow = ( "" )
}
__________________
Vivek Gite
Linux Evangelist
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Always use CODE tags for posting system output and commands!
Do you run a Linux? Let's face it, you need help
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
Lighttpd Hotlink Prevention Lizard King Web servers 1 02-05-2008 02:44 AM
Adsl router security in Lan based network Wolverine Computer Networking and Internet/broadband 0 29-09-2007 12:26 AM
need help to install FreeBSD 6 series on my Intel based pc sneezycrazyturtle All about FreeBSD/OpenBSD/NetBSD 1 22-02-2007 02:27 PM
Apache multiple IP based domains and one certificate tom All about FreeBSD/OpenBSD/NetBSD 1 26-06-2006 07:23 PM
moving files based on size kavi Shell scripting 2 11-11-2005 05:17 PM


All times are GMT +5.5. The time now is 01:48 AM.


Powered by vBulletin® Version 3.8.5 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2010 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38