How to install Bind9

From ppwiki
Jump to navigation Jump to search

Prerequisites

BIND is an open source software that allows you to setup and Domain Name Server (DNS) to resolve IP addresses to hostnames and vice versa To complete this tutorial, we will need:

  • 1 node for the Bind9 server
  • 1 or 2 nodes for testing

All 3 nodes in this tutorial have Ubuntu 16.04, but this will work as well on Debian Stretch. So make sure first all your nodes have Ubuntu or Debian installed and have all updates.

Bind9 installation

The installation is very simple just two commands

sudo apt-get install bind9 
sudo apt-get install bind9utils

If you are using puppet in your environment, you can also create a class and use it to install bind9.

Example of class:

#The class will install a DNS server using the bind9 package
class server::bind_server {
#Execute -apt-get update'
#        exec { 'apt-update':
#                command => '/usr/bin/apt-get update'
#        }
#installation of Bind
        package { 'bind9':
#                require => Exec['apt-update'],
                ensure => installed,
       }
#installation of Bind  utils
        package { 'bind9utils':
#               require => Exec['apt-update'],
               ensure => installed,
       }
service { 'bind9':
                       ensure => running,
       }
}

Bind9 configuration

Testing

Conclusion

References