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.

Initial DNS setup

Discussion in 'Bind / DNS / Nameserver Issues' started by brgsstm, Jan 22, 2012.

  1. brgsstm

    brgsstm Member

    Joined:
    Jan 22, 2012
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi guy's,

    Firstly let me apologise for the amount of questions I will probably ask over the coming weeks. I have caught the cPanel bug and can't wait to get stuck in.

    I have just installed (many times as I messed up a lot :) ) on my server and I need some help with the initial DNS config.

    Basically let's say my server hostname is srv1.example.com. I am setting it up as a DNS server too using BIND so I added glue records at my registrar to point to ns1.example.com and ns2.example.com. Currently these point to the same IP but in time I will add another DNS server and throw ns2 off to that.

    Obviously, during the initial install script I specified these as the nameservers. Resolvers were left at my datacentres default.

    My query is that when viewing the dns zones in WHM I saw 3 zones. They were srv1.example.com, ns1.example.com and ns2.example.com.

    I obviously need a zone for example.com so I added that and it is working fine.

    My question is, do I still need the zones that were setup automatically? i.e. the srv1.example.com, ns1.example.com and ns2.example.com? I don't understand the need for them?

    Thanks for any help,

    Tom
     
    #1 brgsstm, Jan 22, 2012
    Last edited: Jan 22, 2012
  2. storminternet

    storminternet Well-Known Member

    Joined:
    Nov 2, 2011
    Messages:
    462
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    I do not see any unusual thing about the dns zone files on your server.
    The dns zone files get automatically added over server at the time of WHM configuration as you
    need to put server hostname , dns server at the initial stage.

    These dns zone files required for the resolution of server hostname and your dns servers.
    Hostname is more important for mailserver identity so it should resolve to your server's primary IP.
    Server hostname fail to resolve IP if you delete it's dns zone file.

    Secondly with the dns zone files, your nameservers resolve to corresponding server IPs.
    As all your domain using these nameservers as NS records they should have valid A records and
    resolve to server IPs. Your site may fail to resolve if you delete these dns zone files.
     
  3. brgsstm

    brgsstm Member

    Joined:
    Jan 22, 2012
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thanks, I am just trying to understand why these zones exist I guess? I just dont understand why they have been put in srv1.example.com/ns1.example.com/ns2.example.com instead of just example.com? I added example.com zone and have A records for srv1,ns1 and ns2.

    Again, thanks,

    Tom
     
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Hi Tom,

    If you created example.com as a domain after you'd added the nameservers and hostname, then this is why you have the zone files for srv1, ns1 and ns2 rather than those being placed into the example.com zone file. Provided you have the hostname and nameserver entries in the example.com file, then it should be fine to remove the other zone files for srv1, ns1 and ns2.example.com subdomains. I would make a backup of those files prior to removing them just to be on the safe side.

    Also, just to ensure you have the right entries, the nameservers (ns1 and ns2) need both A records and NS records in that example.com.db file:

    Code:
    example.com. 86400 IN NS ns1.example.com.
    example.com. 86400 IN NS ns2.example.com.
    
    ns2.example.com. 14400 IN A IP#1
    ns1.example.com. 14400 IN A IP#2
     
  5. brgsstm

    brgsstm Member

    Joined:
    Jan 22, 2012
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thanks Tristan,

    That was just the information I was after! Thanks again,

    Tom.
     
Loading...

Share This Page