Can't cURL to a Jenkins server behind cloudflare

I just setup my domain with cloudflare the other day, and I pointed it to my Jenkins server. As my dedicated machine does not have DDoS protection, I have enabled cloudflares protection. The only problem? Whenever I try to cURL a file from my dedicated server to my Jenkins, the download corrupts. When I cURL without downloading, I get: Authentication required. I was wondering if anyone has a solution to this.

Thanks!

When you turn on DDoS protection CloudFlare will obviously stop visitors and let them verify/authenticate themself.
Disableing DDoS protection would pretty sure solve this.
Dont know if this is a real “solution” or if this is just concealing the problem as then DDoS protection (from CloudFlare) is not available anymore.

Perhaps you could try adding your your dedicated server’s IP address to the Allow list in Firewall → Tools.

Or Curl --connect-to to your server:
curl -svo /dev/null http://example.com --connect-to ::12.34.56.78

1 Like

Taking curl out of the equation for a moment… what happens when you point a browser at the file?

Because my server is a headless linux server, I would have no way of knowing. But on my own PC, I can download a file in a browser just fine.

I wonder if setting the security level to Low or Essentially Off might help.

Adding it too the firewall worked, although its not a very good solution if I want to be able to download from other servers.

This topic was automatically closed after 30 days. New replies are no longer allowed.