Cloudflare DDNS bash script is an simple script written in bash for updating IP address in Cloudflare DNS services.
Report Bug
·
Request Feature
This is my first hobbiest project which can help someone else in every day life.
To get a local copy up and running follow these simple steps.
- Bash
- Git
- Install on RPM-based Linux distros:
sudo dnf install git-all
- Install on Debian-based Linux distros:
sudo apt install git-all
- Use your command line and clone the repository:
git clone https://github.com/Zacer559/Cloudflare-DDNS-bash-script
- Go to folder which you cloned:
cd Cloudflare-DDNS-bash-script
- Change all declaration parameters(line 4 to 9) in file to your for example using nano:
nano Cloudflare.sh
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.
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
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.
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
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.
@Super_Widower - [email protected]
Project Link: https://github.com/Zacer559/Cloudflare-DDNS-bash-script