Re: Blocking referer problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2011/11/6 Leonardo M. Ramé <martinrame@xxxxxxxxx>
>________________________________
>From: Yehuda Katz <yehuda@xxxxxxxxxx>
>To: users@xxxxxxxxxxxxxxxx; Leonardo M. Ramé <martinrame@xxxxxxxxx>
>Sent: Saturday, October 29, 2011 11:44 PM
>Subject: Re: Blocking referer problem
>
>
>2011/10/29 Leonardo M. Ramé <martinrame@xxxxxxxxx>
>
>
>>Knowing this, I found by googling, that I can block referers by adding this to my .htaccess file:
>>
>>RewriteEngine on
>>RewriteCond %{HTTP_REFERER} st\.ac\.th [NC,OR]
>>RewriteCond %{HTTP_REFERER} clubmedia-ent\.com [NC,OR]
>>RewriteCond %{HTTP_REFERER} multidicona\.com [NC]
>>RewriteRule ^ - [F]
>>
>>
>Your RewriteRule does not match any requests. Try 
>RewriteRule .* - [F]

>After changing it, I did a "apachectl restart".
>>
>You do not need to restart after changing the htaccess.
>


Hi, after replacing the rule by your suggestion, I stopped checking my error logs, until today. It seems the rule is not blocking the referers I need to.

This is an extract of the site-error_log of one site:

[Sat Nov 05 21:11:05 2011] [error] [client 176.14.112.166] File does not exist: /usr/local/www/apache22/data/site/gallery2, referer: http://clubmedia-ent.com/film/contact.html
[Sat Nov 05 22:46:37 2011] [error] [client 95.27.181.153] File does not exist: /usr/local/www/apache22/data/site/gallery2, referer: http://multidicona.com/
[Sun Nov 06 12:07:29 2011] [error] [client 95.26.196.133] File does not exist: /usr/local/www/apache22/data/site/gallery2, referer: http://multidicona.com/
[Sun Nov 06 12:07:53 2011] [error] [client 95.25.98.97] File does not exist: /usr/local/www/apache22/data/site/gallery2, referer: http://www.multidicona.com/electronica.html

I want to get rid of the attacks from "clubmedia-ent.com" and "www.multidicona.com", how can I block these?.

This is the .htaccess for the site:

RewriteEngine on
RewriteCond %{HTTP_REFERER} st\.ac\.th [NC,OR]
RewriteCond %{HTTP_REFERER} clubmedia-ent\.com [NC,OR]
RewriteCond %{HTTP_REFERER} multidicona\.com [NC]
RewriteRule .* - [F]

At a glance those look correct.
This site has several examples: http://www._javascript_kit.com/howto/htaccess14.shtml
If you have access to the vhost config to turn on RewriteLog, that might help you see why the pattern is not working.

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux