GithubHelp home page GithubHelp logo

cloudflare-dynamic-dns's Introduction

Cloudflare Dynamic DNS

Dynamic IP? No Problem! Keep your Domains in check!

Quickly update DNS records for one or many domains names to the current external public IP address.

Perfect for any HomeLab, SelfHosted web server, RaspberryPi, NGINX reverse proxy servers and whatever else you want to host.

Backup your Cloudflare DNS configuration before blindly using these tools!


Usage

Edit UpdateAll.sh or UpdateSingle.sh and fill in the required info:

# CloudFlare Account Details
auth_email="EMAILADDRESS"
auth_key="AUTHKEY"

UpdateAll.sh - Multiple domains can be bulk updated, define them here.

zone_names=("DOMAINNAME.COM" "DOMAINNAME2.COM" "DOMAINNAME3.COM")

UpdateSingle.sh - A single domain you want to manage.

zone_name="DOMAINNAME.COM"

Nice work, Let's do it ๐Ÿ‘


Update All Domains โšก

Perhaps you have a dozen SelfHosted domains and sub domains, Update All is for you! All records attached to the domain will be updated to the current external IP address. It couldn't be easier!

./UpdateAll.sh

[Tuesday 10 July  21:44:47 ACST 2018] - Checking domain.com
[Tuesday 10 July  21:44:50 ACST 2018] - No Update Required: domain.com is 1.1.1.1
[Tuesday 10 July  21:44:51 ACST 2018] - No Update Required: taco.domain.com is 1.1.1.1
[Tuesday 10 July  21:44:53 ACST 2018] - No Update Required: www.domain.com is 1.1.1.1
[Tuesday 10 July  21:44:54 ACST 2018] - Checking domain2.com
[Tuesday 10 July  21:44:55 ACST 2018] - No Update Required: domain2.com is 1.1.1.1
[Tuesday 10 July  21:44:56 ACST 2018] - No Update Required: hotdog.domain2.com is 1.1.1.1
[Tuesday 10 July  21:44:56 ACST 2018] - No Update Required: www.domain2.com is 1.1.1.1
[Tuesday 10 July  21:44:57 ACST 2018] - All Done!

Party! ๐ŸŽ‰๐ŸŽˆ๐Ÿ•บ๐Ÿง™โ€


Update a Single Subdomain ๐ŸŒฎ

With your zone_name defined as domain.com, Update the IP for taco.domain.com to the current external IP address.


./UpdateSingle.sh taco

Review the output ๐Ÿ„

Update Required

./UpdateSingle.sh taco

[Tuesday 10 July  21:31:07 ACST 2018] - Checking taco.domain.com
[Tuesday 10 July  21:31:15 ACST 2018] - Update Required: taco.domain.com points to 2.2.2.2
[Tuesday 10 July  21:31:15 ACST 2018] - Updating taco.domain.com to 1.1.1.1
[Tuesday 10 July  21:31:15 ACST 2018] - All Done!

No Update Required

./UpdateSingle.sh taco

[Tuesday 10 July  21:37:23 ACST 2018] - Checking taco.domain.com
[Tuesday 10 July  21:37:25 ACST 2018] - No Update Required: taco.domain.com is 1.1.1.1

Now Supercharge your life with Cron ๐Ÿ˜Ž

# Check and update domain.com and domain2.com each hour
0 * * * * /home/sushi/UpdateAll.sh

HELP THE WHEELS FELL OFF

If the wheels fall off, don't forget to make the script executable!

chmod +x UpdateAll.sh

No External IP Address?

Hmmm, Amazon has closed it's doors? Update the IP check from https://checkip.amazonaws.com to an alternative location.

Mac OS?

You are unfortunately missing a few key features from grep!

Update grep with Homebrew ๐Ÿ˜‡

brew install grep --with-default-names
grep --version
grep (GNU grep) 3.1
Packaged by Homebrew

Give it another whirl ๐Ÿ‘Œ


Official Cloudflare API documentation v4

cloudflare-dynamic-dns's People

Contributors

casbitton avatar t3hbeowulf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

t3hbeowulf

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.