getIpAddress() returning internal IP?

I am running an application that executes SQL queries based on a user’s IP address. However, it seems that getIpAddress() is returning the internal IP of the connected user, not the external IP. For my application to function properly I need a reliable way to grab the user’s external IP address.

All I know of now is using httpGet on a script that is running on“”)

but I don’t exactly want to rely on another site just to return the correct IP address. Any thoughts?

I understand your reluctance to use an external service, but I think it is your best bet for now.

I suppose that we could add some scripting support so that the Gateway fed back the external IP of each client as it saw it, but that would have to go in as a feature request. Because if the client is behind a NAT router, which is pretty likely these days, there is no local way to detect the external IP.

If clients are limited to your internal network you could use getHostName().