DNS Sync with external NS

AxlF

Verified User
Joined
Dec 14, 2007
Messages
98
Hey,

I would like to sync local DNS entries to 3rd Party NS. The 3rd Party NS isn't running DA.

How could I achieve this?

Best wishes
 
You can do this with some easy scripting.

Create dns_create_post.sh, dns_delete_post.sh and dns_write_post.sh scripts within the folder /usr/local/directadmin/scripts/custom/.
Code example for /usr/local/directadmin/scripts/custom/dns_create_post.sh
echo "DNS create triggered $DOMAIN" >> /var/log/directadmin/actions.log
python anyscript.py 'DNScreate' $domain

What I do in anyscript.py is:

DNSupdate -> Will read the content from /var/named.domain.db, base64 encode this and pushing this over an rabbitmq connection to the other server.
DNScreate -> This will add a new line in /etc/named.conf referring to the new .db file.
DNSdelete -> will remove the line from /etc/named.conf

Only other thing that you need to do is create a script that listens to the rabbitmq and will keep the configs up to date and reloads DNS afterwards.
If you can connect to the 3rd party DNS over API, you can always write a script that translates local configuration to API calls.
 
Then go the way suggested by Cyberdevil and write your own scripts (using POST/PRE scripts of Directadmin) or hire somebody to write them for you.
 
My python/perl/shell scripting is very limited...
Would it be possible to write the scripts in PHP?
 
Yes, PHP is possible. You can use any program language available on your server.
 
Back
Top