Solved

Getting a client's IP address

Posted on 1999-01-14
2
139 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
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Update a File not in all folders 2 46
inactive users 13 77
Python:compare IP with IP:blahblah and output the entire line?? 7 61
ROBOFTP UNZIP 1 43
In this tutorial I will aim to show you how simple is making a small application in WhizBase, how to add, remove and update data in the DB. I will make a small address book application where you can add, browse, update and remove addresses. I wi…
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…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to count occurrences of each item in an array.

776 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