Curl operation/command failed due to server return code - 403, exit
What is the issue you’re encountering
Cannot run script (either by CRON or within CPanel Terminal) when Cloudflare is enabled
What steps have you taken to resolve the issue?
The only way to resolve the issue is to turn off the Cloudflare Proxy and set to DNS Only
I have created a WAF rule that skips all managed rules for my Origin Server IP
I have also set the SSL to Full/Strict (rather than Cloudflare recommended ‘Flexible’) on the recommendation of our hosting provider, but that did nothing
What are the steps to reproduce the issue?
try to run the script from the terminal in CPanel or by CRON.
You can review your WAF to determine reason for block and create an exception and/or modify the cron / local DNS resolution on the server to communicate with the server directly vs. performing a jhook with Cloudflare’s edge for local tasks.
I have reviewed the WAF logs but don’t see anything particular. Furthermore, I have created a rule for both my IP and the server IP to skip all managed rules and custom rules but that does nothing.
Our hosted server can edit local hosts but they stress it really should be temporary.
Furthermore, I am having a few other issues (some pages not displaying (just in Firefox), and also some parts of modules that call external resources not displaying (in all broswers).
No logs in the WAF. Just not showing.
As soon as I turn the cloudflare proxy off it all works.
With regard to the first issue (the blocked script), it seems that setting the ‘definitely automated’ in super bot mode to ‘allow’ is successful.
On checking the logs, our server IP isn’t shown, but there is what appears to be an abbreviated IP V6 address, which is I assume why the allowlist wasn’t working.
I have changed the ‘definitely automated’ back to managed challenge because it does filter a lot of dodgy traffic, but at least I know what is stopping the script.
Just need to sort the allowlisting
As for the other two issues (blanked out screen on one page in Firefox, and some external resources not showing on some pages), that needs more work because the pages themselves are being allowed.