mod_cloudflare IPs in the customers access log

Created:

2016-12-12 03:46:00 UTC

Modified:

2017-08-08 13:42:20 UTC

1

Was this article helpful?


Have more questions?

Submit a request

mod_cloudflare IPs in the customers access log

Applicable to:

  • Plesk 12.5 for Linux

Symptoms

Apache module mod_cloudflare is installed however CloudFlare IP addresses are not converted into real IP addresses.

There is no link to CloudFlare ServerShield in Plesk and no extension installed.

Cause

Custom installation of mod_cloudflare module.

Resolution

Make sure that custom installation was performed properly according to https://www.cloudflare.com/technical-resources/

Otherwise, install mod_cloudflare provided with Plesk:

  1. Remove CloudFlare via autoinstaller if it is marked as installed, or manually:

    # rpm -e --nodeps mod_cloudflare
  2. Install CloudFlare via autoinstaller.

    Additionally mod_cloudflare will be installed:

    [I] mod_cloudflare-1.2.0.2-rhel6.15082017.x86_64

    Now CloudFlare is installed correctly and mod_cloudflare is enabled:

    # /usr/local/psa/admin/bin/httpd_modules_ctl -s | grep cloudflare
    cloudflare on
  3. Check /etc/nginx/conf.d/cloudflare.conf and compare the list of IP addresses with the list from CloudFlare article available here

    Update /etc/nginx/conf.d/cloudflare.conf if necessary and reload Nginx:

    # service nginx reload

Note: At the moment Plesk does not have functional to update /etc/nginx/conf.d/cloudflare.conf with current CloudFlare IP addresses automatically. All these IP addresses should be updated manually according to this list https://www.cloudflare.com/ips/

Have more questions? Submit a request
Please sign in to leave a comment.