View Full Version : How to block proxy access to my site?
yaoming
December 6th, 2002, 22:50
"advertiser tell me:
How are you? I noticed that a good portion of your traffic is coming from an open proxy computer.
Best regards,"
how to do to block proxy access to my site ?
:confused:
aphel aura
December 7th, 2002, 11:02
edit your .htaccess file
order allow,deny
deny from <proxy address 2>
deny from <proxy address 1>
allow from all
n1xn0x
December 14th, 2002, 02:50
there is a command or module i don't know exactly called as HTTP_FORWARDED_FOR
this command will show you an ip used behind the proxy :)
so you can set if the HTTP_FORWARDED_FOR is true you can deny it :)
i my self still looking how to enable it under my perl script :)
if you find how to enable it please email me :)
Note : this HTTP_FORWARDED_FOR not work if the proxy is anonym (if i'm right)
nag
December 14th, 2002, 08:17
$HTTP_FORWARDED_FOR is a built-in environment variable that can be used in scripts for example
<?php
$ipToBlock="blah.blah.blah.blah";
if($HTTP_FORWARDED_FOR==$ipToBlock)
echo "Sorry you do not have access to view.";
?>
It can be used in perl in a similar manner.
Agum
December 16th, 2002, 01:02
does perl really have this $ENV variable? i don't know of any proxy servers (any real ones anyway, not anonymizer or anything) to test out. $ENV{'HTTP_FORWARDED_FOR'} ?
nag
December 16th, 2002, 09:18
does perl really have this $ENV variable? i don't know of any proxy servers (any real ones anyway, not anonymizer or anything) to test out. $ENV{'HTTP_FORWARDED_FOR'} ?
Yes Perl has ,also check if $HTTP_X_FORWARDED_FOR can do some help.
CareBear
December 16th, 2002, 10:43
I noticed that a good portion of your traffic is coming from an open proxy computer.usually an "open proxy" = proxy that can be used by everyone. This would be either a public proxy, an anonymizer or a badly configured/trojan infected pc.
In my opinion blocking valid proxies from your site (like an isp's) is a bad move since some people either don't know how to change it and it came preset with their isp install or some ISPs just block all outgoing traffic on port 80 forcing their customers to access the net through a proxy. Others are going to surf from work and those often go through a proxy as well.
Maybe you could mail them back and ask what criteria they use for coming to that conclusion and what they recommend you do about it. Just blocking all proxies regardless of their function is going to cut off a good number of visitors to your site.
n1xn0x
December 16th, 2002, 19:16
i had trying to get that env with creating
$ENV{'HTTP_FORWARDED_FOR'} but it's seem cannot work
the cgi cannot read that variable even i had using proxy to trying it :)
Salam
December 18th, 2002, 02:08
make a perl script :
------
#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "<html><head><title>Simple CGI program</title></head><body>\n";
for (keys %ENV) {
print "$_ = $ENV{$_}<br>\n";
}
print "</body></html>\n";
------
now choose a proxy and run the script , you can see : HTTP_X_FORWARDED_FOR = xxx.xxx.xxx.xxx
n1xn0x
December 19th, 2002, 01:48
open https://secure.hackerdirect.net/env.cgi
i try to make a cgi script to check the proxy
but it's seem HTTP_FORWARDED_FOR cannot detected as the env :(
CareBear
December 19th, 2002, 18:42
anonymizer proxies won't tell you who they're forwarding for... that's kind of the point of having them :)
you might want to check for the HTTP_X_FORWARDED_FOR http header as well.
Seldimis
December 22nd, 2002, 15:41
I read this thread fully. But I am wondering. Why do you want to block proxy access to your Website ???
Powered by vBulletin® Version 4.1.7 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.