Forum Moderators: phranque

Message Too Old, No Replies

Blocking "dual proxies"

         

helleborine

10:08 am on Jun 17, 2005 (gmt 0)

10+ Year Member



I've been blocking my web stalker from viewing my websites in htaccess by blocking his specific browser/computer/os combination. Thank you all for showing me how to do this.

The nutjob is back under this disguise today:

123.45.678.9 - - [17/Jun/2005:04:50:01 -0500] "GET /style_images/1/nav.gif HTTP/1.1" 200 73 "http://www.mydomain.com/index.php?showtopic=6" "Dual Proxy"

What now?

jdMorgan

4:27 pm on Jun 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I assume this is a continuation of this thread [webmasterworld.com].

If so, just make another RewriteCond with this user-agent name in the pattern, and use [NC,OR] on the end of the first one.

Dual proxy is used by some ISPs such as satellite internet service providers. There's nothing inherently "bad" about Dual Proxy. So, be careful that you're sure about this.

Jim

helleborine

9:05 pm on Jun 17, 2005 (gmt 0)

10+ Year Member



jdMorgan,

My oh my, are we observant! ;-) Yes, it is a contination...

Thanks!

helleborine

9:09 pm on Jun 17, 2005 (gmt 0)

10+ Year Member



I did this...

RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} ^Mozilla\/5.0\ \(Macintosh;\ U;\ PPC;\ en-US;\ rv:1.0.2\)\ Gecko\/20030208\ Netscape\/7.02 [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Dual\ \Proxy [NC]
RewriteRule .* - [F]

And it worked! Woo-hoo! No 500 error.

jdMorgan

12:24 am on Jun 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There are several extra and several missing backslashes in those patterns. I'd suggest:

RewriteCond %{HTTP_USER_AGENT} ^Mozilla/5\.0\ \(Macintosh;\ U;\ PPC;\ en-US;\ rv:1\.0\.2\)\ Gecko/20030208\ Netscape/7\.02 [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Dual\ Proxy [NC]

or you could try quoted strings, since you are not creating or using back-refererences to the patterns:

RewriteCond %{HTTP_USER_AGENT} "^Mozilla/5.0 (Macintosh; U; PPC; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "^Dual Proxy" [NC]

Jim

wilderness

9:20 pm on Jun 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hey Jim,

"RewriteCond %{HTTP_USER_AGENT} "^Mozilla/5.0 (Macintosh; U; PPC; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02" [NC,OR]"

seems excessive to me ;)

How about?
RewriteCond %{HTTP_USER_AGENT} 7\.02$ [NC,OR]

Don

jdMorgan

10:54 pm on Jun 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's a specific user he's after. Also, it's not up to me, since I'm just addressing the question as posted.

Jim

helleborine

11:26 pm on Jun 18, 2005 (gmt 0)

10+ Year Member



Thank you, I have altered the files accordingly. This fellow I'm trying to block is a major headache...

kgun

8:40 pm on Jun 24, 2005 (gmt 0)



Helleborine:

"I've been blocking my web stalker from viewing my websites in htaccess by blocking his specific browser/computer/os combination. Thank you all for showing me how to do this".

And that is secure?

Myself, I use three browsers, a dynamic IP adress.

But I am an amateur on this field.

helleborine

9:22 pm on Jun 24, 2005 (gmt 0)

10+ Year Member



kgun,

luckily for me, my 'stalker' doensn't.