Is my server's IP being blocked by CF?

What is the issue you’re encountering

CURL requests in API are failing without an error. I can CURL from my PCs command line, though, so the only thing I can think is… maybe the server is blocked?

What steps have you taken to resolve the issue?

  1. disabled my server’s firewall (CSF),

  2. disabled all WAF Rules, and

  3. allowlisted my server’s IPv4 and IPv6 in Security > WAF > Tools

What are the steps to reproduce the issue?

This is the script I’m running:

#!/bin/sh

printf "Updating example.com:\n"

curl --request GET \
  --url "https://api.cloudflare.com/client/v4/zones/?name=example.com" \
  --header "X-Auth-Email: [email]" \
  --header "X-Auth-Key: [global key]" \
  --header 'Content-Type: application/json'

printf "Response complete\n"

This is the result:

# bash cloudflare_test.sh
Updating example.com:
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:31 --:--:--     0

For future readers, I figured out the issue. My server is failing on IPv6 pings, so when I forced an IPv4 request with -4 it worked; eg,

#!/bin/sh

printf "Updating example.com:\n"

curl --request GET \
  -4 \
  --url "https://api.cloudflare.com/client/v4/zones/?name=example.com" \
  --header "X-Auth-Email: [email]" \
  --header "X-Auth-Key: [global key]" \
  --header 'Content-Type: application/json'

printf "Response complete\n"

I didn’t figure that out myself, I have to give credit to Omega-marketing on Reddit’s Cloudflare sub. Based on this information, though, it looks like the issue is with how IPv6 was set up on my server, so now I’m turning to my server provider.

I hope this helps others!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.