Skip to content

Dynamic DNS records updater implemented via Cloudflare API.

License

Notifications You must be signed in to change notification settings

jellyterra/cloudflare-ddns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cloudflare Dynamic DNS

Dynamic DNS records updater implemented via Cloudflare API.

Features

  • Manage multiple zones.
  • Update specified DNS records on event received from netlink.
  • Address filter based on glob.

Install

Binary

Download from releases.

Install via Go mod

$ go install github.com/jellyterra/cloudflare-ddns/cmd/cloudflare-ddns@latest

Configure

Zone

[zones.(zoneName)]

Key Value Description
zone_id String Zone ID of the Cloudflare Site.
token String Cloudflare API token with accesses to the zone.
machine_id String Machine ID, will be shown as comment on dashboard.

Record

[zones.(zoneName).records.(domainName)]

Key Value Description
name String Domain name.
ttl Int Record TTL seconds.
proxied Bool Use Cloudflare CDN.

Network interface & Address filter

[zones.(zoneName).records.(domainName).addr.(netifName).ip6]

Key Value Description
ignore []String Glob rules for IP addresses.

You may have to filter reserved or internal IP sections via this feature.

Glob specification can be found here.

Example

Example: /etc/cloudflare-ddns.toml

[zones.jellyterra]
zone_id = ""
token = ""
machine_id = "spacemit-k1"

[zones.jellyterra.records.k1]
name = "k1.jellyterra.com"
ttl = 60
proxied = true

[zones.jellyterra.records.k1.netif.wlp1s0.addr.ip4]
ignore = [ "192.*" ]

[zones.jellyterra.records.k1.netif.wlp1s0.addr.ip6]
ignore = [ "fe.*" ]

Run

$ cloudflare-ddns -c /etc/cloudflare-ddns.toml

About

Dynamic DNS records updater implemented via Cloudflare API.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages