Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If I remember correctly, it's sometimes used by nginx (used as a reverse proxy) to inject values into the request of the real ip address. e.g. nginx in front of several node processes.

I've had problems with this though. I want to get the ip4 address from cloudflare, instead of ip6 and it's next to impossible AFAICT. (for the free plan anyway)



A request doesn't come in with both an IPv4 and an IPv6. If the user connected over IPv6, the connection only has an IPv6 address. You can't get the IPv4 address, there is none.


> I've had problems with this though. I want to get the ip4 address from cloudflare, instead of ip6 and it's next to impossible AFAICT. (for the free plan anyway)

I have multiple websites on Cloudflare and can receive IPv4 addresses just fine, though for Cloudflare fronted websites it's usually better to use the CF-Connecting-IP as people can send any value in the X-Forwarded-For header.

Maybe some intermediate layer turns the IPv4 into a IPv6-mapped IPv4 address?


what the usecase and what is the problem using the IPv6 address?

In fact if the user has IPv6, IP blocks/Rate limits wont affect the other users on the CGNAT legacy address.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: