#How to get user´s *real* IP-Address in Next13?

6 messages · Page 1 of 1 (latest)

severe gale
#

I have a typical Express, React (Next13), Node, MongoDB application and need to get access to the user´s ip address on one route because he seems to be malicious.
Problem is, I couldn´t figure out how that works in Next13. The older versions seemed to have a more simple way, but all I get by using thrid party libraries like request-ip is the frontend-server´s IP-address, but not the user´s address.
I assume I somehow need to set the clients IP address in the frontend, or not?

Any help appreciated!

flat coveBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

barren sun
#

ip address is coming from layer 3 IP layer, so you cannot manipulate it. Usually, platform such as Cloudflare, Vercel and other proxies set and forward the IP via layer 7 HTTP header to servers.

#

Real IP addresses would be hidden by proxies, vpn, Zscaler and so on.

modest geyser
#

You have any idea how I can tackle this problem?