Determining IP address

J

Jitender Chugh

hi,
We are facing a very simple problem. We have launched some
transactions on our intranet. These transactions are web based and it
is written in JSP. Now our intranet is WAN based and it is connected
through gateways. Now problem is that my transactions are running in
location 1 let us say loc 1. Another fellow geographically apart, he
access our transaction on intranet using browser. Everything is fine.
But we have to implement one very simple utility. We want to identify
who is accessing our transactions. Identification may be in form of IP
address of his local machine or IP address of their gateway.

we have used method of java request.getaddress. WE executed on the
remote place and it always give the address of our gateway. It does
not give the gateway address of their location.

Can any body help us. How we can resolve this. Whether it is
possible using web based solution or not. Is there any method in java
api to do this.
It is urgent.
Thanks in advance.

Jitender Chugh
 
S

Sudsy

Jitender Chugh wrote:
we have used method of java request.getaddress. WE executed on the
remote place and it always give the address of our gateway. It does
not give the gateway address of their location.

Can any body help us. How we can resolve this. Whether it is
possible using web based solution or not. Is there any method in java
api to do this.
It is urgent.
Thanks in advance.

Is nobody going to comment on the delicious irony here?
 
J

Jitender Chugh

Hi,

We are using the same method. It gives the IP address of the server
gateway. It does not suffices the requirement. I will again expalin
the problem :-
In location 1, our server is there, where our application is running.
Now any person on our network (WAN, geographically apart) can access
the application using a browser. For example, in location 2 some
client is there, he accesses our application by giving the address
(like http:/1...../login.jsp). Both these locations are connected
through router and firewall. If in location 1(my location), I use the
method (getremoteaddr()), it gives the IP address of my gateway (ie of
location 1). IF in location 2, I use this method, again it gives the
IP address of gateway of location 1. How to determine the IP address
of gateway of location 2. There may be multiple location.
Thanks in advance

Jitender Chugh
 
D

Dave Miller

Hi,

We are using the same method. It gives the IP address of the server
gateway. It does not suffices the requirement. I will again expalin
the problem :-
In location 1, our server is there, where our application is running.
Now any person on our network (WAN, geographically apart) can access
the application using a browser. For example, in location 2 some
client is there, he accesses our application by giving the address
(like http:/1...../login.jsp). Both these locations are connected
through router and firewall. If in location 1(my location), I use the
method (getremoteaddr()), it gives the IP address of my gateway (ie of
location 1). IF in location 2, I use this method, again it gives the
IP address of gateway of location 1. How to determine the IP address
of gateway of location 2. There may be multiple location.
Thanks in advance

Jitender Chugh

Sorry for the mis-understand. I don't know if I can help but here goes.

The method above is returning the IP of the address to which it is
sending replies. If there is NAT in between, it has no way of
determining the final destination. If the replies are reaching the
client and the IP is not that to which your code is sending some other
method or device is completing the call and I am unaware of any method
on the server side that can determine the final IP.

If your locations are on two different routers and firewalls, I'm out of
ideas. If they are sharing the router or (especially) the firewall, it
seems as if you have a Network Translation problem where your locations
are "hiding" behind their access points.

HTH

DM
 

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
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top