Client IP Address

Is it possible to get the client IpAddress in the front-end without HttpOutCall?
I know that would be a difficult task, I just need this to secure my application, I found fingerprintjs maybe an alternative but it just sollects some browsers data.

Hello @jaxopaxo

What do you mean with the frontend? Do you mean “in the browser”? In case that’s what you are looking for then you don’t need to do anything in the canister. However, it is a bit difficult as the client could be behind a NAT.

For that you can use a service like You just make a request to them and it returns your IP address. For example, from the command line, you can try:

$ curl

Thanks for the answer. Front-end I mean the front-end canister in my whole project, example below:
Frontend (React) deployed to the icp as a web assembly canister,
Backend (Motoko) is where my backend ( like data services and so on ) deployed.
The front end is where the end-user interact, the backend supports the frontend with functionality. I cannot run curl command in the icp, it can be run locally on my computer, but this does not solve the question, I hope this clearify.
Any ways I found a solution trying to check if it works.