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?
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.
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?
Flag this post as spam/abuse.
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.
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?
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.
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.
Flag this post as spam/abuse.
Can you clarify the problem a little?
[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.
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.
Mike FechnerBut 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 WoodCan 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.
Flag this post as spam/abuse.
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.