DirectSlave - solution to add and remove zones on slave without DirectAdmin

3.5.1 released.

→ FIXED - DirectAdmin 1.69 compatibility for /CMD_API_DNS_ADMIN:

· Proper handling of action=delete when parameters are sent in POST body (form-urlencoded), not only in query string.
· Backward compatible with older DirectAdmin versions that send action/select0 in the URL.
· Added robust request parsing fallback for cases where DA omits Content-Type.

→ Improved rawsave handling:

· dns_write_post.sh added (see /scripts) · Zonefile content is taken directly from request body and passed to dns_write_post.sh.
· Prevents losing POST body after form parsing.
· Delete now supports multiple domains in a single request (select0..selectN).
· Domain deletion is idempotent in DNS-less/dev setups (no false failures when zone artifacts are missing).

Please update to 3.5.1

Also you can support my work and future development of DS
 
→ FIXED - DirectAdmin 1.69 compatibility for /CMD_API_DNS_ADMIN:
@roman_m Unfortunately it is not fixed.

I just tested with Directadmin 1.690 and could create a user with a testdomain.
Then I tested adding A and TXT record, which went fine.
Tested removing A record and change of TXT record. Also went fine.

As a last test I tested the removal of the user including the domain. There it went wrong.
Directadmin removed the user and domain from the server. But on the Directslave server, the domain was -not- deleted from the directslave.inc and also the domain .db file was not deleted.

Same as before, only error notice in the Directadmin error.log:
Code:
Cluster dsvps.server.nl: Error deleting remote dns zone (testdomein.nl): No action taken
Nothing to be seen in directslave logs.

Edit: Sorry my bad I was too enthousiastic. I overwritten everything and forgotten that I renamed the longer binary name to just directslave, so the older version was started again.

Works perfectly now!
 
Last edited:
@roman_m Unfortunately it is not fixed.

I just tested with Directadmin 1.690 and could create a user with a testdomain.
Then I tested adding A and TXT record, which went fine.
Tested removing A record and change of TXT record. Also went fine.

As a last test I tested the removal of the user including the domain. There it went wrong.
Directadmin removed the user and domain from the server. But on the Directslave server, the domain was -not- deleted from the directslave.inc and also the domain .db file was not deleted.

Same as before, only error notice in the Directadmin error.log:
Code:
Cluster dsvps.server.nl: Error deleting remote dns zone (testdomein.nl): No action taken
Nothing to be seen in directslave logs.
Enable debug in DS config, then restart directslave service and do some pipeline tests. Then email me error.log content.
 
Sorry, I will report back soon, seems 3.4.3 was still running.

Edit: Confirmed, 3.5.1. is working as a sunshine, perfectly!!
 
Last edited:
Yes. At least for domains with ipv6. Most likely making connections on ipv6 too, not tested yet.
If both servers are IPv6 compatible and have a dedicated IPv6 setup, then yes you can connect via IPv6. Simply use that IP address in the multiserver connection, provided DA have fixed it, which they hadn't up to version 1.691 (It broke when they updated something in 1.686)

You'd have to edit the /usr/local/directadmin/data/admin/cluster.conf file to add one at the moment.
 
Hi all!

I’m alive and relatively well. :)

Get ready -- I'm cooking up something amazing for you!:D:love:

DirectSlave 4, featuring an integrated secondary authoritative DNS server with DNSSEC and NSEC3 support, plus an extended dashboard and detailed statistics. 🔥

The release is almost here -- I'm now putting it through final testing in my production environment.

Scrn-20260920-1.png



Scrn-20260920-2.png
 
Last edited:
I’m alive and relatively well. :)

Get ready -- I'm cooking up something amazing for you!:D:love:
That's both great news! Nice to hear you're still alive and kicking.

Eager to see the new version, looks very good. I presume upgrading will not be easy too. Great work!
 
Thank you, Richard. I’m glad to see you too!

This is a major upgrade, so some migration will be required to take full advantage of it. I’ll prepare a detailed migration guide as part of the release.

DirectSlave 4 can still use an external ISC BIND server for compatibility. However, the main purpose of this release is to replace BIND with the new integrated authoritative DNS server, written in Go and built on the mature and widely used `miekg/dns` library. It includes DNSSEC and NSEC3 support, statistics, monitoring, and an extended dashboard.

Version 4 is also designed to make initial deployment on a clean system much simpler. Users who just need a reliable secondary authoritative DNS server no longer have to install, configure, and maintain BIND. DirectAdmin integration provides automatic zone provisioning, but DirectSlave is not limited to DirectAdmin: zones can also be added manually for use with any compatible authoritative primary DNS server.

The migration can be performed safely: the integrated server can first be started on a separate IP address, allowed to transfer and verify all zones, and only then switched to the production addresses on port 53.
 
on a separate IP address, allowed to transfer and verify all zones, and only then switched to the production addresses on port 53.
We don't only have 1 vps with no seperate ip so hopefully the migration can be also done inplace, or by removing current DS and installing the new one. A short outage time is no problem for us.
 
Hi @roman_m any progress on this? found you Github page and it looks its released?

EDIT: Just installed 4.0.18 version , looks great :)
Thank you
EDIT : WARNING: Name servers software versions are exposed:
  • 12.89.06.1: "DirectDNS/4.0.18"
Can we remove this ? (bind is not used here)
 
Last edited:
Hi @roman_m any progress on this? found you Github page and it looks its released?

EDIT: Just installed 4.0.18 version , looks great :)
Thank you
EDIT : WARNING: Name servers software versions are exposed:
  • 12.89.06.1: "DirectDNS/4.0.18"
Can we remove this ? (bind is not used here)

Thanks for trying it!

The version answer is the standard "version.bind" CHAOS query that BIND answers by default too, and on its own it is not a vulnerability. But I understand scanners flag it, so the next release gets an option for it, the same as BIND's "version" statement:

dns_version none

to refuse the query, or any text of your choice instead of the version.
 
Hi all!

DirectSlave 4 is released, and it is open source now.

What I was cooking is ready: DirectSlave 4, featuring an integrated secondary authoritative DNS server with DNSSEC and NSEC3 support, plus an extended dashboard and detailed statistics.

You no longer need BIND on the secondary. One static binary takes the Multi-Server API calls from DirectAdmin, transfers the zones from the primary and answers the DNS queries itself.

Source code, BSD 3-Clause license -- https://github.com/directslave/directslave

Downloads, version 4.0.18:

FreeBSD amd64 -- https://github.com/directslave/directslave/releases/tag/v4.0.18-freebsd
Linux amd64 -- https://github.com/directslave/directslave/releases/tag/v4.0.18-linux

View attachment 9910

View attachment 9911

What is new:
+ integrated authoritative secondary DNS: UDP and TCP, IPv4 and IPv6, AXFR, NOTIFY, SOA refresh/retry/expire timers
+ DNSSEC for signed zones, NSEC and NSEC3. DirectSlave does not sign anything, it serves exactly what your primary signed
+ startup check: after a restart every zone is compared with its primary by serial before it is answered
+ new dashboard: state, serial, records, DNSSEC, last transfer, next refresh, expiry and last error for every zone, with filters and sorting
+ statistics page with a breakdown per primary
+ zone management from the shell: --domain search / add / delete / reload, and --dump-db to look inside the running daemon
+ IDN zones in both Unicode and punycode form
+ optional query log (off / errors / all)
+ IPv6 everywhere: API, dashboard, zone transfers, NOTIFY, IPv6 primaries
+ --password asks for the password instead of taking it on the command line, so it no longer ends up in the shell history
+ Linux: systemd unit, AppArmor profile and SELinux policy included. FreeBSD: rc.d script

Upgrading from 3.x:
Your current directslave.conf works as it is. Without the new options version 4 behaves like 3.5 and keeps driving BIND through rndc, so you can replace the binary and the www folder first and switch later.

To switch to the integrated DNS server, stop BIND on the secondary and add to directslave.conf:

Code:
dns_server      integrated
dns_listen_ip4  *
dns_listen_ip6  *
dns_port        53

The zone list file (named_conf) stays the same, so the zones you already have are picked up and transferred.

Limitations:
- secondary only, it never acts as a primary and never signs zones
- zones are transferred with AXFR, no IXFR and no TSIG
- release binaries are amd64 only, for other platforms build from source

The integrated server has been running in my own production for over a month, close to 10,000 zones, and not a single zone was lost. Still, it is a .0 release of a DNS server: try it on one secondary first.

Do not forget to read INSTALL inside the archive. Full documentation -- https://github.com/directslave/directslave/tree/main/docs

Bug reports and questions are welcome here in the thread or in GitHub issues. Pull requests too ;-)
 
Back
Top