Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2005

Tip: Looking for answers? Try searching our database.

Finding the IP address of client proxy from Server side component

Thread view: 
saurabh.chakote@gmail.com - 18 Nov 2005 05:31 GMT
Hi , All
I just want to find out the IP address of the firewall (proxy) for my
client machine from my server side component.
as the
>> getInetAddress()
>> getHost()
methods returns the ip address of local machine.

regards
Saurabh Chakote
Alex Molochnikov - 18 Nov 2005 06:38 GMT
I suppose your Client is Java-based, and uses RMI for connecting to the
Server (if you are using a context lookup service to locate your server
components, it is still the RMI underneath). When the RMI communication
layer formats data packets on the client side, they are stamped with the IP
address found in java.rmi.server.hostname property; if the property is not
set, it will use the host's local address.

If you have control over the client's machine, you can put the address of
the firewall in a file, and load it into the properties early in the
client's life (before the server lookup). If not, you may want to introduce
another call to the server prior to the lookup, this one based on the HTTP
protocol (i.e. using the URLConnection). The server can get the "real"
(firewall's) IP address from the doGet's or doPost's ServletRequest
parameter, and return it to the calling client. This way the client will
know the IP address of the firewall.

HTH

Alex Molochnikov
Gestalt Corporation

> Hi , All
>  I just want to find out the IP address of the firewall (proxy) for my
[quoted text clipped - 6 lines]
>  regards
> Saurabh Chakote


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.