Finding the IP address of client proxy from Server side component

S

saurabh.chakote

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 themethods returns the ip address of local machine.

regards
Saurabh Chakote
 
A

Alex Molochnikov

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top