Listens on your external interface and updates your files and Cloudflare DNS records
This tool was born out of a simple problem: not having access to a static IP address. Since configuration for some programs relies on the IP being explicitly specified, it's annoying to adapt configuration whenever the external IP changes.
The same goes for DNS records that are hosted on Cloudflare. If the external IP is listed in one of your zone's records, why log in every time and change it manually?
Cloudflare has an API and go
provides a templating language. This small tool leverages the two.
The easiest way is to run
go get github.com/els0r/dynip-ng
cd $GOPATH/src/github.com/els0r/dynip-ng
go generate
This will fetch the source code, compile it (with the version baked into the binary) and provide a deployable archive with systemd
files and an example configuration.
Check the example configuration for how to configure the tool.
It can be verified with
dynip-ng config -c /path/to/config/file
To start the listener from the command line, run
dynip-ng run -c /path/to/config/file
If you are debian-based and want to run it as a daemon (recommended), copy the dynip.service
file to your systemd
files and run
systemctl enable dynip.service
systemctl start dynip.service
If you want to deploy the TAR archive with the pre-defined directory structure (see install.sh), run
tar xf dynip.tar.bz2 -C / --strip-components=2
Please use the issue tracker for bugs and feature requests.
See the LICENSE file for usage conditions.