Quantcast
Channel: HAProxy community - Latest topics
Viewing all articles
Browse latest Browse all 4849

Logging CF-Connecting-IP in HAProxy from Cloudflare

$
0
0

I’ve read a lot of posts and docs about this… I’m still unable to get the CF-Connecting-IP in my haproxy access logs.

#       Cloudflare origin IP
        acl from_cf src -f /etc/haproxy/cf-ips/CF_ips.lst
        acl cf_ip_hdr  req.hdr(CF-Connecting-IP) -m found
        http-request set-header X-Forwarded-For %[req.hdr(CF-Connecting-IP)] if from_cf cf_ip_hdr

I am using the above on the frontend to get the CF-Connecting-IP - but my haproxy access logs still show all CF IPs instead of origin IPs. Is that expected?

haproxy.cfg

haproxy -vv

Thanks in advance!

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 4849

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>