Skip to Content.
Sympa Menu

dns-operations - [opennic-dns-operations] New automation script

dns-operations AT lists.opennicproject.org

Subject: Dns-operations mailing list

List archive

[opennic-dns-operations] New automation script


Chronological Thread 
  • From: Jeff Taylor <shdwdrgn AT sourpuss.net>
  • To: dns-operations AT lists.opennicproject.org
  • Subject: [opennic-dns-operations] New automation script
  • Date: Wed, 30 Apr 2014 23:54:01 -0600

Based on the new idea for TLD master server policies, I wrote up a new script tonight to generate the config file for BIND. Please see http://opennic.oss/files/scripts/srvzone

There are a number of variables at the beginning to define your setup...
- NS0: the IP address of our T0 server
- myDNS: if you want to grab queries from a local server, enter the name or IP here
- file_* sets the path where the various zone files will be saved
- destination: where you want the final output to be saved
- tmp_dest: where the initial file is written and validated

Following that are the absolute paths for the commands used within the script. Hopefully I got everything in there.

If you run a T2 server, just call the script and it will generate output with all zones slaved.
If you run a T1 server, call the script with the name of your T1 -- ./srvzone ns1

This script uses a lockfile to ensure only one copy runs at a time. Query results are cached during each run to minimize the number of dig lookups needed. The output assumes that only the owner of the TLD and NS0 are valid masters for each zone. This script is completely self-contained and runs MUCH faster than the previous scripts I've put out to perform this function.

I've tried to make this script bullet-proof, but there will probably be issues from running on different platforms. You will need bash 4 or above for the various string conversions that are performed. This script will grab NS0 data straight from NS0, but all other queries are local. If you run this on a new server with no opennic access (and have BIND set up to use the output), it should pull all of the zone files from NS0 and get you up and running. The generated output is validated by BIND before installing the new file.

You can probably run this script once an hour to stay up to date on TLD changes. Let me know if there's any problems with it.



Archive powered by MHonArc 2.6.19.

Top of Page