Ninjafirewall only displaying Cloudflare IPs
-
A little bit confused in setting up Ninjafirewall with Cloudflare.
Is the .htninja file supposed to be created already? If so I’m having troubles finding it.
If not and I’m supposed to create it/copy the htninja.sample or is it only supposed to contain the “server variables” part referring to Cloudflare?
// Users of Cloudflare CDN:
if (! empty($_SERVER[“HTTP_CF_CONNECTING_IP”]) &&
filter_var($_SERVER[“HTTP_CF_CONNECTING_IP”],FILTER_VALIDATE_IP)) {
$_SERVER[“REMOTE_ADDR”] = $_SERVER[“HTTP_CF_CONNECTING_IP”];
}I’ve since tried both and (.htninja is being detected according to the overview tab…”Optional configuration file”)…but it’s still only reporting Cloudflare IPs in the live log when anyone visits.
And it’s still giving the warning:
HTTP_CF_CONNECTING_IP detected: you seem to be using Cloudflare CDN services. Ensure that you have setup your HTTP server or PHP to forward the correct visitor IP, otherwise use the NinjaFirewall .htninja configuration file.
- The topic ‘Ninjafirewall only displaying Cloudflare IPs’ is closed to new replies.