REMOTE_ADDR gives a wrong IP address

S

Sachin Singhal

Hi All,

I am in a bit of fix. In one of my setup, the server REMOTE_ADDR(url = Request.ServerVariables("REMOTE_ADDR")) does not work, itgives a IP address but the wrong one. It does not give the IPaddress of the machine surfing the page. It seems to me that itis giving me the IP of some proxy server.

Is there a work around to this issue ? Any ideas ?

Thanks a lot,
Sachin
 
R

Rob Meade

...
Is there a work around to this issue ? Any ideas ?

Not that I am aware of, the IP you receive is the IP that hits your server,
in our case here it will be of our companies firewall.

Regards

Rob
 
A

Aaron Bertrand [MVP]

Is there a work around to this issue ? Any ideas ?

Not really, unless you install some Java applet, ActiveX control, or other
client-side object that the user then agrees to allow inspect their machine
and relay their real IP address to you. ASP has no way of knowing this...
it runs on the *server* and only knows of the pieces of data that are told
to it through the Request.ServerVariables collection.

Still, not sure how that would be useful to you, because if they're going
through a proxy server, chances are you wouldn't be able to connect directly
to them anyway (often they would only relay an address internal to their
network, e.g. this machine would tell you 192.168.2.17).

The proxy server is usually there for a reason - to prevent people from
knowing / seeing / attacking the client's direct IP. IP is a horrible way
to identify people anyway... did you know that at any one time, as many as
half a million AOL users all look the same, because they all go through a
single IP address?
 
R

Rob Meade

...
did you know that at any one time, as many as
half a million AOL users all look the same, because they all go through a
single IP address?

Aaron, all AOL users look the same anyway :D

Regards

Rob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top