Skip to content

Latest commit

 

History

History
28 lines (22 loc) · 883 Bytes

README.md

File metadata and controls

28 lines (22 loc) · 883 Bytes

cfdns

Utility to update Cloudflare DNS records with the current ip address

Usage

$ cfdns -h
Usage for cfdns:
  -token string
        Cloudflare API token. Must have edit access to all zone:domain pairs specified
  -y    Set this flag to skip confirmation of changes
  [zone:domain]
        The domains to update are provided as a comma separated list of zone:domian pairs
        For example: foo.com:cloud,bar.net:www

A simple cron example:

# every hour update the ip address for the "cloud" subdomain
# logs output to the system logger with the 'cfdns' tag
0 * * * * /usr/local/bin/cfdns -token [token] -y example.com:cloud 2>&1 | logger -t cfdns

Building

Most recently tested with go 1.18.1 - go get && go build

Directly depends on cloudflare-go and term