Active Development ยท GPLv3 + Commercial License

Authoritative DNS
Built in ๐Ÿฆ€ Rust

nx9-dns-server is a high-performance, fully RFC-compliant authoritative DNS server with built-in DNSSEC, async I/O via Tokio, SQLite storage, Docker support, and a full suite of diagnostic tools โ€” designed for production reliability from day one.

๐Ÿฆ€ Rust 2021 โšก Tokio Async ๐Ÿ—„๏ธ SQLite ๐Ÿณ Docker + Alpine ๐Ÿ” DNSSEC 83.5% Rust ยท 14.9% Shell
dns_server โ€” running
$ git clone https://github.com/thakares/nx9-dns-server Cloning into 'nx9-dns-server'... $ cargo build --release Compiling dns_server v0.1.0 Finished release [optimized] in 8.42s $ sqlite3 dns.db < dns_records.sql $ DNS_BIND="0.0.0.0:53" DNS_DB_PATH="dns.db" \ DNSSEC_KEY_FILE="Knx9.in.+008+24550.key" \ ./target/release/dns_server [INFO] bind="0.0.0.0:53" backend="SQLite" [INFO] dnssec=enabled cache_cleanup=5min [INFO] UDP socket bound ยท TCP socket bound [INFO] DNS server listening on 0.0.0.0:53 $ dig @localhost nx9.in A +dnssec ;; ANSWER SECTION: nx9.in. 3600 IN A 203.0.113.10 nx9.in. 3600 IN RRSIG A 8 2 3600 ... ;; Query time: 0 msec SERVER: 127.0.0.1 $ bash dnscheck.sh โœ… A record resolved to 203.0.113.10 โœ… RRSIG validation successful โœ… All tests passed!
10+
Record Types
UDP+TCP
Dual Protocol
DNSSEC
Built-in
~10k
QPS (modest HW)
5min
Cache Cleanup
29
Commits
GPLv3
+ Commercial
Core Features

Everything you need in an authoritative DNS server

Production-grade, RFC-compliant, memory-safe DNS server built with Rust and Tokio.

โšก
Async High Performance

Tokio async runtime for thousands of concurrent UDP/TCP queries with minimal latency and CPU overhead.

TokioAsync I/O
๐Ÿ”
DNSSEC Built-in

Automatic RRSIG signing, DNSKEY distribution, DS record support. Full RFC 4033โ€“4035 compliance, key loaded from env.

RSASHA256RFC 4034
๐Ÿ—„๏ธ
SQLite Backend

Simple, reliable file-based storage with efficient indexing, ACID transactions, and schema migration support via rusqlite.

rusqliteACID
๐Ÿฆ€
Memory Safe

Rust's ownership model eliminates buffer overflows, use-after-free, and null pointer bugs at compile time. Zero undefined behavior.

Rust 2021Zero UB
๐Ÿณ
Docker + Alpine

Multi-stage musl build targeting Alpine Linux. Pre-built Docker Compose config. Ports 53, 8080, 8081 exposed.

AlpinemuslDocker
โš™๏ธ
Systemd Native

Service unit included. Runs as dnsuser non-root, auto-restarts on failure, integrates with journald logging.

systemdProduction
๐Ÿ”ง
Diagnostic Suite

Bundled shell scripts: dnscheck.sh, dns_dump.sh, performance_test.sh, soa-update.sh, preprocess-key.sh and more.

Shelldig
๐Ÿ“ฆ
Package Builds

build-deb.sh and build-rpm.sh scripts for native Debian/Ubuntu .deb and CentOS/RHEL .rpm packages.

.deb.rpminstall.sh
Architecture

How it's built inside

A modular Rust architecture emphasizing performance, security, and maintainability. Core DNS engine + storage layer + optional DNSSEC + future Web UI / API.

DNS Client (dig / resolver)
โ†“ UDP / TCP :53
DNS Server Engine (Tokio)
โ†“ Packet parsing ยท Validation ยท Cache
Query Type?
DNSKEY/DS
Return Signed Records
Other
DB Lookup (rusqlite)
โ†“ Cache Miss
SQLite (dns_records)
โ†‘ Records
Authoritative Zone?
No โ†’ NXDOMAIN
Yes โ†“
DNSSEC Signer (RSASHA256)
โ†“ RRSIG + DNSKEY + DS
Response โ†’ Client
01
DNS Server Engine

Binds UDP + TCP :53. Parses packets, validates queries, manages DnsCache (thread-safe HashMap with TTL, cleaned every 5 minutes), orchestrates the full pipeline. Graceful SIGINT shutdown.

02
Storage Layer (rusqlite)

SQLite database with dns_records table. Efficient compound primary key (domain, record_type, value). WITHOUT ROWID for performance. ACID transactions.

03
DNSSEC Signer

Loads RSASHA256 keypair from DNSSEC_KEY_FILE. Generates RRSIG per record, emits DNSKEY automatically. Preprocessing via preprocess-key.sh. DS records for parent delegation.

04
ServerConfig + env_logger

All config via environment variables. Structured logging with env_logger. DnsError enum via thiserror for clean, typed error handling throughout.

05
Web UI + API + User Mgmt ๐Ÿšง Seeking Contributors

Planned Rocket/Axum backend. React/Svelte frontend. JWT auth. RBAC roles. Full REST API at /api/v1/zones. Webhooks for record changes.

Technology Stack

Crate / ToolRoleDetailStatus
tokioAsync RuntimeUDP/TCP async handlers + periodic tasksโœ… Core
rusqliteDatabaseSQLite binding for dns_records storageโœ… Core
log / env_loggerLoggingStructured runtime diagnosticsโœ… Core
thiserrorError TypesCustom DnsError enumโœ… Core
BIND dnssec-keygenKey GenerationRSASHA256 keypair for DNSSECโœ… External
Rocket / AxumWeb FrameworkUI and API endpoints๐Ÿšง Planned
JWTAuthToken-based auth + RBAC๐Ÿšง Planned
PrometheusMetricsMETRICS_ENABLE=true exposes :9100/metrics๐Ÿšง Planned
Algorithm & Flowchart

DNS query processing internals

RFC 1035 and RFC 4034 compliant query handling โ€” from socket receive to signed response. The actual algorithm nx9-dns-server implements.

๐ŸŸข Server Initialization

  1. Load configuration from environment variables
  2. Initialize the logging system (env_logger)
  3. Create SQLite connection and initialize schema
  4. Seed DnsCache with NS records
  5. Start periodic cache cleanup task (every 5 minutes)
  6. Bind and listen on UDP and TCP sockets

๐Ÿ”ต Query Handling

  1. Validate incoming DNS packet
  2. Parse header; extract domain name and query type
  3. If DNSKEY or DS โ†’ return signed records immediately
  4. Check DnsCache โ€” on hit, build and return response
  5. On cache miss โ†’ lookup in SQLite
  6. If found โ†’ respond and cache; if not โ†’ NXDOMAIN or forward to upstream
  7. Add DNSSEC RRSIG signatures if applicable
  8. Send response to the client

๐Ÿ”ด DNSSEC Signing

  1. Load DNSSEC key from DNSSEC_KEY_FILE
  2. For each relevant resource record set
  3. Generate RRSIG with RSA-SHA256
  4. Encode signature as Base64
  5. Calculate key tag and signature expiration
  6. Add RRSIG to the answer section
  7. Include DNSKEY in authority section if needed

โš™๏ธ Response Generation

  1. Construct response header (QR flag, response code)
  2. Set Authoritative Answer (AA) flag if authoritative
  3. Copy original question section
  4. Populate Answer section with resolved records
  5. Populate Authority section with NS and DS records
  6. Populate Additional section with glue records and DNSKEY

Key Internal Components

ComponentPurposeImplementationDetail
DnsCacheResponse CacheThread-safe HashMap with TTLCleaned every 5 minutes
ServerConfigConfigurationLoaded via env varsDNS_BIND, DNS_DB_PATH, etc.
DnsErrorError Handlingthiserror enumGraceful SIGINT shutdown
rusqliteRecord StorageSQLite database backendWITHOUT ROWID, compound PK
tokioAsync I/OUDP/TCP handlers + tasksPeriodic cache cleanup
DNSSECSecure SigningRSA-SHA256 + Base64RRSIG, DNSKEY, DS records
The full visual flowchart PNG is available in the repository at Flow-Chart.png and the algorithm is documented in Algorithm & Flowchart.md at the repository root.
Installation & Setup

Get running in minutes

Prerequisites: Rust stable toolchain, SQLite dev libraries. For DNSSEC: bind9-dnsutils. For containers: Docker.

1
Install Rust toolchain
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
2
Clone and build (release)
git clone https://github.com/thakares/nx9-dns-server.git
cd nx9-dns-server
cargo build --release
# Binary โ†’ target/release/dns_server
3
Initialise SQLite database
# From the SQL file at repo root
sqlite3 dns.db < dns_records.sql

# Or use the sample DB in conf/
cp conf/dns.db.sample dns.db
4
Run the server
DNS_BIND="0.0.0.0:53" \
DNS_DB_PATH="./dns.db" \
DNS_FORWARDERS="8.8.8.8:53,1.1.1.1:53" \
DNS_NS_RECORDS="ns1.yourdomain.tld.,ns2.yourdomain.tld." \
  ./target/release/dns_server
5
Verify with dnscheck.sh
bash dnscheck.sh
# or manually:
dig @localhost yourdomain.tld A
# Build the image (multi-stage, musl target, Alpine runtime)
git clone https://github.com/thakares/nx9-dns-server.git
cd nx9-dns-server
docker build -t nx9-dns-server:latest .

# Run with all volumes and environment variables
docker run -d --name nx9-dns \
  -p 53:53/udp -p 53:53/tcp \
  -p 8080:8080 -p 8081:8081 \
  -v /path/to/dns.db:/var/nx9-dns-server/dns.db \
  -v /path/to/keys:/etc/nx9-dns-server/keys \
  -e DNS_BIND=0.0.0.0:53 \
  -e DNS_DB_PATH=/var/nx9-dns-server/dns.db \
  -e DNSSEC_KEY_FILE=/etc/nx9-dns-server/keys/Kyourdomain.tld.key \
  -e DNS_FORWARDERS=8.8.8.8:53,1.1.1.1:53 \
  -e WEB_UI_BIND=0.0.0.0:8080 \
  -e API_BIND=0.0.0.0:8081 \
  -e AUTH_SECRET=your-secure-random-string \
  nx9-dns-server:latest
# docker-compose.yml (provided in repo)
version: '3.8'

services:
  dns:
    image: nx9-dns-server:latest
    container_name: nx9-dns
    ports:
      - "53:53/udp"
      - "53:53/tcp"
      - "8080:8080"
      - "8081:8081"
    volumes:
      - ./data/dns.db:/var/nx9-dns-server/dns.db
      - ./keys:/etc/nx9-dns-server/keys
      - ./logs:/var/log/nx9-dns-server
    environment:
      - DNS_BIND=0.0.0.0:53
      - DNS_DB_PATH=/var/nx9-dns-server/dns.db
      - DNSSEC_KEY_FILE=/etc/nx9-dns-server/keys/Kyourdomain.tld.key
      - DNS_FORWARDERS=8.8.8.8:53,1.1.1.1:53
      - DNS_NS_RECORDS=ns1.yourdomain.tld.,ns2.yourdomain.tld.
      - WEB_UI_BIND=0.0.0.0:8080
      - API_BIND=0.0.0.0:8081
    restart: unless-stopped

# Launch:
docker compose up -d --build
1
Install binary and service unit (dns_server.service at repo root)
sudo cp target/release/dns_server /usr/local/bin/
sudo cp dns_server.service /etc/systemd/system/
2
Full systemd unit file
[Unit]
Description=NX9 DNS Server
After=network.target

[Service]
Type=simple
User=dnsuser
Group=dns
WorkingDirectory=/var/nx9-dns-server
ExecStart=/usr/local/bin/dns_server
Restart=on-failure
RestartSec=5s
Environment="DNS_BIND=0.0.0.0:53"
Environment="DNS_DB_PATH=/var/nx9-dns-server/dns.db"
Environment="DNSSEC_KEY_FILE=/var/nx9-dns-server/Kyourdomain.tld.+008+24550.key"
Environment="DNS_FORWARDERS=8.8.8.8:53,1.1.1.1:53"
Environment="DNS_NS_RECORDS=ns1.yourdomain.tld.,ns2.yourdomain.tld."
Environment="LOG_FILE=/var/log/nx9-dns-server/server.log"
Environment="AUTH_SECRET=your-secure-random-string-here"

[Install]
WantedBy=multi-user.target
3
Enable and start
sudo systemctl daemon-reload
sudo systemctl enable --now dns-server.service
sudo systemctl status dns-server.service

Build native packages using the provided scripts in the repository root.

Debian / Ubuntu (.deb)

# build-deb.sh at repo root
bash build-deb.sh

# Or install directly
bash install.sh

CentOS / RHEL (.rpm)

# build-rpm.sh at repo root
bash build-rpm.sh

# Verify package
rpm -qi nx9-dns-server-*.rpm
Configuration Reference

Complete environment variable reference

All configuration is environment-variable driven โ€” no config files required. Works for bare-metal, systemd, Docker, and Kubernetes alike.

VariableDescriptionDefaultExample
DNS_BINDIP:port to bind DNS server0.0.0.0:53192.168.1.10:53
DNS_DB_PATHPath to SQLite database filedns.db/var/nx9-dns-server/dns.db
DNSSEC_KEY_FILEPath to DNSSEC public key fileโ€”/var/nx9/Kexample.+008+24550.key
DNS_FORWARDERSComma-separated upstream resolversโ€”8.8.8.8:53,1.1.1.1:53
DNS_NS_RECORDSComma-separated NS recordsrequiredns1.example.com.,ns2.example.com.
DNS_CACHE_TTLCache TTL in seconds36007200
WEB_UI_BINDWeb UI bind address127.0.0.1:80800.0.0.0:8080
API_BINDREST API bind address127.0.0.1:80810.0.0.0:8081
AUTH_SECRETJWT signing secretโ€”random-secure-string
ADMIN_PASSWORDInitial admin password (first-run only)โ€”strong-password
LOG_FILELog file pathโ€”/var/log/nx9/server.log
LOG_LEVELLogging verbosityinfodebug
WORKER_THREADSTokio worker threadscpu count16
DB_CACHE_SIZESQLite cache pagesโ€”50
MAX_UDP_SIZEMax UDP packet (useful for DNSSEC)40968192
MAX_TCP_CLIENTSConcurrent TCP connectionsโ€”250
METRICS_ENABLEExpose Prometheus :9100/metricsfalsetrue
Always bind WEB_UI_BIND and API_BIND to 127.0.0.1 in production unless external access is explicitly needed. Use a strong, randomly generated AUTH_SECRET.
DNS Record Management

Database schema & record operations

Records are stored in SQLite. Until the Web UI and API ship, manage them directly with SQL โ€” simple, scriptable, version-controllable.

Database Schema

-- dns_records.sql (at repository root)
CREATE TABLE IF NOT EXISTS dns_records (
  domain      TEXT    NOT NULL,
  record_type TEXT    NOT NULL,
  value       TEXT    NOT NULL,
  ttl         INTEGER DEFAULT 3600,
  PRIMARY KEY (domain, record_type, value)
) WITHOUT ROWID;

Sample Records

INSERT OR REPLACE INTO dns_records VALUES
('example.com', 'A',   '203.0.113.10',           3600),
('example.com', 'AAAA','2001:db8::1',            3600),
('example.com', 'MX',  '10 mail.example.com',    3600),
('example.com', 'MX',  '20 backup.example.com',  3600),
('example.com', 'NS',  'ns1.example.com',        86400),
('example.com', 'NS',  'ns2.example.com',        86400),
('example.com', 'SOA', 'ns1.example.com hostmaster.example.com 2024010101 10800 3600 604800 86400', 86400),
('example.com', 'TXT', '"v=spf1 a mx ~all"',     3600),
('www.example.com','A','203.0.113.10',           3600);

Supported Record Types

TypeDescriptionExample ValueDNSSECTTL Advice
AIPv4 address203.0.113.10โœ“ RRSIG3600s
AAAAIPv6 address2001:db8::1โœ“ RRSIG3600s
MXMail exchange (priority prefix)10 mail.example.comโœ“ RRSIG3600s
NSName server delegationns1.example.comโœ“ RRSIG86400s
SOAStart of Authority (required)ns1 hostmaster serial refresh retry expire minttlโœ“ RRSIG86400s
TXTArbitrary text (SPF, DKIM, verify)"v=spf1 a mx ~all"โœ“ RRSIG3600s
CNAMECanonical name aliasexample.comโœ“ RRSIG3600s
PTRReverse DNS (rDNS)example.comโœ“ RRSIG3600s
SRVService locator record0 5 443 target.example.comโœ“ RRSIG3600s
CAACA Authorization (TLS cert control)0 issue "letsencrypt.org"โœ“ RRSIG3600s
DNSKEYPublic key distributionAuto-generated from key fileโœ“ Chain root3600s
DSDelegation Signer (parent zone)Submit to registrarโœ“ Parent3600s

SQL Operations

-- Open the database
sqlite3 /var/nx9-dns-server/dns.db

-- View all records
SELECT * FROM dns_records;

-- Filter by domain
SELECT * FROM dns_records
WHERE domain = 'example.com';

-- Update a record
INSERT OR REPLACE INTO dns_records VALUES
('www.example.com', 'A', '203.0.113.11', 3600);

-- Delete a record
DELETE FROM dns_records
WHERE domain='old.example.com'
AND record_type='A';

SOA & Best Practices

DNSSEC

Cryptographically signed DNS

DNSSEC adds a verifiable chain of trust from root to your zone. nx9-dns-server handles signing automatically once a key is configured.

๐Ÿ”‘

Data Origin Auth

Verifies DNS data genuinely originates from the stated authoritative source โ€” not an attacker spoofing replies.

๐Ÿ”—

Integrity Protection

RRSIG signatures guarantee responses haven't been tampered with or manipulated in transit.

โŒ

Authenticated Denial

Cryptographically proves a requested record doesn't exist, preventing NXDOMAIN spoofing attacks.

Key Generation & Setup

# 1. Install key generation tool
sudo apt-get install bind9-dnsutils   # Debian/Ubuntu
sudo yum install bind-utils           # CentOS/RHEL

# 2. Generate 2048-bit RSASHA256 keypair
dnssec-keygen -a RSASHA256 -b 2048 \
  -n ZONE yourdomain.tld
# Produces: Kyourdomain.tld.+008+12345.key
#           Kyourdomain.tld.+008+12345.private

# 3. Install key and set env var
sudo cp Kyourdomain.tld.+008+12345.key \
  /var/nx9-dns-server/
export DNSSEC_KEY_FILE="/var/nx9-dns-server/Kyourdomain.tld.+008+12345.key"

# 4. (Optional) preprocess key format
sudo -u dnsuser /var/nx9-dns-server/preprocess-key.sh

# 5. Restart and verify
sudo systemctl restart dns-server
dig @localhost yourdomain.tld A +dnssec

Verify & Submit DS to Registrar

Keep *.private key files secure and never expose them. Only the *.key (public) file is needed by the server. For high-security deployments, consider hardware security modules (HSMs).
Deployment

Production deployment scripts

The repo ships a comprehensive set of shell scripts covering the full deployment lifecycle โ€” build, install, update, SOA management, and health checks.

deploy.sh
Full automated deployment: permissions, key preprocessing, SOA update, binary replacement, daemon-reload, and service restart.
bash deploy.sh
deploy-dns-server.sh
Dedicated DNS server deployment script โ€” handles service stop, binary copy, chown, daemon-reload, and status check.
bash deploy-dns-server.sh
soa-update.sh
Automatically increments the SOA serial number in the SQLite database after DNS record changes. Run as dnsuser.
sudo -u dnsuser /var/nx9-dns-server/soa-update.sh
preprocess-key.sh
Normalises DNSSEC key file format and permissions before server load. Outputs processed.key in the deployment directory.
sudo -u dnsuser /var/nx9-dns-server/preprocess-key.sh
dns_wrapper.sh
Wrapper script for starting the DNS server with environment variable injection and logging setup.
bash dns_wrapper.sh
start.sh
Convenience startup script โ€” sets required environment variables and launches the binary directly.
bash start.sh
Firewall ports: Open UDP :53 and TCP :53 for DNS. TCP :8080 for Web UI (when available). TCP :8081 for API (when available). TCP :9100 for Prometheus metrics (when METRICS_ENABLE=true). Always restrict :8080/:8081 to localhost unless reverse-proxied with TLS.
Testing & Diagnostics

Built-in tools and performance benchmarks

A full suite of diagnostic scripts ships with the repository. Real-world benchmarks from the wiki: 3,256 QPS for A records, 1,845 QPS for DNSSEC-signed responses.

3,256QPS
A record queries
1,845QPS
DNSSEC-signed queries
2,103QPS
Mixed record types
1,024QPS
TCP queries

Benchmarks from performance_test.sh ยท 5,000 queries on modest 2-core test server. Production hardware (4+ cores, 2GB RAM) reaches 20,000โ€“40,000 QPS.

dnscheck.sh
Comprehensive DNS verification โ€” tests all record types plus DNSSEC. Can target a custom server IP and domain.
bash dnscheck.sh
bash dnscheck.sh 192.168.1.10
bash dnscheck.sh 192.168.1.10 example.com

โœ… A record: 203.0.113.10
โœ… AAAA record: 2001:db8::1
โœ… MX: 10 mail.example.com.
โœ… RRSIG validation successful
โœ… All tests passed!
dns_dump.sh
Dumps all DNS records for a given domain in dig format. Save to file for auditing or zone migration.
bash dns_dump.sh example.com
bash dns_dump.sh example.com 192.168.1.10
bash dns_dump.sh example.com > zone_backup.txt
Manual dig Tests
Direct dig commands for targeted record verification, DNSSEC chain tracing, and TCP fallback testing.
dig @localhost example.com A
dig @localhost example.com MX
dig @localhost example.com DNSKEY +dnssec
dig @localhost example.com A +dnssec +trace
dig @localhost example.com A +tcp
Logs & Debug
View systemd journal or file logs. Enable debug verbosity for deep troubleshooting. Docker logs follow mode.
sudo journalctl -u dns-server.service
sudo tail -f /var/log/nx9-dns-server/server.log
docker logs -f nx9-dns

# Enable debug logging
sudo systemctl set-environment LOG_LEVEL=debug
sudo systemctl restart dns-server

Common Issues & Fixes

SymptomCommon CauseFix
SERVFAILDB permissions, bad DNSSEC key, wrong record formatCheck logs with journalctl
No responseFirewall blocking :53, wrong bind addressnetstat -tulpn | grep 53
DNSSEC failKey path wrong, DS not submitted to registrarRe-run dnscheck.sh with +trace
DB errorWrong file permissions, corrupt schemasqlite3 dns.db .schema
API unreachableService not enabled, wrong bind, firewallcurl http://localhost:8081/api/v1/health

Health Checks & Monitoring

# DNS health one-liner
dig @192.168.1.10 example.com A +short \
  | grep -q "^[0-9]" && echo "DNS OK" || echo "FAILED"

# API health
curl -s http://localhost:8081/api/v1/health \
  | grep -q "ok" && echo "API OK"

# Prometheus scrape config
scrape_configs:
  - job_name: 'nx9-dns-server'
    scrape_interval: 15s
    static_configs:
      - targets: ['192.168.1.10:9100']

# Import Grafana dashboard
# Dashboard JSON: tools/grafana/nx9-dns-dashboard.json
API Reference ๐Ÿšง In Development

Planned RESTful API endpoints

Full CRUD for zones and records, batch operations, JWT authentication, rate limiting, and webhook notifications โ€” the complete planned API surface.

# Zone management
GET    /api/v1/zones                        # List all zones
POST   /api/v1/zones                        # Create new zone
GET    /api/v1/zones/{zone}                 # Zone details
PUT    /api/v1/zones/{zone}                 # Update zone properties
DELETE /api/v1/zones/{zone}                 # Remove zone

# Record management
GET    /api/v1/zones/{zone}/records          # List all records
POST   /api/v1/zones/{zone}/records          # Create record
GET    /api/v1/zones/{zone}/records/{id}     # Get record
PUT    /api/v1/zones/{zone}/records/{id}     # Update record
DELETE /api/v1/zones/{zone}/records/{id}     # Delete record

# Batch operations
POST   /api/v1/zones/{zone}/records/batch    # Bulk create/update/delete

# Auth: Bearer JWT token
# Rate limiting: per-token, configurable

Proposed Tech Stack (Contributors Welcome)

โš™๏ธ
Backend

Rust with Rocket or Axum. JWT-based auth with scoped API tokens. Rate limiting and API versioning.

AxumRocketJWT
๐Ÿ–ฅ๏ธ
Frontend

TypeScript with React or Svelte. Dashboard, record editor, DNSSEC key management, audit log timeline.

ReactSvelteTypeScript
๐Ÿ”’
Auth System

Local accounts + optional OAuth/LDAP. RBAC roles. 2FA. Password policies. API token management.

RBAC2FALDAP

User Roles (Proposed)

๐Ÿ‘‘
Administrator
Full system access โ€” all zones, users, system settings
๐Ÿ”ง
Operator
Manage DNS records, view logs โ€” no system settings
๐Ÿ‘๏ธ
Viewer
Read-only access to records and statistics
๐Ÿ”Œ
API Client
Programmatic access via scoped API tokens
Roadmap

What's implemented & what's coming

Core DNS engine + DNSSEC are production-ready. Web UI, REST API, and clustering are actively being designed and are open for contributors.

Completed ยท Core Engine
Production Ready
  • โœ“ UDP + TCP dual-protocol server
  • โœ“ SQLite DNS record storage
  • โœ“ A, AAAA, MX, NS, SOA, PTR, TXT, CNAME, SRV, CAA
  • โœ“ DNSSEC: RRSIG, DNSKEY, DS signing
  • โœ“ DnsCache with TTL + 5-min cleanup
  • โœ“ SIGINT graceful shutdown
  • โœ“ Docker Alpine + docker-compose.yml
  • โœ“ Systemd service unit (dns_server.service)
  • โœ“ dnscheck / dns_dump / soa-update scripts
  • โœ“ .deb and .rpm packaging scripts
Near-term ยท 1โ€“3 months
Management Layer
  • โŸณ Web UI dashboard & record editor
  • โŸณ RESTful API (/api/v1/zones)
  • โŸณ JWT auth + RBAC user roles
  • โ—‹ Multi-arch Docker (amd64, arm64)
  • โ—‹ Prometheus metrics endpoint
  • โ—‹ Rate limiting & API versioning
  • โ—‹ Audit logging of user actions
  • โ—‹ 2FA support
  • โ—‹ Automated test suite (api_test.sh)
  • โ—‹ Grafana dashboard template
Long-term ยท 2026+
Scale & Protocols
  • โ—‹ Cluster replication + HA failover
  • โ—‹ AXFR / IXFR zone transfers
  • โ—‹ RFC 2136 dynamic DNS updates
  • โ—‹ DNSSEC key rotation automation
  • โ—‹ NSEC3 for better privacy
  • โ—‹ DNS over HTTPS (DoH) RFC 8484
  • โ—‹ DNS over TLS (DoT) RFC 7858
  • โ—‹ Geo-based response routing
  • โ—‹ Kubernetes Helm charts
  • โ—‹ Record templating system
Contributing

We're actively seeking contributors

Core DNS and DNSSEC are solid. The Web UI, API, and User Management are wide open โ€” bring your Rust, TypeScript, or documentation skills.

Priority Areas

HOT
Web UI Development

Frontend components (React/Svelte), API integration, responsive design, DNSSEC key management UI, audit log timeline.

HOT
REST API Implementation

Rocket or Axum backend, /api/v1/zones endpoints, JWT auth, rate limiting, batch operations, webhooks.

OPEN
User Management System

Authentication, RBAC roles, 2FA, audit logging, password policies, API token management, optional OAuth/LDAP.

OPEN
Testing & CI

Unit tests, integration tests, automated CI pipelines, GitHub Actions, performance benchmarking.

OPEN
Documentation

Improve wiki pages, add examples, contribute to CONTRIBUTING.md and CODE_OF_CONDUCT.md.

How to Contribute

Open an issue before submitting a PR for Web UI, API, or User Management โ€” discuss your implementation approach first to align with the project direction.

Licensing

This project is dual-licensed. The open-source edition is released under GNU GPLv3. A commercial license (COMMERCIAL-LICENSE.md) is also available for organisations that need to embed nx9-dns-server in proprietary products.

GPLv3Commercial
FAQ

Frequently asked questions

What is nx9-dns-server and who maintains it? โ–ผ
nx9-dns-server is a high-performance, fully RFC-compliant authoritative DNS server implemented in Rust, leveraging Tokio async I/O and SQLite for DNS record storage. It is developed and maintained by Sunil Purushottam Thakare (sunil@thakares.com, GitHub: @thakares) with support from community contributors.
What makes nx9-dns-server different from BIND or PowerDNS? โ–ผ
Key differentiators: built in Rust (memory safety, no runtime crashes), focused purely on authoritative DNS (no feature bloat), simple SQLite backend (easy backup, migration, scripting), a minimal footprint (10MB disk, 256MB RAM minimum), and an upcoming clean Web UI + REST API. It is not a recursive resolver.
What are the system requirements? โ–ผ
Minimum: 1 CPU core, 256 MB RAM, 10 MB disk, Linux (Debian, Ubuntu, CentOS, Alpine) or macOS, Rust 1.60+. Recommended for production: 2+ cores, 1 GB RAM, SSD storage, Rust 1.72+. Windows users should use Docker or WSL.
How many queries per second can it handle? โ–ผ
On modest 2-core hardware: ~3,256 QPS for A record queries, ~1,845 QPS for DNSSEC-signed responses. On better hardware (4+ cores, 2 GB RAM): 20,000โ€“40,000 QPS. DNSSEC responses perform at about 60โ€“70% of unsigned response throughput due to signing overhead.
Which record types are supported? โ–ผ
A, AAAA, MX, NS, SOA, PTR, TXT, CNAME, SRV, CAA โ€” plus DNSSEC records: DNSKEY, RRSIG, and DS. All standard record types have DNSSEC signing support.
Is DNSSEC required? Can I run without it? โ–ผ
DNSSEC is entirely optional. If DNSSEC_KEY_FILE is not set, the server runs unsigned โ€” completely valid for development, internal networks, or zones where DNSSEC isn't needed. DNSSEC is recommended for internet-facing production zones.
Can nx9-dns-server act as a recursive resolver? โ–ผ
No. nx9-dns-server is an authoritative-only DNS server. It does not perform recursive resolution. For non-authoritative queries, configure DNS_FORWARDERS to proxy them upstream (e.g. to 8.8.8.8 or 1.1.1.1). For a recursive resolver, use Unbound or PowerDNS Recursor.
How do I manage DNS records? โ–ผ
Currently via SQL directly against the SQLite database (sqlite3 /var/nx9-dns-server/dns.db). Use INSERT OR REPLACE INTO dns_records VALUES (...); to add/update records, and always run soa-update.sh afterward to increment the SOA serial. A Web UI and REST API are in development.
How do I back up my DNS configuration? โ–ผ
Simply copy the SQLite database file: cp /var/nx9-dns-server/dns.db backup/dns.db.bak. Also back up your DNSSEC *.key and *.private files, and your environment variable configuration (systemd unit or docker-compose.yml).
What ports need to be open? โ–ผ
UDP :53 and TCP :53 for DNS (required). TCP :8080 for Web UI (when available). TCP :8081 for REST API (when available). TCP :9100 for Prometheus metrics (when METRICS_ENABLE=true). Keep :8080/:8081 bound to localhost unless reverse-proxied with TLS.
Is clustering / high availability supported? โ–ผ
Not yet โ€” clustering is on the roadmap for 2026. Currently, high availability can be achieved by running multiple independent instances behind a load balancer or via primary/secondary DNS delegation through your registrar.
What are the licensing options? โ–ผ
nx9-dns-server is released under GNU GPLv3 (see LICENSE in the repository). A separate commercial license is also available (see COMMERCIAL-LICENSE.md) for organisations that need to embed or redistribute the server in proprietary products without GPLv3 obligations.

Deploy your own authoritative DNS today

Self-hosted ยท RFC-compliant ยท DNSSEC-secured ยท Built with ๐Ÿฆ€ Rust
45 GitHub stars ยท 3 forks ยท 29 commits ยท Active development