[BlueOnyx:07248] Re: DNS Script ?

Jeff Folk jfolk at qzoneinc.com
Sat May 7 06:37:30 -05 2011


On May 6, 2011, at 10:20 PM, Dan Porter wrote:
> 
> We have two BX boxes, one is running as the primary DNS and the other is running as the secondary DNS.   I am looking for a script or an easy way to convert/send all of the information from the primary DNS over to the secondary, so that we do not have to go into the GUI and setup entries on both boxes.  
> 
> Basically, I would like to automate the task of setting up the DNS on the primary and have all entries made on the secondary automatically.   I have also considered simply running both as a primary DNS and just cloning one to the other, rather than running a primary and a secondary since they will always be mirrors of each other. 
> 
> Does anyone have such a script or have any thoughts / suggestions? 
> 
> 
> Dan Porter 
> Twin Wolf Technology Group, LLC 

I'm assuming you are hosting the virtual sites on the primary dns box? Is "Automatic DNS Configuration" ticked in the virtual host template? Are the required hostnames entered in the "Auto DNS" tab of Network Services > DNS? With those two configurations your primary dns is populated automatically at site creation.

Populating the secondary dns box is what "secondary" dns does... Make sure the IP address of the secondary box is entered in the "Advanced" tab of DNS Settings on the primary box -- "Zone Transfer Access by IP Address" field. This tells primary dns the secondary box is allowed to ask for and receive zone files for domains hosted on the primary box.

So, you end up with two manual operations at site creation -- creating the vhost on the primary box, and creating secondary dns service on the secondary box (Edit Secondary Services in DNS). All subsequent changes are duplicated on the secondary box after zone transfer.

It has been a while since I used my BQ/BX box for dns, and I'm not sure if BX supports the NOTIFY method on the primary side (where a change in the primary zone file would trigger a "push" effect to secondary), but zone transfer interval gets the secondary in sync in due time.

Is that what you are asking?

Regards;
Jeff



More information about the Blueonyx mailing list