Solved

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

Posted on 2004-08-20
2
230 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
Comment Utility
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 1

Expert Comment

by:BobCSD
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
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/…
This video discusses moving either the default database or any database to a new volume.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

772 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now