Skip to content

zone: add PTR record management for DDNS and /zm/update-ptr - #92

Merged
vooon merged 1 commit into
mainfrom
ptr-management
Sep 3, 2026
Merged

zone: add PTR record management for DDNS and /zm/update-ptr#92
vooon merged 1 commit into
mainfrom
ptr-management

Conversation

@vooon

@vooon vooon commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Adds PTR record management to Zoneomatic.

New custom endpoint

POST /zm/update-ptr{"target": "host.example.com.", "addresses": ["192.0.2.55", ...], "mode": "append"|"replace"|"replace-all"}.
Reverse names (in-addr.arpa / ip6.arpa) are calculated from the addresses automatically; mode defaults to replace-all.

Modes (built on the existing matcher machinery, updateRecords gains a replaceAll knob):

  • append — insert missing PTR only, never remove anything
  • replace — single-record in-place swap, keeps unrelated PTRs on the name
  • replace-all — full sync: exact one PTR per address plus removal of stale PTRs pointing at the target

Errs 404 when no matching reverse zone exists, 400 on invalid address/mode.

New CLI option

--ddns-manage-ptr makes /nic/update also manage PTRs for the updated addresses (one PTR per address, stale PTRs cleaned). A missing reverse zone is silently ignored — not an error.

Also

  • README: flag, endpoint docs, /nic/update note
  • Regenerated doc/openapi.json / doc/openapi.yaml (fuego v0.20.0 output)
  • Tests: mode semantics, v4/v6 multi-file updates, no-growth, stale cleanup, disabled/no-zone cases, endpoint HTTP statuses

@vooon
vooon merged commit e7daf8d into main Sep 3, 2026
8 checks passed
@vooon
vooon deleted the ptr-management branch September 3, 2026 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant