Skip to content

Dynamic DNS update script for Cloudflare. Using API v4. Ease to use. Clear instructions.

License

Notifications You must be signed in to change notification settings

Zacer559/Cloudflare-DDNS-bash-script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License


Logo

Cloudflare DDNS bash script

Cloudflare DDNS bash script is an simple script written in bash for updating IP address in Cloudflare DNS services.

Report Bug · Request Feature

Table of Contents 📃

  1. About The Project ⚡
  2. Getting Started 📔
  3. Usage 👀
  4. Contributing ❤️
  5. License 📄
  6. Contact 📞

About The Project ⚡

This is my first hobbiest project which can help someone else in every day life.

Built With

Getting Started 📔

To get a local copy up and running follow these simple steps.

Prerequisites

  • Bash
  • Git
    • Install on RPM-based Linux distros:
    • sudo dnf install git-all
    • Install on Debian-based Linux distros:
    • sudo apt install git-all

Installation

  1. Use your command line and clone the repository:
git clone https://github.com/Zacer559/Cloudflare-DDNS-bash-script
  1. Go to folder which you cloned:
cd Cloudflare-DDNS-bash-script
  1. Change all declaration parameters(line 4 to 9) in file to your for example using nano:
nano Cloudflare.sh

alt text

So in case of that picture your config should look similar to this:

# Declarations of names and ids of records.
declare -a RECORD_NAMES=("zacer.pl" "mail.zacer.pl" "vpn.zacer.pl" "dysk.zacer.pl")
AUTH_EMAIL="[email protected]"
AUTH_KEY="8M7wS6hCpXVc-DoRnPPY_UCWPgy8aea4Wy6kCe5T"
ZONE_NAME="zacer.pl"
IP_FILE="/tmp/CloudFlare_IP" 
PROXIED=true

Here is the guide how to get authorization key.

Usage 👀

One time run:

  • bash Cloudflare.sh

Cyclic activation (using crontab):

  • Go to crontab editing:
    • crontab - e
  • Add crontab entry like this (Example - run script every 10 minutes):
    • */10 * * * * /path/to/script >> /dev/null
    • To get more timing options check out crontab guru

Contributing ❤️

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

License 📄

Copyright 2020 Zacer559

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Contact 📞

@Super_Widower - [email protected]

Project Link: https://github.com/Zacer559/Cloudflare-DDNS-bash-script