• Resolved Giorgio

    (@superhub)


    Hello there,
    we host sites on a server and if we use Sucuri Security plugin in combination with CloudFlare all of them need 5/7 seconds to open a page.
    If we deactivate Sucuri the site loads instantly. The same happens if we activate Sucuri and we disable CloudFlare.

    Are the two systems incompatible?

    Best

    Superhub

    https://www.ads-software.com/plugins/sucuri-scanner/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Sucuri and CloudFlare are 100% compatible, CloudFlare is one of the CDN (Content Delivery Network) services that we support in our firewall CloudProxy WAF [1] besides Akamai, MaxCDN, and others.

    The slowness that you are experiencing in your site(s) when the plugin is active is caused by a misconfiguration of the DNS resolver used by the server where the website is being hosted, this can only be fixed by the owner of the server (aka. the hosting provider) you can not do much about it, but…

    EXPLANATION

    I modified the plugin several days ago with changeset 1165714 [2] to try to fix this issue (even when this is the responsibility of your hosting provider), the new code is already in the plugin repository but have not been released publicly yet.

    When the plugin is active a function named “is_behind_cloudproxy” is executed every time a request is sent to the site, this function is used to determine if the site is behind CloudProxy, this is necessary to do some things in the background that I will not explain this time. It uses two PHP functions named “gethostbyaddr” and “gethostbyname” which basically run a DNS lookup to reverse the IP address and hostname respectively, if the DNS resolver of the server is misconfigured one or both of these functions may take several seconds (and some times minutes) before the operation is complete.

    SOLUTION

    The easiest solution if you know nothing about PHP is to install the development version of the plugin [3] which has the patch that tries to fix the issues that your hosting provider must resolve but do not want to. If you are into programming then you may prefer to edit the code of the plugin and remove the four lines inside a method named “initialize” of the class “SucuriScanInterface”.

    Let me know if you need more information.

    [1] https://sucuri.net/website-firewall/
    [2] https://plugins.trac.www.ads-software.com/changeset/1165714
    [3] https://downloads.www.ads-software.com/plugin/sucuri-scanner.zip

    Thread Starter Giorgio

    (@superhub)

    Hi Yorman,

    we are the hosters and we’ll investigate ??

    We were able to solve the problem by removing the lines, thank you very much for your support! Truly amazing!

    As soon as you will release the code we’ll test it and report if it fixes this scenario.

    Best

    Superhub

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Sucuri Security plugin using CloudFlare slows sites’ is closed to new replies.