X-Forwarded-For – “Configured but not valid”, but still working?
-
Hi there,
We have Wordfence 7.1.10 (1533058343) running on a site where we are also using Varnish for HTTP caching of non-admin pages. I’ve belatedly set Wordfence to use x-forwarded-for for IP detection (as Varnish is configured to pass IPs that way), but on the plugin’s Diagnostics tab it reports “Configured but not valid”. On the Live Traffic tab it looks like IP addresses are being captured ok.
I’m wondering if there’s genuinely a problem or not? Any thoughts on why the plugin thinks there’s an issue?
If it’s any help, here’s the Varnish config for x-forwarded-for and x-real-ip:
set req.http.X-Actual-IP = regsub(req.http.X-Forwarded-For, "[, ].*$", ""); # FORWARD THE IP OF THE REQUEST if (req.restarts == 0) { if (req.http.x-forwarded-for) { set req.http.X-Forwarded-For = req.http.X-Forwarded-For + ", " + client.ip; } else { set req.http.X-Forwarded-For = client.ip; } }
Thanks – it’s a great plugin.
Toby
- The topic ‘X-Forwarded-For – “Configured but not valid”, but still working?’ is closed to new replies.