pavement

Named.conf

From FreeBSDwiki
Revision as of 23:35, 20 May 2006 by Jimbo (Talk | contribs)
Jump to: navigation, search

named.conf

Named.conf is the configuration file for BIND, and is normally located at /etc/namedb/named.conf for either BIND8 or BIND9. One of its most important functions is telling named where to find its zone files.

named.conf both controls system-wide configuration of BIND and tells BIND where to find the files used to control individual domains (usually called zones in the BIND parlance). Here is an example section of named.conf telling the system where to find a zone file:

zone "freebsdwiki.net" {
        type master;
        file "zones/freebsdwiki.net";
};

Zone files

and here is the corresponding zone file from /etc/namedb/zones/freebsdwiki.net:

$ORIGIN net.
$TTL 5m

freebsdwiki     IN      SOA     www.jrssystems.net. postmaster.www.jrssystems.net. (
                                1               ; serial
                                4h              ; refresh
                                15m             ; retry
                                8h              ; expire
                                4m)             ; negative caching TTL
                IN      NS      ns1.jrssystems.net.
                IN      NS      ns2.jrssystems.net.
                MX      10      mail.jrssystems.net.
                IN      A       66.45.234.42

$ORIGIN freebsdwiki.net.
www             IN      A       66.45.234.42
ns1             IN      A       66.45.234.42
ns2             IN      A       199.227.10.54

This is a very simple (but serviceable) zone file. For a more complex example, see also DNS record types.

Personal tools