Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

My DNS Zone Template

Discussion in 'Bind/DNS/Nameserver' started by Yujin, Aug 15, 2010.

  1. Yujin

    Yujin Registered

    Joined:
    Feb 9, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    51
    Hello Guys,

    I'm editing my standardvirtualftp under Edit Zone Templates.
    I just added the following lines to my existing template to have local nameserver created.

    ns1 IN A %ip%
    ns2 IN A %ip2%
    ns3 IN A %ip3%
    ns4 IN A %ip4%

    Then I got the following error...

    Missing key(s): ip2 at line 17 when including template STDIN. Line: ns2 IN A %ip2%
    Missing key(s): ip3 at line 18 when including template STDIN. Line: ns3 IN A %ip3%
    Missing key(s): ip4 at line 19 when including template STDIN. Line: ns4 IN A %ip4%


    It seems that %ip2% %ip3% and %ip4% are wrong values.

    Can anybody help me with the correct values? Thanks in advance.
     
  2. cpanelinfoseeker

    cpanelinfoseeker Well-Known Member

    Joined:
    Oct 25, 2002
    Messages:
    325
    Likes Received:
    3
    Trophy Points:
    168
    Location:
    NE Illinois
    cPanel Access Level:
    Root Administrator
    Mine has this code:

    %nameserverentry%. IN A %nameservera%
    %nameserverentry2%. IN A %nameservera2%
    %nameserverentry3%. IN A %nameservera3%
    %nameserverentry4%. IN A %nameservera4%

    Hope this helps,
    Ron
     
  3. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,554
    Likes Received:
    9
    Trophy Points:
    168
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    The custom entries added are not valid. By default, the stock DNS zone templates already allow for name server entries to be present, as correctly indicated by cpanelinfoseeker:
    For reference, here are the contents of the stock-default DNS zone template at /var/cpanel/zonetemplates/standardvirtualftp:
    Code:
    ; cPanel %cpversion%
    ; Zone file for %domain%
    $TTL %ttl%
    @      %nsttl%    IN      SOA     %nameserver%. %rpemail%. (
            %serial%    ; serial, todays date+todays
            86400        ; refresh, seconds
            7200        ; retry, seconds
            3600000        ; expire, seconds
            86400 )        ; minimum, seconds
    
    %domain%. %nsttl% IN NS %nameserver%.
    %domain%. %nsttl% IN NS %nameserver2%.
    %domain%. %nsttl% IN NS %nameserver3%.
    %domain%. %nsttl% IN NS %nameserver4%.
    
    %nameserverentry%. IN A %nameservera%
    %nameserverentry2%. IN A %nameservera2%
    %nameserverentry3%. IN A %nameservera3%
    %nameserverentry4%. IN A %nameservera4%
    
    %domain%. IN A %ip%
    
    localhost.%domain%. IN A 127.0.0.1
    
    %domain%. IN MX 0 %domain%.
    
    mail IN CNAME %domain%.
    www IN CNAME %domain%.
    ftp IN A %ftpip%
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,561
    Likes Received:
    42
    Trophy Points:
    308
    cPanel Access Level:
    Root Administrator
    To add to Donald's reply, the template variables in the stock template are the only variables available.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice