dynip-ng

command module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 29, 2019 License: GPL-3.0 Imports: 1 Imported by: 0

README

Dynamic IP Updater

Listens on your external interface and updates your files and Cloudflare DNS records

Github Release GoDoc Go Report Card Build Status

Overview

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.

How to install

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.

How to configure

Check the example configuration for how to configure the tool.

It can be verified with

dynip-ng config -c /path/to/config/file

How to run

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

How to deploy

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

Bug Reports

Please use the issue tracker for bugs and feature requests.

License

See the LICENSE file for usage conditions.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg
cfg
Package cfg configures the dyn-ip daemon
Package cfg configures the dyn-ip daemon
listener
Package listener monitors IP changes on a network interface
Package listener monitors IP changes on a network interface
update
Package update is responsible for updating destinations using IP
Package update is responsible for updating destinations using IP
version
Package version is used by the release process to add an informative version string to some commands.
Package version is used by the release process to add an informative version string to some commands.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL