From Gentoo Wiki
Jump to: navigation, search

BIND, or the Berkeley Internet Name Daemon, is a popular free software DNS server, and also one of the most frequently used name servers on the Internet.

With BIND, users are able to set up a name server for managing their own DNS records, for caching DNS or acting as a slave DNS server. The software supports DNSSEC (which provides cryptographic signatures on the DNS records as a means to authenticate the integrity and ownership of the records) natively.


BIND is offered through the net-dns/bind package. Please check the USE flags before installing. As BIND is a popular name server software, it is also a popular target for hackers and malicious groups, so it is wise to securely configure BIND - which includes building in support for only those features you are planning to use.

USE flags

Cannot load package information. Is the atom net-dns/bind correct?


root #emerge --ask net-dns/bind

add bind to the boot scripts to automatically start bind upon boot.

root # rc-update add named default

If you are planning on using BIND in a chrooted environment, edit /etc/conf.d/named and set the CHROOT variable accordingly. Check the comments as well, as they provide information on automatically creating the chrooted environment using emerge --config.


Most management of BIND is done through its rndc command, although you can use the /etc/init.d/named (OpenRC) init script as well. Next to the default start/stop/restart routines, it also offers the following functionality:

  • checkconfig validates the configuration file /etc/bind/named.conf for correct syntax.
  • checkzones validates the zone files for correct syntax.
  • reload reloads the zone files without restarting the named daemon itself.


USE flags

Cannot load package information. Is the atom net-dns/bind-tools correct?


root #emerge --ask net-dns/bind-tools


Easy Caching DNS

root #echo 'dns_servers=""' >> /etc/conf.d/net

As root edit /etc/bind/named.conf add your internet services DNS where the x.x.x.x are.

FILE /etc/bind/named.conf
forwarders {
		x.x.x.x;	// Your ISP NS
		x.x.x.x;	// Your ISP NS;		// Level3 Public DNS;		// Level3 Public DNS;		// Google Open DNS;		// Google Open DNS
root #rc-service named restart
user $dig

See also

External resources