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
Solved

Getting a client's IP address

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

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

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

Introduction This tutorial will give you a fast look what you can do with WhizBase. I expect you already know how to work with HTML at least, and that you understand the basics of the internet and how the internet works. WhizBase is a server-s…
If you get a (Blue Screen of Death), your system writes a small file called a minidump. Your first step is to make certain your computer is setup to record memory dumps. Right click My Computer, choose properties. Click on the advanced tab, an…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

856 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