- httpreq, lego’s protocol for ACME DNS-01 challenges, also used by Traefik and easy to call from a certbot hook;
- DynDNS2, the dynamic DNS protocol of routers (MikroTik, OpenWrt, pfSense, Ubiquiti),
ddclientandinadyn.
DHCP servers, ExternalDNS and
nsupdate can use standard DNS UPDATE messages (RFC 2136) with a TSIG
key instead of a token. See Dynamic updates.ACME DNS-01 (httpreq)
Both endpoints need an API token with
records.write, preferably limited to the zones that need
certificates. A signed-in session isn’t accepted. Authenticate with a Bearer token, or with HTTP
Basic and the token as the password (any username), which is what lego and Traefik send.
Request body
string
required
The challenge name, e.g.
_acme-challenge.example.com.. It must start with _acme-challenge..string
required
The challenge value (the key authorization digest).
{"ok": true}.
What DNZ does
- present creates a TXT record with a TTL of 60 in the matching zone: the most specific zone of the token’s division that the token can reach. Sending the same value twice doesn’t add a second record.
- cleanup deletes that TXT record again.
- Both changes are written to the audit log as
<creator> via <token name>.
Client settings
lego and Traefik take the endpoint and token from their environment:Dynamic DNS (DynDNS2)
Create a token with
records.write, preferably limited to the zone that holds the hostname, and send
it as the HTTP Basic password (any username):
Query parameters
string
required
One or more names, comma-separated, in zones the token can reach. At most 20 per request.
string
IPv4 and/or IPv6 addresses, comma-separated. When empty, the caller’s address is used. Behind a
reverse proxy, set
DNZ_TRUSTED_PROXIES so DNZ sees the real address.What DNZ does
- The name’s A and AAAA records are replaced with the new addresses. Only the address families you send change: an IPv4 address replaces the A records and leaves AAAA alone.
- New records get a TTL of 60.
- Names that have a CNAME are refused.
- A proxied name stays behind its proxies; the new address becomes the origin.
Answers
The answer is plain text, one line per hostname:Example
ddclient, MikroTik and other clients are in Dynamic DNS.