REMOTE_ADDR gives a wrong IP address

Discussion in 'ASP General' started by Sachin Singhal, Nov 11, 2003.

  1. 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
    Sachin Singhal, Nov 11, 2003
    #1
    1. Advertising

  2. Sachin Singhal

    Rob Meade Guest

    "Sachin Singhal" wrote ...

    > 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
    Rob Meade, Nov 11, 2003
    #2
    1. Advertising

  3. > 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?
    Aaron Bertrand [MVP], Nov 11, 2003
    #3
  4. Sachin Singhal

    Rob Meade Guest

    "Aaron Bertrand [MVP]" wrote...

    > 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
    Rob Meade, Nov 11, 2003
    #4
  5. Aaron Bertrand [MVP], Nov 11, 2003
    #5
  6. Sachin Singhal

    Rob Meade Guest

    "Aaron Bertrand [MVP]" wrote ...

    > True. I always imagine them as one of these characters:
    >
    > http://www.aspfaq.com/fark/mr.happy.jpg
    > http://www.aspfaq.com/fark/bigsnit.jpg


    ROTFL!

    I must admit as I hit the send key a sudden feel of unease passed through my
    body....it was like my fingers were engaged, but my brain wasn't - "oh no" I
    thought, "how many will I offend" - glad you saw the funny side :eek:)

    No offence to any AOL'ers here ;o)

    Rob
    Rob Meade, Nov 11, 2003
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?aG4=?=
    Replies:
    3
    Views:
    25,419
    John Saunders
    Dec 16, 2004
  2. Frank Moyles
    Replies:
    3
    Views:
    956
    Mark Rae [MVP]
    Dec 28, 2007
  3. Bob Barrows [MVP]

    Remote_addr will return my web server ip address

    Bob Barrows [MVP], Dec 1, 2004, in forum: ASP General
    Replies:
    2
    Views:
    357
    xarrisx
    Dec 1, 2004
  4. Aaron [SQL Server MVP]

    Remote_addr will return my web server ip address

    Aaron [SQL Server MVP], Dec 1, 2004, in forum: ASP General
    Replies:
    0
    Views:
    124
    Aaron [SQL Server MVP]
    Dec 1, 2004
  5. Replies:
    1
    Views:
    271
    Anthony Jones
    Feb 13, 2007
Loading...

Share This Page