Solved

Getting a client's IP address

Posted on 1999-01-14
2
145 Views
Last Modified: 2013-12-25
I am interested in identifying a client which activates a cgi/servlet on my server. I would like to use his IP address as the identifier. How can I read this identifier in my cgi/servlet? I know the cgi variables REMOTE_HOST and REMOTE_ADDR give me some information about the client, but it is not necessarily his exact IP. I think it's only his network IP. Is there something else?
0
Comment
Question by:ariefishler
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 11

Accepted Solution

by:
mouatts earned 50 total points
ID: 1830589
The IP address returned is the full, and only IP address, that you can get to. It is this address that the server will respond to when it sends data back to the client.

The problem is that if the client is behind a firewall or is using a caching proxy server then the IP address that you will see is the IP address of the proxy server. The real IP address is held by the proxy so that when you respond to it it will respond to the client.

If the client is not using a proxy the the IP address will be the IP address of the actual machine.

I am afraid there is no way around this as has been discussed and mentioned several times before in other questions.

As also stated the only ways in which a user can reasonably be recognised are.

1) To store a cookie which you can re-read on subsequent accesses.

2) Allow registered users through a password control mechanism and then track the user through the course of you site.

3) Implement the site via SSL and require a certificate. This is generally not an option at the present time as the use and understanding of certificates is so poor generally that you would  get no users to you site.

HTH
    Steve
0
 

Author Comment

by:ariefishler
ID: 1830590
Thanks....was quite quick !!!!
0

Featured Post

Turn Insights into Action

Communication across every corner of your business is essential to increase the velocity of your application delivery and support pipeline. Automate, standardize, and contextualize your communication processes with xMatters.

Question has a verified solution.

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

In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
This tutorial will discuss the log-in process using WhizBase. In this article I assume you already know HTML. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you might look at some of my other articles abo…
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

717 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