Skip to content

NEW PROVIDER: Netnod primary DNS#4191

Open
vilhelmprytz wants to merge 7 commits into
DNSControl:mainfrom
Netnod:add-netnod-provider
Open

NEW PROVIDER: Netnod primary DNS#4191
vilhelmprytz wants to merge 7 commits into
DNSControl:mainfrom
Netnod:add-netnod-provider

Conversation

@vilhelmprytz
Copy link
Copy Markdown

@vilhelmprytz vilhelmprytz commented Apr 7, 2026

Add a DNSControl provider for Netnod primary DNS API. Provider is loosely based on the PowerDNS provider.

  • Adds a new DNS provider for Netnod Primary DNS
  • Uses diff2.ByRecordSet(), updates are batched per label+type
  • Supports zone creation with metadata

Capabilities

A, AAAA, ALIAS, CAA, CNAME, HTTPS, MX, NS, PTR, SRV, TLSA, TXT (CanGetZones, DocCreateDomains, DocDualHost)

We can offer an API key for automated testing, if needed.

Please create the GitHub label 'provider-NETNOD'.

Fixes #4192.

Add a DNSControl provider for Netnod primary DNS API.
Provider is loosely based on the PowerDNS provider.
@TomOnTime
Copy link
Copy Markdown
Collaborator

Thanks! Super glad to receive this!

Right now the project is in transition but I hope to be able to address this once we've moved to our new org.

@vilhelmprytz
Copy link
Copy Markdown
Author

Hi @TomOnTime, thanks for the reply!

Let me know if there is anything I can do to help. Is the project being transitioned away from the StackExchange organization?

@TomOnTime
Copy link
Copy Markdown
Collaborator

Hi @TomOnTime, thanks for the reply!

Let me know if there is anything I can do to help. Is the project being transitioned away from the StackExchange organization?

Yes, it will soon be in the dnscontrol organization.

Tom

@flindeberg
Copy link
Copy Markdown
Contributor

I handled the conflicts due to package update and renames (StackExchange -> DNSControl).

@vilhelmprytz Do double check that I didn't mess something up.

@flindeberg
Copy link
Copy Markdown
Contributor

Oh, wait, I used the web-GUI and obviously something funny happened.

flindeberg added 2 commits May 8, 2026 16:47
Fixed typos / artifacts from web-GUI based merge.
Fixed web-GUI based merge artifacts.
Copy link
Copy Markdown
Collaborator

@TomOnTime TomOnTime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good. I'm requesting @cafferata review the docs.

nitpick: Would you please rename providers/netnod/diff.go to providers/netnod/records.go ? Thanks!

@vilhelmprytz
Copy link
Copy Markdown
Author

@TomOnTime Certainly, now changed.

@TomOnTime
Copy link
Copy Markdown
Collaborator

Thanks!

@TomOnTime
Copy link
Copy Markdown
Collaborator

Greetings! Thank you for your patience while we migrated to the new GitHub org.

Now that the migration is complete, please rebase. Thank you.

@vilhelmprytz
Copy link
Copy Markdown
Author

@TomOnTime Thanks, now pushed!
Let me know if you want credentials for automated testing towards the API, and how to set this up.

@TomOnTime
Copy link
Copy Markdown
Collaborator

Hi there!

Oops... things move quickly and another rebase to main is needed.

Yes, I'd love to have this added to the automated tests. Please see https://docs.dnscontrol.org/developer-info/byo-secrets for instructions.

Copy link
Copy Markdown
Member

@cafferata cafferata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding Netnod support! A few suggestions on the documentation and one build issue.


## Activation

See the [Netnod DNS](https://www.netnod.se/dns/dns-enterprise-services).
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a sentence fragment. Consider expanding it to explain how users obtain API credentials, similar to how other provider docs handle this section.

- `default_ns` sets the nameservers used when creating zones.
- `also_notify` sets a list of IP addresses that will receive DNS NOTIFY messages when a zone is created. This is the provider-level default and applies to all zones unless overridden per zone (see below).
- `allow_transfer_keys` sets the TSIG key IDs permitted to perform zone transfers from the distribution servers when a zone is created.
This should include all keys used for DNS secondary replication, including those used by the Netnod secondary DNS service. This is the provider-level default and applies to all zones unless overridden per zone.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The text says "overridden per zone (see below)" but there is no section below explaining how to do this. The code in dns.go supports per-zone also_notify and allow_transfer_keys overrides via metadata, but users won't know how to use them. Consider adding a section with an example, or at least remove the "(see below)" reference.

a := rejectif.Auditor{}

a.Add("TXT", rejectif.TxtHasDoubleQuotes) // Last verified 2023-11-11
a.Add("TXT", rejectif.TxtHasBackslash) // Last verified 2023-11-11
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "Last verified" dates say 2023-11-11 but this is a brand-new provider. These should reflect when the checks were actually verified against the Netnod API.

package netnod

import (
"github.com/StackExchange/dnscontrol/v4/models"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All Go source files use github.com/StackExchange/dnscontrol/v4 but the module path is github.com/DNSControl/dnscontrol/v4. This needs to be updated across all files for the code to compile.

@cafferata
Copy link
Copy Markdown
Member

Optionally: since #4208 landed before this PR, would you be open to implementing RegisterCredsMetadata()? That would make Netnod available in dnscontrol init. The PR has examples for simple providers like BIND and more complex ones like TransIP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

Provider request: Netnod Primary DNS

4 participants