The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Adding a bunch of dns --- HELP

Discussion in 'Bind / DNS / Nameserver Issues' started by simon23, Feb 17, 2005.

  1. simon23

    simon23 Member

    Sep 8, 2004
    Likes Received:
    Trophy Points:
    So i had about 100 domain names to add... so i figured instead of doing it through whm id do it with a bash script...

    so i added this for each domain to /etc/named.conf

    zone "" {
    type master;
    file "/var/named/domainname.db";

    and inside of /var/named/
    i had my bash script create a for each domain.

    containing this:

    ; my bashscript zone builder
    ; Zone file for
    $TTL 14400

    @ IN SOA ns3.ourhosting. root.servername.ourhosting. (
    2004111601 ; serial, todays date+todays
    14400 ; refresh, seconds
    7200 ; retry, seconds
    3600000 ; expire, seconds
    86400 ) ; minimum, seconds IN NS ns3.ourhostingcompany. IN NS ns4.ourhostingcompany. IN A theipnumberhere IN A IN MX 0
    mail IN CNAME
    www IN CNAME
    ftp IN CNAME

    That seemed to work.. however when looking at /var/log/messages i see alot of lame server error mesgs...

    but each one of these domains seems to resolve from the ns3 server.

    then i went to WHM and tried syncing all the records.. so it would sync the newly added records to the ns4 server.

    however the page just goes white.. and never says syncing finished.. and nothing is added to the ns4 server when i checked.

    What am I doing wrong here? Is there another file that needs to be modified?

    Please help.
  2. DigitalN

    DigitalN Well-Known Member

    Sep 23, 2004
    Likes Received:
    Trophy Points:

    If you wanted to setup slave zones on the server, then you should have added the named.conf config like this (on the slave / secondary dns server)

    zone "" {
    type slave;
    file "/var/named/domainname.db";
    masters {;

    the being the primary dns server IP ( i assume ns3 is on the primary server and you have registered ns4 with an IP from the secondary server.)

    You don't need to manually create the dns zones in /var/named/*.db

    After adding the slave zones config within named.conf you just need to

    # rndc reload

    and all those slave zones in named.conf will transfer to the server from the master IP.

    If you are trying to use whm and its clustering though, you don't want to do any of what you did. You just need to add the second server to the cluster using the whm control panel.
    #2 DigitalN, Feb 17, 2005
    Last edited: Feb 17, 2005

Share This Page