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.

NSD conf/zone templates

Discussion in 'General Discussion' started by Andrew Boring, Feb 22, 2010.

  1. Andrew Boring

    Andrew Boring Member

    Joined:
    Sep 27, 2006
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    I set up a VPS to run NSD recently, and need to replicate zones via xfer to a secondary nameserver (not running cPanel or DNS-ONLY). Looking through the NSD documentation, it appears that I cannot specifiy a server-wide slave to use for all zones. Rather it's set per-zone entry in /etc/nsd.conf.

    When adding a zone (account, addon domain, etc) cPanel configures this:
    Code:
    zone:
            name: "host.example.com"
            zonefile: "host.example.com.db"
    
    And I need it to automatically configure:

    Code:
    zone:
            name: "host.example.com"
            zonefile: "host.example.com.db"
            notify: 1.2.3.4 NOKEY
            provide-xfr: 1.2.3.4 NOKEY
    
    Since all zones would be configured for the same secondary, the easiest thing would be to find the template that the cPanel uses to create the nsd.conf file.

    I can't seem to find the template that cPanel generates this from.
    Any suggestions?
     
  2. pakogah

    pakogah Member

    Joined:
    Nov 6, 2008
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Hello Andrew,
    did you found where the template nsd.conf located?

    I have the same requirement for dns master/slave
     
  3. 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
    I didn't have nsd on my machine, so I switched it over to nsd. Before configuring nsd, the nsd.conf file didn't exist and afterward, there were the following locations for the file:

    root@pandacow [~]# locate nsd.conf
    /etc/nsd/nsd.conf
    /usr/share/doc/nsd-3.2.5/nsd.zones2nsd.conf
    /usr/share/man/man5/nsd.conf.5.gz

    root@pandacow [~]# nsd -v
    NSD version 3.2.5
    Written by NLnet Labs.

    It appears that cPanel grabs the source and uses that as the nsd.conf file template. Do you need the zone file templates instead in this instance? Those are in WHM > DNS Functions > Edit Zone Templates or root SSH /var/cpanel/zonetemplates/ location.
     
Loading...

Share This Page