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

Get the client's IP from behind Glacier2


I want my server that is behind the Glacier2 Firewall/Router to know the IP address of the client it interacts with.
I already read the corresponding FAQ and found a quite old forum post about this.

I don't want to have the client always send me this information and trust him that it's correct. That would be burdensome.

Is there any way to get this information from Glacier2?

Thanks in advance.


  • matthew
    matthew NL, Canada
    Unfortunately, unless you use SSL and createSessionFromSecureConnection, there is no way to do this unless you have the client set its own IP address in the context parameter used for createSession. We'll think about changing this for the next major release.
  • Thank you for the fast answer. Nice to hear you'll integrate this feature.

    After reading the createSessionFromSecureConnection reference, I don't understand how to get the IP with this. If I understand correctly, this method is called from the client to create a session object. I don't see where it lets my server (behind glacier2) see the client's IP? If that works, I would be very happy with it as I wanted to create SSL connections anyway! Please, give me some more pointers :)
  • dwayne
    dwayne St. John's, Newfoundland
    Take a look at the "Obtaining SSL Credentials" section here and the "Glacier2.AddSSLContext" property reference here. "SSL.Remote.Host" is the context setting you need to look at to get client ip.
  • Hey, that's exactly what I was looking for, thank both of you a lot!