Archived

This forum has been archived. Please start a new discussion on GitHub.

Returned proxy points only to loopback interface

Hello,

my application has an interface function that returns the properties admin proxy (C++):

Ice::ObjectPrx adminObj = getCommunicator()->getAdmin();
Ice::PropertiesAdminPrx propAdmin = Ice::PropertiesAdminPrx::checkedCast(adminObj, "Properties");
return propAdmin;

proxyToString() on this proxy returns:

proxy: ConditionHandler/admin -f Properties -t -e 1.0:tcp -h 127.0.0.1 -p 40047

The problem is that this proxy only contains the endpoint 127.0.0.1 instead of all interfaces.
Thus, if a someone calls this from another machine this return proxy is unusable for that client.

Why does this proxy only contain the loopback interface as endpoint?

Comments

  • bernard
    bernard Jupiter, FL
    edited September 2017

    Hello Mirko,

    It's usually a good idea to restrict who can talk to your admin object, see:
    https://doc.zeroc.com/display/Ice37/Security+Considerations+for+Administrative+Facets

    The admin proxy endpoints you're seeing correspond to your setting for the Ice.Admin.Endpoints property, which seems to be:

    # Use an ephemeral port
    Ice.Admin.Endpoints=tcp -h 127.0.0.1
    

    or

    Ice.Admin.Endpoints=tcp -h 127.0.0.1 -p 40047
    

    You want to change the value of this property to make your admin object reachable over the network, for example:

    # listen on all network interfaces, and publish only non-localhost endpoints in proxies
    Ice.Admin.Endpoints=tcp -h * -p 40047
    

    Best regards,
    Bernard

  • Thank you, that solves it.