Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2005
    Location
    Seattle, WA
    Posts
    19

    Script to batch add NS records?

    Does anyone have a script that can add an NS record to all zones in batch?

    It would be very helpful to me right now.

  2. #2
    Join Date
    Feb 2002
    Location
    The OC
    Posts
    2,094
    I just hate it when no one responds to a new member's question.

    I don't know of such a script, but you might checkout HotScripts.com if you haven't already.

    BTW, welcome to the forum, nikdahl
    You may delay, but time will not. --- Benjamin Franklin

  3. #3
    What name server are you using?

  4. #4
    Join Date
    Aug 2005
    Location
    Seattle, WA
    Posts
    19
    ns1.hardlines.com is what I want to add. ns2.hardlines.com is the server I want to make the changes on.

  5. #5
    Join Date
    Aug 2005
    Location
    Seattle, WA
    Posts
    19
    it's a bind server on Fedora, btw...

    any help? I'm sure it would be a really easy script to write, but I just don't have the skills yet.

  6. #6
    Well if your name server has dynamic updates enabled you could just write a small file and copy and paste it into nsupdate.

    But if you don't know how to do that you should try using one of these:
    http://sourceforge.net/projects/zonemaster/
    http://sourceforge.net/projects/novadns/
    http://sourceforge.net/projects/probind/
    http://sourceforge.net/projects/blahzdns/

  7. #7
    Join Date
    Jul 2002
    Location
    Kuwait
    Posts
    10,573
    you can do it using simple shell script
    Code:
    cd /path/to/your/dns/dir
    for i in db.*
    do
    cat my.ns >> $i 
    done
    where the text file my.ns has this entry
    @ IN NS ns2.example.com

    i believe this should do the job

    DISCLAIMER: THIS HAS NEVER BEEN TESTED, MAKE SURE YOU HAVE A BACKUP OF ALL FILES INCASE OF ISSUES
    Bashar Al-Abdulhadi - KuwaitNET Internet Services Serving customers since 1997
    Kuwait's First Webhosting and Domain Registration provider - an ICANN Accredited Registrar

    Twitter: Bashar Al-Abdulhadi

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •