cloudflare-ddns

command module
v0.0.0-...-a2ef950 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2018 License: MIT Imports: 6 Imported by: 0

README

cloudflare-ddns

Dynamic DNS client using CloudFlare's client API.

Copyright 2013 Kevin Retzke kmr@kmr.me

Shared under the MIT license, see LICENSE for details.

Installing

You will need the Go development environment installed to build/run this program. Only packages in the standard library are used.

After that is set up:

go get github.com/retzkek/cloudflare-ddns

Set EMAIL, ZONE, and DOMAIN appropriately (for most cases DOMAIN == ZONE, unless you have a dynamic subdomain.

TKN is your CloudFlare API key from https://www.cloudflare.com/my-account.

EGRESS is the publicly-facing network interface. If you want to run this on a machine within your network, the getAddr() function will need to be changed to optain the IP address via some external means (e.g. web scraping). Let me know if you need this.

FREQUENCY is how often you want to check for IP address changes. Note that it will only hit the CloudFlare API when the IP address changes, so it doesn't hurt to make it fairly often.

After setting your options, change to the package directory ($GOPATH/pkg/src/github.com/retzkek/cloudflare-ddns) and run:

go install

This will build the executable and install it in $GOPATH/bin.

Usage

If $GOPATH/bin is in your path then you just have to run:

cloudflare-ddns

This will run in the foreground with logging to stderr. You could just run in a tmux or screen session, or background it:

nohup cloudflare-ddns 2>log.file &

Bugs/Requests

Feel free to email me kmr@kmr.me or submit an issue on GitHub.

Documentation

Overview

Dynamically update CloudFlare zone file with current IP address

Copyright 2013-2018 Kevin Retzke <kmr@kmr.me> Shared under MIT license, see LICENSE for details

Jump to

Keyboard shortcuts

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