Blocking Proxy visitors - possible?

Evotion

Newbie
Joined
May 28, 2009
Messages
27
Reaction score
5
Hey, we all love and use proxies.

BUT... does anybody know a foolproof way to block a person using a Proxy Service from actually entering a website?
 
the only way that i could think of is by having a script to block ips. And to update those ips from sites that share proxies, there is no other way i could think of
Hey, we all love and use proxies.

BUT... does anybody know a foolproof way to block a person using a Proxy Service from actually entering a website?
 
Run a proxy test (like the one here) against the visitor, if they show up with something in their HTTP-Forwarded-By field that isn't their real ip, redirect them to somewhere else.

That's just off the top of my head, I think it should at least clear out the people who are doing it badly. People using a halfway-decent proxy will be mostly undetectable with standard means unless you do something fancier, like check cookies to see if the IP has changed for a single user.

N
 
I use this:
Code:
<?php
    if (
       $_SERVER['HTTP_X_FORWARDED_FOR']
       || $_SERVER['HTTP_X_FORWARDED']
       || $_SERVER['HTTP_FORWARDED_FOR']
       || $_SERVER['HTTP_CLIENT_IP']
       || $_SERVER['HTTP_VIA']
       || in_array($_SERVER['REMOTE_PORT'], array(8080,80,6588,8000,3128,553,554)))
    {         
    print "No proxies pls!";
    } else{
    print "OK";    
    }
 ?>
 
Last edited:
Run a proxy test (like the one http://web.freerk.com/proxyjudge/azenv1.04_27Apr05.zip) against the visitor, if they show up with something in their HTTP-Forwarded-By field that isn't their real ip, redirect them to somewhere else.

That's just off the top of my head, I think it should at least clear out the people who are doing it badly. People using a halfway-decent proxy will be mostly undetectable with standard means unless you do something fancier, like check cookies to see if the IP has changed for a single user.

N

It's just for normal proxy, for high-secure proxy, does not have any extra header you can detect
 
I got this from that:
Code:
Parse error: syntax error, unexpected T_BOOLEAN_OR in /home/drum/public_html/noprox.php on line 9
I use this:
Code:
<?php
    if (
       $_SERVER['HTTP_X_FORWARDED_FOR']
       || $_SERVER['HTTP_X_FORWARDED']
       || $_SERVER['HTTP_FORWARDED_FOR']
       || $_SERVER['HTTP_CLIENT_IP']
       || $_SERVER['HTTP_VIA']
       || in_array($_SERVER['REMOTE_PORT'], array(8080,80,6588,8000,3128,553,554)))
       || @fsockopen($_SERVER['REMOTE_ADDR'], 80, $errno, $errstr, 30))
    {         
    print "No proxies pls!";
    }
 ?>
 
You can use that code the person posted above which is pretty decent but it'll only take out proxies with the average port numbers for a proxy.
 
Back
Top