Forum Moderators: phranque

Message Too Old, No Replies

Block honyaku.yahoofs.jp from my site

         

wakahii

2:52 pm on Jul 28, 2005 (gmt 0)

10+ Year Member



I have tried to block it using on apache
RewriteEngine on
RewriteCond %{HTTP_REFERER} ^(.*)yahoofs.jp(.*)$ [OR]
RewriteCond %{HTTP_USER_AGENT} ^(.*)yahoofs.jp(.*)$
RewriteRule ^(.*) - [F]

It uses the user ip address and been a nightmare on my sight. For demo, type you any url.

[edited by: jatar_k at 4:09 pm (utc) on July 28, 2005]
[edit reason] removed url [/edit]

jdMorgan

2:53 am on Jul 29, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You could speed up your code a bit by eliminating unnecessary back-references and anchoring:

RewriteEngine on
RewriteCond %{HTTP_REFERER} yahoofs\.jp [OR]
RewriteCond %{HTTP_USER_AGENT} yahoofs\.jp
RewriteRule .* - [F]

You may also need to add an exclusion to allow your server to serve your custom 403 error page, if you have one defined.

So, are these requests still getting through? If so, post two or three lines from your log file showing these access; Please remove or obscure any personally-identifiable information, like you domain name or unique page names before posting.

Jim

wakahii

2:00 pm on Jul 29, 2005 (gmt 0)

10+ Year Member



First I want to thank you for the tips and willingness to help.

It's still shows the page with all my 'text' and no images/style

I will forward you the url on the mail where you test with you server. That way you will hopefully display the url here for others to get help.

[ip of my machine] - - [29/Jul/2005:09:08:19 -0400] "GET /yyyy/xyzxx.css%22/><style%20type= HTTP/1.1" 403 300 "http://honyaku.yahoofs.jp/url_result?ctw_=sT,eCR-EJ,bT,hT,uxHR0cDovL3d3dy5taWNyb3VzZS5jb20v,f20050729220802-0,
cSVNPLTg4NTktMQ==,qlang=ja¦for=0¦sp=-5¦fs=100%¦fb=0¦fi=0¦fc=FF0000¦db=T¦eid=CR-EJ,k768ee282e4dc57792d607c4b652
447fb,t20050730100742," "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; Alexa Toolbar)"
[ip of my machine] - - [29/Jul/2005:09:08:19 -0400] "GET /yyyy/xyzx.gif HTTP/1.1" 403 285 "http://honyaku.yahoofs.jp/url_result?ctw_=sT,eCR-EJ,bT,hT,uxHR0cDovL3d3dy5taWNyb3VzZS5jb20v,f20050729220802-0,
cSVNPLTg4NTktMQ==,qlang=ja¦for=0¦sp=-5¦fs=100%¦fb=0¦fi=0¦fc=FF0000¦db=T¦eid=CR-EJ,k768ee282e4dc57792d607c4b652
447fb,t20050730100742," "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; Alexa Toolbar)"
[ip of my machine] - - [29/Jul/2005:09:08:19 -0400] "GET /yyyy/xyzx.gif HTTP/1.1" 403 284 "http://honyaku.yahoofs.jp/url_result?ctw_=sT,eCR-EJ,bT,hT,uxHR0cDovL3d3dy5taWNyb3VzZS5jb20v,f20050729220802-0,
cSVNPLTg4NTktMQ==,qlang=ja¦for=0¦sp=-5¦fs=100%¦fb=0¦fi=0¦fc=FF0000¦db=T¦eid=CR-EJ,k768ee282e4dc57792d607c4b652
447fb,t20050730100742," "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; Alexa Toolbar)"

[edited by: jdMorgan at 3:21 pm (utc) on July 29, 2005]
[edit reason] Fixed side-scroll. [/edit]

jdMorgan

3:36 pm on Jul 29, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The log entries you posted clearly show that these accesses are now being blocked. The "403" response code shown after each "GET /pathname" indicate that your server responded with a 403-Forbidden response.

Blocking access does not prevent entries from appearing in your log files. If you want to completely block access to the server, then that must be done at the firewall.

Jim

wakahii

3:56 pm on Jul 29, 2005 (gmt 0)

10+ Year Member



Even before I was able to block the images/css BUT all LINK on this honyaku.yahoofs.jp are STILL clickable.

In short, the page looks weird from the views perspective but it has NOT been BLOCKED.

Did you try it yourself and see what I am talking about cause that would really help you to understand the PROBLEM.

Please do...it's just a click.

jdMorgan

5:50 pm on Jul 29, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Your server says the accesses are blocked. Your code is good. Flush your browser cache (Temporary internet files), then try again...

Jim