How to get X-Real-IP from special server requests

Part of traffic go to CF over special balancer, and this balancer pass header X-Real-IP with clients ip.
Can I forward this header further, and not use the balancer ip?

Is this a local load balancer in a proxy setup? Otherwise requests can never go first to that balancer and then to Cloudflare.

yep. it’s reverse proxy in ovh.

That didn’t really answer the question. Is your reverse proxy connecting to Cloudflare’s proxies or is it the other way round?

Better if you can show the traffic flow end to end.

Is it like this:

Visitor - OVH - Cloudflare - Destination server

main part of clients:
Visitor - Cloudflare - Destination server

For soma clients it’s:
Visitor - OVH - Cloudflare - Destination server

OVH send client ip as X-Real-IP, and i want that CF take it and send it on

I am not quite sure why you would have such a setup and how you “force” your visitors over your proxy, but you essentially set up a sort of VPNish scenario where you’ll simply “change location”.

Cloudflare takes the address exclusively from the IP packet and that’s it. What you can do is add that header at your own reverse proxy, which the site can then evaluate, but the site of course has to be ready for that. Cloudflare will neither evaluate it nor set it in cf-connecting-ip.

There’s also X-Forwarded-For - HTTP | MDN

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