Disabling IPv6 via API - How?

Hello,

I’ve looked around trying to disable ipv6 decoding to my website, currently our tracking system decodes IP’s as IPv6 because of Cloudflare, and we need to disable that so it can decode IPv4.

The slider that lets you disable tipv6 is not functional (as read in other threads).
Trying to use the API but without success.

Can someone provide a template to use in order to upload to the server and call the server to disable it? best if you can do PHP.

Having trouble decoding Curl, I’m not a developer.

Thanks!!

Curl is just a command line action, from the command line of your server (or MacOS Terminal app):

curl -X PATCH "https://api.cloudflare.com/client/v4/zones/023e105f4ecef8ad9ca31a8372d0c353/settings/ipv6" \
     -H "X-Auth-Email: [email protected]" \
     -H "X-Auth-Key: c2547eb745079dac9320b638f5e225cf483cc5cfdda41" \
     -H "Content-Type: application/json" \
     --data '{"value":"off"}'

Copy the above code into a text editor, then change the following:
The “zones” code in the top line comes from the Zone ID in your domain’s Overview tab in the Cloudflare dashboard (lower right corner).
Auth-Email is the email account you use to log into your Cloudflare account.
Auth Key is the Global API key you can get from the API link, also in the Overview section, lower right corner.

When all that’s done, copy and paste the whole thing onto any server’s Command Line, then hit Return. You should get a Success message.

1 Like

Totally worked - Thanks!!! perfect.

1 Like

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