• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

HOWTO: Plesk DNS Replication to external Servers

N

Nikos Ioakeim

Guest
Hi,
i just want to share this info with you, cause i didnt find anything else similar searching.

I you have a plesk server with your client on and you want to use instead external dns servers you could you the following script to make this happen. Just follow this instructions:

1. Setup an basic system. I use openvz and centos templates.
2. Then install the bind-chroot package using yum (yum install bind-chroot)
3. Create an ssh rsa key as root on the plesk server using ssh-keygen -t rsa -b 2048, without a pass phrase and copy the contents of /root/.ssh/id_rsa.pub to the dns server under /root/.ssh/authorized_keys
4.Put the following script anywhere you like, make it executable and put it on cron in order to run every interval you like

The Script:

#!/bin/bash
remoteips="xxx.xxx.xxx.xxx" #The Ips of the name servers you want to replicate

for ip in $remoteips; do
rsync -avzrop --delete /var/named/run-root/etc/ root@$ip:/var/named/chroot/etc/
rsync -avzrop --delete /var/named/run-root/var/ root@$ip:/var/named/chroot/var/
done

for ip in $remoteips; do
ssh root@$ip 'service named reload'
done

Now every time your client changes his dns records in the specified time interval you used on cron, the plesk server will update all the records changed or deleted on the external name servers.

I hope this will help some of you. Of course i am looking forward from you to contribute improvements and comments.
 
I'm using the good old AXFR method with external DNS, I only use rsync to transfer the zone list. This way changes are replicated inmediately and using the native transfer protocol.
 
I think that this script this is all that it does. The delete command is added when the receiving side for rsync does have more zones than the transmitting one. On any other case only the changes are transfered to the remote dns servers.

I am sorry but i haven't seen .
 
Back
Top