Home Help Center

Wrong IP for client Callback

I have used the demo client callback for basis of my code.
The problem I have is that the proxy it creates is for my internal network IP address .
When I pass this out to our server on the internet , it cannot callback because the proxy contains the internal IP instead of the external (router) IP.

Is there any way around this other then having to specify host name in the client endpoints.

Comments

  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi Tony,

    The proper way to solve this in Ice is to run Glacier as your server's firewall/router. This allows your client to use a bidirectional connection, avoiding the need for the server to establish a separate connection back to a client that is protected by a NAT firewall. Take a look at the Glacier chapter in the manual for more information.

    Also, the configuration for the callback demo can be edited to enable Glacier support, if you want to try it out.

    Take care,
    - Mark
  • BinaryBinary Member
    why not trying Glacier?
  • tony_htony_h Member
    To keep thing simple, we were hoping to avoid having a glacier router on the server.
    To cover connections from clients with different network configurations, looks like we will have to investigate using glacier.

    I had another question related to this - how would it (glacier) handle two clients connecting through internet to server when both clients are on the same private network. In this case they would both have same external IP.
  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi,

    That potential problem with NAT clients is avoided by using bidirectional connections, meaning the server sends a callback request on the same connection that the client established to the server. Therefore it doesn't matter if clients appear to have the same IP address, because that address is never used to establish a connection.

    Also note that the next Ice release will feature an alternative Glacier implementation ("Glacier2") that uses fewer resources: it only requires a single external port, and doesn't spawn child processes.

    Take care,
    - Mark
Sign In or Register to comment.