• Resolved M-POWER

    (@phyton)


    Hello,

    i should see real visitor’s ip adresses when i have cloudflare. There is an option on wordfence plugin about it.

    I could’nt see any options on ninja firewall.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author nintechnet

    (@nintechnet)

    You need to use the .htninja configuration file.
    There’s a example of the code to use with Cloudflare:

    <?php
    /*
     +===========================================================================================+
     | NinjaFirewall optional configuration file                                                 |
     |                                                                                           |
     | See: https://blog.nintechnet.com/ninjafirewall-wp-edition-the-htninja-configuration-file/ |
     +===========================================================================================+
    */
    
    // 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"];
    }
    
    Thread Starter M-POWER

    (@phyton)

    It works. Thanks a lot.

    Love NinjaFirewall.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Real Ip Of Visitors When Using Cloudflare.’ is closed to new replies.