Solved

Any chance to detect if the person is behind a proxy?

Posted on 2004-08-20
2
233 Views
Last Modified: 2012-05-05
hi all,

I know this is pretty impossible, but wh knows if there's any chance to do that and block access?  Also , how do you guys ban the person you don't really want to see on your site, I mean except IP & cookies, what else can be more reliable solution, can it be something like Wiindows unique certificate or something like that, I saw a lot of Request ServerVariables functions, any  of them can be unique or not for each user?

Also I know that php has function to detect the whole host not just an IP address, is that possible with asp?

Thanks,
N_F_S
0
Comment
Question by:N_F_S
2 Comments
 
LVL 7

Accepted Solution

by:
vnvk earned 150 total points
ID: 11857777
I believe its not possible in ASP.

even for PHP, I tried the function at the below url:

http://www.phpbuddy.com/article.php?id=22

and it failed. Cos, I am behind a proxy server and a firewall and that url displayed the ip address of our ISP, as well as dsplayed that we are not behind proxy.

0
 
LVL 2

Expert Comment

by:Starr Duskk
ID: 14652672
in below examples, if it comes up blank, you know they are not behind a proxy...

ASP with Proxy detection

<%
    ipaddress = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
    if ipaddress = "" then
        ipaddress = Request.ServerVariables("REMOTE_ADDR")
    end if
%>
 


PHP with Proxy detection

<?
    if (getenv(HTTP_X_FORWARDED_FOR)) {
        $ipaddress = getenv(HTTP_X_FORWARDED_FOR);
    } else {
        $ipaddress = getenv(REMOTE_ADDR);
    }
?>
 
JSP with Proxy detection

<%
    if (request.getHeader("HTTP_X_FORWARDED_FOR") == null) {
        String ipaddress = request.getRemoteAddr();
    } else {
        String ipaddress = request.getHeader("HTTP_X_FORWARDED_FOR");
    }
%>

0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question