Code Monkey home page Code Monkey logo

cloudflare-public-dynamic-ip-update's Introduction

Cloudflare Public Dynamic IP Update

Updating public dynamic IP address to existing cloudflare DNS record (Only work for updating single DNS Zone)

Requirement

Using curl, jq (Need to install epel-release prior to install jq in CentOS), and dig command.
Check whether jq is installed on your system or not before use this script

Need to customize cloudflare_config file before using this script.

  • Auth-Key
    Authorization key for cloudflare API. Able to find it at My Profile page. Substitute [Your_CloudFlare_API_Auth_Key] with your API key.
    Follow this Instruction
  • Auth-Email
    Your Cloudflare account login email. Substitute [Your_CloudFlare_Account_Email] with yours.
  • Zone-ID
    You can find zone ID of your DNS Zone on the right sidebar of cloudflare DNS overview page, under API tab. Substitute [DNS_Zone_ID_of_Your_Domain] with yours.
  • Update-Target
    Meaning list of domain address that you want to update linking ip address via this script. List must be separated by single comma(,). Substitute [List_Of_Domain_Address_You_Want_To_Update] with your list.
    e.g. "google.com,www.google.com"

Tested Environment

If you used this code in other OS and confirm that it works successfully (in all situation), please make an issue with brief test result.
As soon as I check the issue, I will update the list.

Test Condition

  • Current IP is same as record's IP, must see the proper message indicating the identity
  • Current IP is not same as record's IP, record's IP must be updated and see the proper message indicating the record has been updated
  • Has no connection, and see the error message

Tested OS List

  • Ubuntu 18.04.2 LTS
  • CentOS Linux release 7.6.1810

Contact

If you have any question or want to report an error (or any other suggestion), simply make an issue with description.

If you want DNS record IP update shell script for multiple DNS zones, I may work for that. Just simple post an issue on this github repository.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.