Slave2 DNS Server - Cluster Setup
If you need to have multiple DNS servers then you can have them connected to the slave dns manager.
Slave2 DNS Server requires that you have previously installed Slave DNS Server & Manager.
Please read more detailed info here.
Create configuration file: /root/dns_sync_slave2.conf
USERNAME="slave" SERVER="184.108.40.206" SSHPORT="22" SOURCESYNCLOCATION="/var/named/slave" CHECKMAINDNS="centos-webpanel.com" LOCALSYNCLOCATION="/var/named/slave" LOCALCONFFILE="/etc/named/slave_additional.conf"
* SERVER = IP of Slave DNS Server & Manager.
* SSHPORT = SSH-Port of Slave DNS Server & Manager.
* SOURCESYNCLOCATION = Location of DNS zone files on Slave DNS Server & Manager.
* CHECKMAINDNS = This is a domain used for testing Slave DNS Server & Manager, it can be any and it doesn't need to be on the server.
* LOCALSYNCLOCATION = Location for DNS zone files on this local server.
* LOCALCONFFILE = Configuration files which contains the list of all zone files on this local server.
Setup cron how often you want to check for changes
* On servers with many clients and domains 100+ we recommend 5min cron.
* For servers with 1000+ you can go even with every 1-2 minutes.
example every 1 minute
* * * * * sh /scripts/dns_sync_slave2
In file /etc/named.conf after last include add:
Prepare config files
touch /etc/named/slave_additional.conf chown named.named /etc/named/slave_additional.conf
go in cwp.admin -> Server Settings -> SSH Key Generator
there you need to generate new Keys
Go to Slave DNS Server & Manager
add key to the Slave DNS Server & Manager user you are using as "slave"
mkdir /home/slave/.ssh nano /home/slave/.ssh/authorized_keys
** paste your key here which you had generated on the Slave2 DNS Server
chown -R slave.slave /home/slave/.ssh chmod 600 /home/slave/.ssh/authorized_keys chmod 700 /home/slave/.ssh/
You will also need to enable bash shell for that user so rsync could work
chsh -s /bin/bash slave
You can now test ssh connection like this from Slave2 DNS Server to Slave DNS Server & Manager
ssh slave@SERVER-IP -p SSH-PORT
If your connection goes ok without asking for the password then you are fully set.