I just can't seem to get this done. I'm still seeing cloudflare IPs in my log. Currently, I have a loadbalancer which is behind Cloudflare.
Currently, here's the block related to forwardfor:
option forwardfor except 127.0.0.1
option forwardfor except 204.93.240.0/24
option forwardfor except 204.93.177.0/24
option forwardfor except 199.27.128.0/21
option forwardfor except 173.245.48.0/20
option forwardfor except 103.22.200.0/22
option forwardfor except 141.101.64.0/18
option forwardfor except 108.162.192.0/18
option forwardfor header X-Real-IP
reqadd X-Forwarded-Proto:\ http
Does anybody have an idea for the correct config to get real IPs from Cloudflare? Or maybe an equivalent of nginx's set_real_ip_from cloudflareIP and/or real_ip_header CF-Connecting-IP to haproxy? Thanks.
all your traffic is coming from cloudflare anyway
- how can you trust all the traffic is coming from Cloudflare in this case? What would stop someone using a hosts file (for example) to bypass Cloudflare? – Baillie