IP address of AppServer client

Posted by Lieven De Foor on 12-Jun-2014 04:16

Hi,

I'm writing a routine (executed by a client on the AppServer) which needs to know the IP address of the client. The IP address should be the one that the AppServer could use to call back to a service running on the client machine.

I could pass the client machine's IP addresses (multiple are possible, one per NIC) using an AppServer call, but I only want the one address that the AppServer can use to reach the client (other IP's could be unreachable by the AppServer).

Any ideas on how to achieve this?

Posted by Lieven De Foor on 13-Jun-2014 03:33

It was confirmed by tech support that the AppServer doesn't *know* the client's IP address (although it clearly must know it internally to be able to do eg. an async callback). So I'm resorting to sending all the client's IP addresses to the server, and have it try connecting to them with a low timeout value.

All Replies

Posted by Mike Fechner on 12-Jun-2014 04:18

With (personal) firewalls involved, the AppServer might not be able to call back into the Client on any IP address.
 
 
 
Von: Lieven De Foor [mailto:bounce-lievendefoormipsbe@community.progress.com]
Gesendet: Donnerstag, 12. Juni 2014 11:17
An: TU.OE.Development@community.progress.com
Betreff: [Technical Users - OE Development] IP address of AppServer client
 
Thread created by Lieven De Foor

Hi,

I'm writing a routine (executed by a client on the AppServer) which needs to know the IP address of the client. The IP address should be the one that the AppServer could use to call back to a service running on the client machine.

I could pass the client machine's IP addresses (multiple are possible, one per NIC) using an AppServer call, but I only want the one address that the AppServer can use to reach the client (other IP's could be unreachable by the AppServer).

Any ideas on how to achieve this?

Stop receiving emails on this subject.

Flag this post as spam/abuse.

Posted by Lieven De Foor on 12-Jun-2014 04:20

I should have added that the AppServer is running on the same network as the client, and firewall should be configured to allow the connections.

Posted by Mike Fechner on 12-Jun-2014 04:25

What is the AppServer calling back into?

Can’t that service be bound to any IP Address? 0.0.0.0 for a Tomcat for instance?

 

Posted by Lieven De Foor on 12-Jun-2014 04:34

The "service" is another prowin32.exe process listening on a port using a SERVER-SOCKET. I assume it is bound to all IP addresses of the client (since this can't be specified on ENABLE-CONNECTIONS). However that's not the problem: the connection can only be made using an address that is reachable from the AppServer.

Posted by Mike Fechner on 12-Jun-2014 04:38

But doesn’t the client know which IP Address it uses to connect to the AppServer?
 
So it should find be able to find it’s own IP Address in the same network segment using the network mask.
 
 
 
Von: Lieven De Foor [mailto:bounce-lievendefoormipsbe@community.progress.com]
Gesendet: Donnerstag, 12. Juni 2014 11:35
An: TU.OE.Development@community.progress.com
Betreff: RE: [Technical Users - OE Development] IP address of AppServer client
 
Reply by Lieven De Foor

The "service" is another prowin32.exe process listening on a port using a SERVER-SOCKET. I assume it is bound to all IP addresses of the client (since this can't be specified on ENABLE-CONNECTIONS). However that's not the problem: the connection can only be made using an address that is reachable from the AppServer.

Stop receiving emails on this subject.

Flag this post as spam/abuse.

Posted by Bill Wood on 12-Jun-2014 04:39

Can you clarify the problem a little?

If you pass the IP address in the method signature, it seems that the appserver will now know the IP address of the client.   I am not sure I understand the issue.

(You could also pass this in as a property in a Client-Principal if your client is one that can create a C-P -- so you would not need to change the signature of your methods)

I am guessing you would use sockets to communicate back to the "client" - is that correct?

Posted by Lieven De Foor on 12-Jun-2014 04:54

[quote user="Mike Fechner"]

But doesn’t the client know which IP Address it uses to connect to the AppServer?

So it should find be able to find it’s own IP Address in the same network segment using the network mask.

[/quote]

The client connects through the name server. Is there a way to figure out on what client IP this is happening? I'm not sure the address should be on the same segment either, the network infrastructure can probably handle requests from different subnets and pass it on to the correct endpoint?

[quote user="Bill Wood"]

Can you clarify the problem a little?

If you pass the IP address in the method signature, it seems that the appserver will now know the IP address of the client.   I am not sure I understand the issue.

(You could also pass this in as a property in a Client-Principal if your client is one that can create a C-P -- so you would not need to change the signature of your methods)
I am guessing you would use sockets to communicate back to the "client" - is that correct?
[/quote]

The problem is that the client machine can have different IP's, but only one of them is used to communicate with the AppServer. What I'm looking for is a way to know what address is used for the connection so the AppServer can use it to communicate back (indeed using a socket). If I can know it on the client side and pass it to the server that would be fine too offcourse.

Posted by Mike Fechner on 12-Jun-2014 04:57

Dismiss the name server J
 
 
Von: Lieven De Foor [mailto:bounce-lievendefoormipsbe@community.progress.com]
Gesendet: Donnerstag, 12. Juni 2014 11:55
An: TU.OE.Development@community.progress.com
Betreff: RE: [Technical Users - OE Development] IP address of AppServer client
 
Reply by Lieven De Foor
Mike Fechner
But doesn’t the client know which IP Address it uses to connect to the AppServer?

So it should find be able to find it’s own IP Address in the same network segment using the network mask.

The client connects through the name server. Is there a way to figure out on what client IP this is happening? I'm not sure the address should be on the same segment either, the network infrastructure can probably handle requests from different subnets and pass it on to the correct endpoint?

Bill Wood
Can you clarify the problem a little?
If you pass the IP address in the method signature, it seems that the appserver will now know the IP address of the client.   I am not sure I understand the issue.
(You could also pass this in as a property in a Client-Principal if your client is one that can create a C-P -- so you would not need to change the signature of your methods)
I am guessing you would use sockets to communicate back to the "client" - is that correct?

The problem is that the client machine can have different IP's, but only one of them is used to communicate with the AppServer. What I'm looking for is a way to know what address is used for the connection so the AppServer can use it to communicate back (indeed using a socket). If I can know it on the client side and pass it to the server that would be fine too offcourse.

Stop receiving emails on this subject.

Flag this post as spam/abuse.

Posted by Lieven De Foor on 13-Jun-2014 03:33

It was confirmed by tech support that the AppServer doesn't *know* the client's IP address (although it clearly must know it internally to be able to do eg. an async callback). So I'm resorting to sending all the client's IP addresses to the server, and have it try connecting to them with a low timeout value.

This thread is closed