Skip to content

aryapramudika/cloudflare-api-dns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Cloudflare API DNS Script

Cloudflare Update DNS Record using API Script

You can use for automation edit DNS Record using script.

How to use

Clone this repository, you can move this script file to /usr/local/bin or directly run.

Give execute permission

cd cloudflare-api-dns
chmod +x *

Change the credentials (API_KEY, EMAIL, ZONE_ID)

Reference to get the credentials:

For using this all script, make sure you have installed jsontools / jq in Linux

Get Record

Usage: ./get.sh

cod.example.com              A      xx.xx.xx.xx
jenkins.example.com          A      xx.xx.xx.xx
jitsi.example.com            A      xx.xx.xx.xx
example.com                  A      xx.xx.xx.xx

Add Record

Usage: ./add.sh <subdomain> <record type> <record content> <proxied> <TTL>

./add.sh test CNAME test.aryapramudika.com false 3600

Delete Record

Usage: ./delete.sh <record name> <record type>

./delete.sh test CNAME

About

Script Cloudflare Update DNS Record using API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages