Hi,
I try to determine the external IP, if someone is accessing a device using public URL.
However, the IP I receive (using nodejs) is (in my example): 52.4.252.97
Which is an IP address owned by Amazon, and not the external IP of the client accessing the remote device.
Is there a possibility to receive the real external IP of the client?
@alanb128
Hi,
I’m using req.clientIp.split(":")[req.clientIp.split(":").length - 1]
in the HTTP Request handler (using express) to obtain the IPv4 address.
Hello @fritz did you try to use the PUBLIC IP ADDRESS published on balenaCloud? Having said that, it’s possible that the public ip address is not accessible due modems security reasons.
Hi,
no, as stated, we cannot use the public IP address due to network / modem security.
We need to find out the real client IP when using the public url.
Thanks
The accepted answer in the link above worked for me to get the actual client IP on a local network, but no luck so far using the Public URL. I’m still discussing with our back end team to find out definitively if this is possible.
Hello @fritz unfortunately the current configuration of our Public URL does not pass the client information. We’re looking into options for changing that but I have no ETA at this point. We will keep this thread updated with any new information.