Giter VIP home page Giter VIP logo

cloudflare-ddns's Introduction

cloudflare-ddns

Cloudflare Dynamic DNS update

Introduction

A script for dynamically updating a CloudFlare DNS record.

Dependencies

1. You'll need a JSON processor:

https://stedolan.github.io/jq/

2. Allow outgoing to:

3. Having following resources:

  • Cloudflare account
  • Cloudflare API key
  • An A record belong to 1 zone managed by Cloudflare

Usage

To use this script, create a copy of the cloudflare_ddns.sh.template file (and remove .template from the filename).

Update below variable:

  • domain='your_domain'
  • zone='your_second&TLD_domain'
  • email='your_email_address'
  • api_key='your_api_key'

To do a one-off update of your DNS record, simply run this script from your terminal. The script will determine your public IP address and automatically update the CloudFlare DNS record along with it.

Because dynamic IPs can change regularly, it's recommended that you run this utility periodically in the background to keep the CloudFlare record up-to-date.

Just add a line to your crontab and let cron run it for you at a regular interval.

Example cron: every 15 minutes, check the current public IP, and update the A record on CloudFlare.

*/15 * * * * /path/to/code/cloudflare_ddns.sh >> /var/log/cloudflare_ddns.log 2>&1

cloudflare-ddns's People

Contributors

bobble6956 avatar pastudan avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

pastudan

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.