Skip to content

Comments

Create hetznercloud.py#5244

Open
TooStrong wants to merge 2 commits intoopnsense:masterfrom
TooStrong:ddclient-hetznercloud
Open

Create hetznercloud.py#5244
TooStrong wants to merge 2 commits intoopnsense:masterfrom
TooStrong:ddclient-hetznercloud

Conversation

@TooStrong
Copy link

Motivation

The existing "hetzner" provider targets the legacy DNS API.
With the migration to the Hetzner Console (Cloud) DNS,
updates against the old endpoint return HTTP 422.

This provider implements support for the new RRSet-based
Hetzner Cloud DNS API.

This implementation focuses on the native ddclient DynDNS use case (A/AAAA),
which is a subset of the more comprehensive Hetzner DNS plugin attempted in upstream
pull request #5091 but not merged due to scope and maintenance considerations.

This provider is lightweight and specifically targets Dynamic DNS (DynIP)
updates using the Hetzner Cloud DNS API and integrates with the native
AccountFactory without introducing a full DNS management UI.

See: #5091 for reference.

Tested Scenarios

Environment:

  • OPNsense 26.1
  • Native ddclient backend
  • Hetzner Console (Cloud) DNS
  • Dual-stack home WAN (dynamic IPv4 + IPv6)

Test cases:

✔ Initial IPv4 update

  • A record successfully updated via RRSet API
  • Log entry: HetznerCloud: A silonet.org -> <IPv4>
  • Status persisted to disk

✔ Initial IPv6 update

  • AAAA record successfully updated via RRSet API
  • Log entry: HetznerCloud: AAAA silonet.org -> <IPv6>
  • Status persisted to disk

✔ No unnecessary updates

  • Subsequent poll cycles correctly report not modified
  • No redundant API calls when IP unchanged

✔ Error case validation

  • Old "hetzner" provider fails with HTTP 422 on new Console API
  • Confirms that this implementation targets the correct Cloud DNS RRSet endpoint

✔ Multiple account setup

  • Separate accounts for IPv4 (A) and IPv6 (AAAA) tested
  • Both operate independently without conflict

The provider integrates cleanly with the native AccountFactory loader and
requires no additional GUI model changes.

Uses Python requests for API communication.

Cleaned hidden or bidirectional Unicode text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant