SmartDNS Banner # 🚀 SmartDNS Optimized ## High-Performance Recursive DNS Platform Powered by Unbound and dnsdist ## Platform DNS Rekursif Kinerja Tinggi Ditenagai oleh Unbound dan dnsdist Developed and maintained by **MyNOC.ID** & **ALSYUNDAWY IT SOLUTION** --- [![Version](https://img.shields.io/badge/version-1.0.0-brightgreen.svg)](https://github.com/alsyundawy/SmartDNS/releases) ![Ubuntu](https://img.shields.io/badge/Ubuntu-22.04__24.04__26.04-E95420?logo=ubuntu) ![Debian](https://img.shields.io/badge/Debian-11__12__13-A81D33?logo=debian) ![Bash](https://img.shields.io/badge/bash-%3E%3D4.0-41bf24.svg?logo=gnu-bash) [![Latest Release](https://img.shields.io/github/v/release/alsyundawy/SmartDNS)](https://github.com/alsyundawy/SmartDNS/releases) [![Maintenance Status](https://img.shields.io/maintenance/yes/9999)](https://github.com/alsyundawy/SmartDNS/) [![License](https://img.shields.io/github/license/alsyundawy/SmartDNS)](https://github.com/alsyundawy/SmartDNS/blob/master/LICENSE) [![GitHub Issues](https://img.shields.io/github/issues/alsyundawy/SmartDNS)](https://github.com/alsyundawy/SmartDNS/issues) [![GitHub Pull Requests](https://img.shields.io/github/issues-pr/alsyundawy/SmartDNS)](https://github.com/alsyundawy/SmartDNS/pulls) [![Donate with PayPal](https://img.shields.io/badge/PayPal-donate-orange)](https://www.paypal.me/alsyundawy) [![Donate with Ko-fi](https://img.shields.io/badge/Ko--fi-donate-ff5e5b?logo=ko-fi&logoColor=white)](https://ko-fi.com/alsyundawy) [![Sponsor with GitHub](https://img.shields.io/badge/GitHub-sponsor-orange)](https://github.com/sponsors/alsyundawy) [![GitHub Forks](https://img.shields.io/github/forks/alsyundawy/SmartDNS?style=social)](https://github.com/alsyundawy/SmartDNS/network/members) [![GitHub Contributors](https://img.shields.io/github/contributors/alsyundawy/SmartDNS?style=social)](https://github.com/alsyundawy/SmartDNS/graphs/contributors) --- ### 🌎 Language / Bahasa [English Documentation](#-english-documentation) • [Dokumentasi Bahasa Indonesia](#-dokumentasi-bahasa-indonesia)

🇺🇸 English Documentation

📝 About

SmartDNS is an automated, enterprise-grade DNS Resolver Platform designed for ISPs, Enterprises, VPS providers, and Self-Hosted environments.

By integrating Unbound and dnsdist, SmartDNS automatically:

  1. Detects system hardware capabilities.
  2. Calculates and configures optimized kernel and daemon parameters.
  3. Deploys a secure, recursive DNS resolver backend.
  4. Sets up a high-performance frontend load balancer with advanced blocklists.

Starting from v1.0.0, SmartDNS includes automated heartbeat health monitoring and secure telemetry reporting to simplify multi-node fleet management.


🎨 System Architecture

This diagram illustrates how queries flow through the platform:

flowchart TD
    Client["💻 Client (Query)"] --> DNSDist["⚖️ dnsdist (Frontend Load Balancer: Port 53)"]
    DNSDist --> CDB{"🔍 Check Domain in CDB Blocklist"}
    CDB -- "Blocked (A / AAAA)" --> Spoof["🛡️ Spoof Response (IPv4/IPv6 Spoofed IP)"] --> Client
    CDB -- "Clean (Allowed)" --> Whitelist{"🔍 Check Whitelist"}
    Whitelist -- "Yes" --> Unbound["⚙️ Unbound (Recursive Backend: Port 5300)"]
    Whitelist -- "No" --> Unbound
    Unbound --> Resolver{"🌐 Resolve recursively via DNSSEC"}
    Resolver --> Root["🌍 Root/TLD/Auth Nameservers"]
    Root --> Resolver
    Resolver --> Unbound
    Unbound --> DNSDist
    DNSDist --> Client

⚡ Features

Smart Installer

Telemetry & Maintenance


📋 System Requirements

Component Minimum Specification Recommended Specification
CPU 2 Cores 4 Cores or Higher
RAM 2 GB 4 GB or Higher
Storage 10 GB SSD 15 GB SSD or Higher
Network Public IPv4 IPv4 + IPv6 Dual-Stack
OS Ubuntu 22.04 LTS / Debian 12 Ubuntu 22.04, 24.04, 26.04 / Debian 11, 12, 13
Privileges Root / sudo Root / sudo

🚀 Installation & Update

Fresh Installation

git clone https://github.com/alsyundawy/SmartDNS.git
cd SmartDNS
bash install.sh

Upgrading an Existing Installation

Upgrades are completely non-destructive and retain: UUID, configuration parameters, telemetry files, and custom scheduler tasks.

cd SmartDNS
git pull
bash install.sh

🇮🇩 Dokumentasi Bahasa Indonesia

📝 Tentang

SmartDNS adalah Platform DNS Resolver otomatis kelas enterprise yang dirancang untuk lingkungan ISP, Enterprise, VPS, dan Self-Hosted.

Melalui integrasi Unbound dan dnsdist, SmartDNS secara otomatis:

  1. Mendeteksi kapasitas perangkat keras sistem secara real-time.
  2. Menghitung dan mengonfigurasi parameter kernel dan daemon yang optimal.
  3. Menyebarkan backend resolver rekursif yang tangguh dan aman.
  4. Memasang load balancer frontend berkinerja tinggi lengkap dengan fitur blocklist lanjutan.

Mulai dari versi v1.0.0, SmartDNS menyertakan pemantauan detak jantung (heartbeat) otomatis dan laporan telemetri yang aman guna menyederhanakan pengelolaan server multi-node.


🎨 Arsitektur Sistem

Diagram berikut menunjukkan bagaimana kueri DNS diproses oleh platform:

flowchart TD
    Client["💻 Client (Kueri)"] --> DNSDist["⚖️ dnsdist (Frontend Load Balancer: Port 53)"]
    DNSDist --> CDB{"🔍 Cek Domain di Blocklist CDB"}
    CDB -- "Terblokir (A / AAAA)" --> Spoof["🛡️ Spoof Respon (IP Palsu IPv4/IPv6)"] --> Client
    CDB -- "Aman (Diizinkan)" --> Whitelist{"🔍 Cek Whitelist"}
    Whitelist -- "Ya" --> Unbound["⚙️ Unbound (Recursive Backend: Port 5300)"]
    Whitelist -- "Tidak" --> Unbound
    Unbound --> Resolver{"🌐 Resolusi Rekursif via DNSSEC"}
    Resolver --> Root["🌍 Root/TLD/Auth Nameservers"]
    Root --> Resolver
    Resolver --> Unbound
    Unbound --> DNSDist
    DNSDist --> Client

⚡ Fitur Utama

Smart Installer (Pemasang Pintar)

Telemetri & Pemeliharaan


📋 Persyaratan Sistem

Komponen Spesifikasi Minimum Spesifikasi Rekomendasi
CPU 2 Core 4 Core atau Lebih Tinggi
RAM 2 GB 4 GB atau Lebih Tinggi
Penyimpanan 10 GB SSD 15 GB SSD atau Lebih Tinggi
Jaringan IP Publik IPv4 Dual-Stack IPv4 + IPv6
OS Ubuntu 22.04 LTS / Debian 12 Ubuntu 22.04, 24.04, 26.04 / Debian 11, 12, 13
Akses Akses root / sudo Akses root / sudo

🚀 Pemasangan & Pembaruan

Pemasangan Baru

git clone https://github.com/alsyundawy/SmartDNS.git
cd SmartDNS
bash install.sh

Memperbarui Sistem yang Ada

Proses pembaruan tidak akan merusak konfigurasi berjalan dan tetap mempertahankan: UUID node, parameter kustom, file telemetri, serta tugas penjadwalan cron.

cd SmartDNS
git pull
bash install.sh

⚙️ Service Ports / Port Layanan

Service / Layanan Port Description / Deskripsi
DNS Resolver (dnsdist) 53 Main Frontend / Port Utama
Recursive Resolver (Unbound) 5300 Local Recursion Backend / Backend Lokal
DNSDist Web UI 8083 Statistics & Console Web UI / UI Statistik & Konsol

📂 Project Structure / Struktur Proyek

SmartDNS/
├── cache/         # Temporarily saved environment state / Penyimpan status sementara
├── data/          # Databases & blocklist script / Basis data & skrip blocklist
├── docs/          # Documentation assets / Dokumen dan gambar pendukung
├── engine/        # Tuning & core configuration engines / Mesin utama konfigurasi & tuning
├── lib/           # Helper libraries / Pustaka pembantu sistem
├── output/        # Generated configuration outputs / Hasil file konfigurasi yang di-generate
├── scripts/       # Background scripts (heartbeat) / Skrip latar belakang
├── templates/     # Configuration templates / Templat konfigurasi dasar
├── VERSION        # Release version / Versi rilis
├── install.sh     # Installation entrypoint / Berkas utama instalasi
└── README.md      # Documentation / Dokumentasi ini

🔧 Useful Commands / Perintah Berguna

Restart Services / Menjalankan Ulang Layanan

systemctl restart unbound
systemctl restart dnsdist

Check Service Status / Memeriksa Status Layanan

systemctl status unbound
systemctl status dnsdist

Perform DNS Lookups / Pengujian Resolusi DNS

dig @127.0.0.1 google.com
dig @::1 google.com

Validate Config / Validasi Konfigurasi

unbound-checkconf
dnsdist --check-config

Trigger Heartbeat / Menjalankan Heartbeat Manual

/usr/local/bin/smartdns-heartbeat

Inspect Configuration Environments / Memeriksa Konfigurasi Lingkungan

cat /var/lib/smartdns/install.json
cat /var/lib/smartdns/install.env
cat cache/secret.env

View Schedulers / Memeriksa Jadwal Cron

cat /etc/cron.d/smartdns
cat /etc/cron.d/smartdns-heartbeat

📡 Telemetry / Telemetri

SmartDNS sends secure heartbeat payloads every 5 minutes to help keep track of node versions and system health.

Data collected / Data yang dikumpulkan:

[!NOTE] SmartDNS does not collect DNS query histories, user traffic packets, resolver cache entries, or any sensitive personal information.


📌 Attribution & Credits / Atribusi & Kredit

👤 Original Creator / Pembuat Asli

⚡ Optimized & Refined By / Dioptimalkan & Disempurnakan Oleh


📄 License & Disclaimer / Lisensi & Penyangkalan

Presented by MyNOC.ID ALSYUNDAWY IT SOLUTION - MIT License.

Disclaimer: Proyek ini ditujukan untuk lingkungan edukasi, lab, enterprise, ISP, dan DNS self-hosted. Harap uji seluruh konfigurasi sebelum melakukan deploy di lingkungan produksi.


### ⭐ If SmartDNS helps your infrastructure, please consider giving this repository a Star ### ⭐ Jika SmartDNS membantu infrastruktur Anda, silakan berikan Star untuk repositori ini Made with ❤️ in Indonesia by **MyNOC.ID** & **ALSYUNDAWY IT SOLUTION**