• Resolved adminB

    (@maureeno)


    I have the error message whenever I start a new scan.

    Scan Failed: The scan has failed to start. This is often because the site either cannot make outbound requests or is blocked from connecting to itself.

    [Feb 07 00:27:44] Scan process ended after forking.
    Scan process ended after forking.
    [Feb 07 00:33:02] Calling Wordfence API v2.26:https://noc1.wordfence.com/v2.26……………..
    [Feb 07 00:35:11] Scan stop request received.

    The site uses Cloudflare and Wordfence Plugin. Wordfence worked very well until I used Cloudflare CDN. DNS records has been updated to Cloudflare. I have done the following;

    updated Cloudflare firewall rules to allow the new IP address of Wordfence, 44.239.130.172, 44.238.191.15

    In the section for how does Wordfence get IPs, I chose Let Wordfence use the most secure method to get visitor IP addresses. Prevents spoofing and works with most sites. (Recommended)

    Also tried the selection – “CF-Connecting-IP” HTTP header to get a visitor IP. Only use if you’re using Cloudflare.

    No difference still. Please what other step(s) can I try? I see the issue is between Clouflare and Wordfence.

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Support WFAdam

    (@wfadam)

    Hello @maureeno and thanks for reaching out to us!

    If your site is protected by Cloudflare, you may need to update your Cloudflare settings to allow your site to connect back to itself. You should be able to do this by going to your Cloudflare control panel.

    • Login to Cloudflare
    • Go to “Firewall”
    • Click the “Firewall Rules” tab
    • Click “Create a Firewall rule”
    • Name the rule under “Rule Name”
    • Set the “Field” under “When incoming requests match…” to “IP Address”
    • Enter your site’s IP address under “Value”
    • At the bottom, under “Then…Choose an action” change “Block” to “Allow”
    • Click “Deploy

    Once you have added your site to the Cloudflare Whitelist, head back over to your site and attempt another scan.

    Let me know if this helps and if you have any questions!

    Thanks!

    Thread Starter adminB

    (@maureeno)

    Thank you for your response, @wfadam . I appreciate your kind response.

    I have added the site’s IP address to Cloudflare Whitelist and attempted another scan. I got the result; Scan process ended after forking.

    Pop-up message still reads – Scan Failed

    The scan has failed to start. This is often because the site either cannot make outbound requests or is blocked from connecting to itself. Click here for steps you can try.

    Thank you.

    Plugin Support WFAdam

    (@wfadam)

    Now head over to your Wordfence > Tools > Diagnostic > Debugging and enable Start All Scans Remotely.

    Now head back over to your Wordfence > Scan page and CANCEL any current scans and start a NEW scan.

    Let me know how it goes!

    Thanks!

    Thread Starter adminB

    (@maureeno)

    I went to Wordfence > Tools > Diagnostic > Debugging and enable Start All Scans Remotely.

    Then visited Wordfence > Scan page, cancelled the current scans and started a NEW scan.

    I got this Pop-up message – Scan Failed

    The scan has failed to start. This is often because the site either cannot make outbound requests or is blocked from connecting to itself. Click here for steps you can try.

    Plugin Support WFAdam

    (@wfadam)

    Now that we have the settings in place, can you send me another diagnostic to review?

    I want to make sure the site is able to connect back to itself.

    Thanks!

    Thread Starter adminB

    (@maureeno)

    Please how do I get the diagnostic? Should I go to Tools>> Diagnostics >> Send report by e-mail to [email protected]

    Thank you.

    Plugin Support WFAdam

    (@wfadam)

    Can you send a diagnostic report to wftest @ wordfence . com? You can find the link to do so at the top of the Wordfence Tools > Diagnostics page. Then click on “Send Report by Email”. Please add your forum username where indicated and respond here after you have sent it.

    Sorry, I forgot to provide that information!

    Thread Starter adminB

    (@maureeno)

    This is to confirm that the diagnostic report has been sent to wftest @ wordfence . com

    Thank you!

    Plugin Support WFAdam

    (@wfadam)

    Thanks for sending that diagnostic!

    I think I was able to find what is causing the issue! It looks like the IP detection isn’t correct. It’s detecting everyone’s IP as the same IP, which will cause issues with a lot of things, including the scans.

    Head over to your site and go to Wordfence > All Options > General Wordfence Options > How does Wordfence get IPs. Select “Use the Cloudflare “CF-Connecting-IP” HTTP header to get a visitor IP. Only use if you’re using Cloudflare.” and then SAVE the settings.

    Go back to your scan page, CANCEL, and current scan and start a NEW scan.

    If it fails, you might have to toggle the setting we set earlier. Wordfence > Tools > Diagnostic > Debugging and enable/disable Start All Scans Remotely.

    Let me know what you find!

    Thanks!

    Thread Starter adminB

    (@maureeno)

    Apologies for my slow reply.

    I’ve updated “Use the Cloudflare “CF-Connecting-IP” HTTP header to get a visitor IP. Only use if you’re using Cloudflare.” and then SAVE the settings. Also disabled and enabled remote scan. I got the error message “Scan failed after forking”.

    Eventually, I disabled Cloudflare to scan the site and the operation was successful. It seems that I will manually disable Cloudflare every time I want to scan. Hope the conflict gets sorted out in future updates.

    Thanks a lot for your help.

    Cheers!

    Plugin Support WFAdam

    (@wfadam)

    Well since you were able to pinpoint the issue, that lets us know that Cloudflare is blocking the scan requests to our noc1.wordfence.com server or from allowing your site to connect back to itself.

    If you have all of this set up correctly, which it looks like you do, you might want to reach out to their support to see why your site cant reach itself or our noc1 server.

    Thanks again!

    Thread Starter adminB

    (@maureeno)

    Thanks @wfadam. I am happy to tell you that the scan request is now working after I flushed the Cache and toggled WF settings. The last Wordfence scan was successful.

    Plugin Support WFAdam

    (@wfadam)

    Perfect! Glad we could get it working!

    Let us know if you need anything else!

    Thanks again!

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Scan failed after forking’ is closed to new replies.