Custom Search

Ubuntu named.conf

Ubuntu named.conf file is the master configuration file for DNS server. Its pronounced name-dee for name daemon, which is the dns service. It's location is in /etc/bind/named.conf. You can find named.conf file only after you install the bind9 software package.




Here is an example of a default Ubuntu /etc/bind/named.conf configuration file:





// This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
// structure of BIND configuration files in Debian, *BEFORE* you customize
// this configuration file.
//
// If you are just adding zones, please do that in
// include "/etc/bind/named.conf.local

include "/etc/bind/named.conf.options";
// prime the server with knowledge of the root servers

zone "." {
type hint;
file "/etc/bind/db.root";
};

// be authoritative for the localhost forward and reverse zones, and for
// broadcast zones as per RFC 1912

zone "localhost" {
type master;
file "/etc/bind/db.local";
};

zone "127.in-addr.arpa" {
type master;
file "/etc/bind/db.127";
};

zone "0.in-addr.arpa" {
type master;
file "/etc/bind/db.0";
};

zone "255.in-addr.arpa" {
type master;
file "/etc/bind/db.255";
};

include "/etc/bind/named.conf.local";



The named.conf is a very important file. Normally, you don't have to edit this file during dns configuration in Ubuntu. However, maybe you are going to open and view this file a few times to study it's configuration. It's a good idea to copy and make a backup of this file.




luzar@ubuntu:/etc/bind$ sudo cp named.conf named.conf.bak
[sudo] password for luzar:
luzar@ubuntu:/etc/bind$



As you can see, there are specific files in each zone in the named.conf configuration file above. Those are the database files for localhost and default dns configuration. We don't need to edit those files. You only need to edit two files mention at the top of named.conf which is /etc/bind/named.conf.local and /etc/bind/named.conf.options.

No comments:

Post a Comment

Please keep comment relevant and strictly no spam will be tolerated. Thank you.