• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to Obtain Remote IP Address

 
Abiodun Okusolubo
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Fellow Ranchers,
I need a workaround for a problem that I know it's not possible. Which is how to obtain IP Address from a client when they log into a portal. Any idea will be welcome.

Thanks
 
abhishek jethwani
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i don't know in which case you are asking this.

but if its a java application with socket programming then i think you can keep track of the ip from which the client is connecting.

but if it is done with RMI then you can't get the ip as client connect through stub which connected through name - "connecting name which we define" during binding server with rmi registry.
 
Abiodun Okusolubo
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Portal Application using Jetspeed 2
 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is extremely hard to get the client's IP address in a reliable manner.
Most of the 'net these days uses NAT to do address mapping, and many more folks use proxies.

If you want the address for logging, it can have a little value, and its easy. But if you need to actually know the real IP address, its very hard and often impossible to get it.

You can do things like run an bit of code on the client to get the IP address, but that is only what the client computer thinks is the address, when they use NAT, it may be not even close to real.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic