Slave DNS Server & Manager download version - installation instructions
Please read more detailed info here.

Latest Update: March 7, 2021

For Slave DNS Manager is recommended that you have a clean server with CWP which will be used as Slave DNS (ns2).

Create a New Account on the CWPpro Server
* This is the server you plan to use as Slave DNS Server & Manager
username: recommended is slave (as it will be used in the tutorial)
domain: domain which you plan to use for slave dns manager gui and API access

Download Slave DNS Manage and upload it to public_html folder on your cwp account
Latest update: July 20, 2019. (manual update required by overwriting files)

cd /home/USERNAME/public_html
wget http://dl1.centos-webpanel.com/files/cwp/addons/cwp-slave_dns.zip
unzip cwp-slave_dns.zip
mv slave_dns/* .
rm -f index.html

Fix file permissions (you can do that also from cwp)

chown -R USERNAME.USERNAME /home/USERNAME/public_html/*

MySQL: Create User and Database
Go to CWP module: MySQL Manager --> Create Database and User

Edit file /home/USERNAME/public_html/inc/db_conn.php.sample and enter your database connection details
Rename sample file to get DB connection into production

mv inc/db_conn.php.sample inc/db_conn.php

Import database by using PhpMyAdmin or with MySQL command

mysql DATABASENAME < sql/slave_dns.sql

Create permissions for the user to be able to control the bind DNS.
Replace USERNAME with the user of the account you had created in cwp

FILENAME: /etc/sudoers.d/USERNAME

%USERNAME  ALL= NOPASSWD: /bin/systemctl start named
%USERNAME  ALL= NOPASSWD: /bin/systemctl stop named
%USERNAME  ALL= NOPASSWD: /bin/systemctl restart named
%USERNAME  ALL= NOPASSWD: /bin/systemctl reload named
%USERNAME  ALL= NOPASSWD: /bin/systemctl status named
%USERNAME  ALL= NOPASSWD: /bin/systemctl is-active named
touch /etc/named/slave.conf
chmod 771 /etc/named
usermod -a -G named USERNAME
chown USERNAME.named /etc/named/slave.conf

mkdir /var/named/slave
chown named.named /var/named/slave

Edit File: /etc/named.conf and add this in options section before closing }

masterfile-format text;

Add after options{} where other include lines are specifed

//Slave dns configuration
include "/etc/named/slave.conf";

Now you can login to DNS Manager GUI by using a domain link of the account you have created

Default login for DNS Manager GUI admin/root
Username: root
Password: FX8QKxvQ
* Please change the default password after the first login

Adding WebServers to DNS
- On dns manager GUI create a new user for each server or use a single for all webservers if you plan to transfer accounts from one to another webserver.
- On CWP WebServer go to DNS Functions -> Slave DNS Manager

For Slave Host you need to use the same URL you are accessing DNS Manager GUI, example

http://slave-dns.manager.domain.com

* You can also add this as an addon domain to the account later.

CWPpro WebServer configuration

Edit File: /etc/named.conf and add this in options section before closing }

//Slave dns configuration
allow-transfer {111.112.113.114;};
allow-recursion {111.112.113.114;};
also-notify {111.112.113.114;};
masterfile-format text;

Mostly know issues
issue: domain/zone not deleted from /etc/named/slave.conf
apache logs file: /usr/local/apache/domlogs/DOMAIN.error.log
apache logs line: sed: couldn't open temporary file /etc/named/sedzizIXw: Permission denied
solution: chmod 771 /etc/named

issue: Slave BIND/DNS not showing changes
solution: try to restart named and check if the service has some errors in the /var/log/messages