473,395 Members | 1,629 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

REMOTE_ADDR gives a wrong IP address

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
Jul 19 '05 #1
5 11291
"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
Jul 19 '05 #2
> 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?
Jul 19 '05 #3
"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
Jul 19 '05 #4
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
Jul 19 '05 #5
"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 :o)

No offence to any AOL'ers here ;o)

Rob
Jul 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: bawar | last post by:
I want to put a script on my site that shows how many users are online on my site. I found one, and that is shown below. It also shows a log with the IP-addresses of those visitors. Buuut... the...
1
by: Pat | last post by:
Hi, I am having a small problem with a script that has to be requested via https. When I execute this normally I get my IP address printed on the screen: <?php echo getenv('REMOTE_ADDR');
7
by: deko | last post by:
Why is $_SERVER returning multiple IP Addresses? Actually, I'm not sure if it's $_SERVER -- or which if/else statement -- that's the problem, but what I'm getting as a value for $visip looks...
7
by: Jason | last post by:
Hi, The javascript in my page is not working, itstead of alerting me the ip address, it alerts me with string "<!--#echo var="REMOTE_ADDR"-->". var ip = '<!--#echo var="REMOTE_ADDR"-->';...
3
by: hn | last post by:
I would like to get the visitor's ip address. Which one is the appropriate one to use: Request.ServerVariables("REMOTE_ADDR") or Request.UserHostAddress? Thanks in advance.
4
by: ojorus | last post by:
Hi. I have a problem when I use the $_SERVER. I'm testing a script, and the strange thing is that remote_addr returns an ip-address only sometimes, and not always. Why can that be? Are there any...
9
by: Markus | last post by:
Hi In cases where I need to store the session id and/or the remote host in a database I used to choose tinytext fields so far. Anyway the usual values for session ids are of 32 characters...
1
by: danknauf | last post by:
I have a webserver which is behaving strangely. The server is a fresh copy of Windows 2003 running IIS with default options + Active Server Pages installed. The server is connected to a Linksys...
2
by: Henry Stock | last post by:
I don't seem to understand how to use the value: Request.ServerVariables("remote_addr") I am trying to pass the ip address of a sending web client in the body of an email message. When I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.