# Client originating request ip\_address - IPv4/IPv6

**URL:** <https://community.auth0.com/t/client-originating-request-ip-address-ipv4-ipv6/121578>\
**Category:** Get Help\
**Tags:** user-profile, user-management\
**Created:** [November 24, 2023, 8:12am UTC](https://community.auth0.com/t/client-originating-request-ip-address-ipv4-ipv6/121578 "2023-11-24T08:12:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Surr](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@Surr](https://community.auth0.com/u/Surr)\
**Post date:** [November 24, 2023, 8:12am UTC](https://community.auth0.com/t/client-originating-request-ip-address-ipv4-ipv6/121578/1 "2023-11-24T08:12:33Z")

</div>

I am attempting to retrieve the originating request IP address in my post-login action. I’ve noticed that within the company VPN, the request’s originating IP address appears as an IPv4 address (e.g., 192.xxx.0.xxx), while outside the VPN, it is an IPv6 address (e.g., 2406:xxx:b4:392a:b737:yyyy:9842:10e9). Is this the expected behavior, and how can I consistently obtain an IPv4 address as the response?

Here is my code for reading ip address - **const ip\_address = event.request.ip;**

---

<div class="post-metadata">

**Author:** ![dawid.matuszczyk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dawid.matuszczyk/32/74550_2.png) [@dawid.matuszczyk](https://community.auth0.com/u/dawid.matuszczyk)\
**Post date:** [November 30, 2023, 10:52pm UTC](https://community.auth0.com/t/client-originating-request-ip-address-ipv4-ipv6/121578/2 "2023-11-30T22:52:28Z")

</div>

Hi @Surr

Welcome to the Auth0 Community!

Thank you for posting your question. Yes, the behavior you’re observing regarding the IP addresses in your Auth0 Post-Login Action is expected, and without the changes in the VPN, you won’t be able to get IPv4. If the incoming request to Auth0 uses IPv6, you’ll receive that in the `event.request.ip`.

Thanks  
Dawid

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [December 14, 2023, 10:52pm UTC](https://community.auth0.com/t/client-originating-request-ip-address-ipv4-ipv6/121578/3 "2023-12-14T22:52:48Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
