CentOS Web Panel is deployed in here.
Create configuration file: /root/dns_sync_slave2.conf
USERNAME="slave" SERVER="22.214.171.124" SSHPORT="22" SOURCESYNCLOCATION="/var/named/slave" CHECKMAINDNS="centos-webpanel.com" LOCALSYNCLOCATION="/var/named/slave" LOCALCONFFILE="/etc/named/slave_additional.conf"
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.