Cloudflare DNS Updater written in Rust. Works for IPv4 and IPv6 alike.
- Rust 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .forgejo/workflows | ||
| debian | ||
| src | ||
| test_configs | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| clippy.toml | ||
| COPYING | ||
| README.md | ||
Cloudflare DNS Updater
Using the application
The application necessarily requires a valid Cloudflare API Token. Further the application must be located in the same network as the configured zones.
The actual configuration happens in three or more files located in ~/.config/cloudflare-dns-updater/:
config.toml contains general configuration parameters for the application
interfaces.toml contains all IPv6 interfaces available/used by the zone config files.
.toml files in zones.d contain settings for individual zones.
Example:
config.toml
cf_api_token = "0123456789abcdef0123456789abcdef01234" # Cloudflare API Token
check_interval_seconds = 30 # Defaults to 60 if missing
uptime_url = "https://example.org/uptime/id12" # Post Endpoint for a Uptime Monitor
interfaces.toml
host_address = "::edcb:a098:7654:3210"
[interfaces]
example-interface = "::0123:4567:890a:bcde" # static part of the IP, the rest will be dynamically generated using the host
zones.d/example.org.toml (deprecated V1 scheme)
email = "owner@example.org" # Email of User owning the Zone
zone = "example.org" # Zone Name
id = "01234567890abcdefghijklmnopqrstu" # Zone ID
[[entry]]
name = "example.org" # "@" Symbol is not currently supported
type = ["AAAA", "A"] # Options are: "A" (IPv4/A Record) and/or "AAAA" (IPv6/AAAA Record)
interface = "example-interface" # Only required on type values 6 and 10
proxied = true # this parameter is optional, it defaults to false
zones.d/example.org.toml (mew V2 scheme)
email = "owner@example.org" # Email of User owning the Zone
zone = "example.org" # Zone Name
id = "01234567890abcdefghijklmnopqrstu" # Zone ID
fully_manaed = true # Whether records of the same types as below
# should be automatically deleted if not listed
[[entry]]
name = "ipv4.example.org" # "@" Symbol is not currently supported
type = "A"
address = "0.0.0.0" # optional address override for static entries
proxied = true # this parameter is optional, it defaults to false
[[entry]]
name = "ipv6.example.org" # "@" Symbol is not currently supported
type = "AAAA"
interface = "example-interface" # is not used when address is specified but needs to be supplied
address = "[fd00::1]" # optional address override for static entries
proxied = true # this parameter is optional, it defaults to false
[[entry]]
name = "example.org" # "@" Symbol is not currently supported
type = "DUAL" # replaces ["A", "AAAA"] from the v1 scheme
interface = "example-interface" # is not used when address6 is specified but needs to be supplied
address4 = "0.0.0.0" # optional address override for static entries
address6 = "[fd00::1]" # optional address override for static entries
proxied = true # this parameter is optional, it defaults to false
[[entry]]
name = "alias.example.org" # "@" Symbol is not currently supported
type = "CNAME"
target = "example.org"
proxied = true # this parameter is optional, it defaults to false
[[entry]]
name = "example.org" # "@" Symbol is not currently supported
type = "SRV"
target = "example.org"
priority = 1
weight = 1
port = 443
[[entry]]
name = "example.org" # "@" Symbol is not currently supported
type = "MX"
target = "mail.example.org"
priority = 1
[[entry]]
name = "example.org" # "@" Symbol is not currently supported
type = "TXT"
content = "example" # will retain quotes automatically and ensure Cloudflare max length compliance
comment = "id" # optional identifier in case multiple TXT records exist on the same domain
Debian Repository
Currently supported:
- Debian 12 'Bookworm'
Includes systemd system and user unit files
For more details see the package registry