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:
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 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.