This tool helps fools like me to cope with shitty ISP which does not provide a static IP to their customers. It automatically updates DNS settings of any domain contained in your cloudflare account. It will also monitor the server's public IP, if it changes, it will update the domain's DNS records to reflect it.
The tool can update multiple domains from a cloudflare account. For each domain a filter can be applied on DNS records to update (filter by name or by record type) The program will update the IP address of each record with the public IP it previously obtained from a service named IPfy (https://api.ipify.org).
Logs can be output in stdout or syslog. Check the help for more information about how to enable it.
- Docker >=1.9
- Go >=1.5
Execute the following commands:
$ docker build -t cfdnsupdaterbuild ./environments/build
$ docker run -t -v <output_path_on_host>:/build cfdnsupdaterbuild -a <ARCH> \
[-b <BRANCH or TAG>] -p aacebedo/cfdnsupdater -bn cfdnsupdater -o /build
This command will create a tar gz and debian file in the build directory of the container.
Execute the following commands in a environment with go command availabled
$ go get github.com/aacebedo/cfdnsupdater ./...
There are multiple ways to install the software. Package for ARM and amd64 available for each methods.
Get an archive on github and execute the following commands:
$ tar xvzf ./cfdnsupdater.<ARCH>.<VERSION>.tar.gz
Note: I also provide a systemd file you can manually install in the appropriate directory ("/etc/systemd/system" for instance).
Add the following debian repository to your apt source and install it through apt-get:
$ "deb https://dl.bintray.com/aacebedo/cfdnsupdater <DISTRIBUTION> main" | \
sudo tee -a /etc/apt/sources.list
$ sudo apt update
$ sudo apt install cfdnsupdater
Pull the docker image and run it in a container:
docker pull aacebedo-docker-cfdsnupdater.bintray.io/cfdnsupdater-amd64:<VERSION>
$ cfdnsupdater -c <path_to_configuration_file>
Here is an example of a configuration file (also included in the distribution):
foo.com:
email: [email protected]
apikey: get_your_api_key_from_your_cloud_flare_a_account
period: 60
record_types: []
record_names: []
$ cfdnsupdater -h
Coming soon
LGPL 3