Solved

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

Posted on 2004-08-20
2
232 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

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…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

776 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