Actions

Bind9

Bind9 is one of the most used DNS servers. The server is open-source and can be downloaded over the terminal.
Because we have to edit every config file separately, the whole configuration is pretty error-prone. For this tutorial, we used Ubuntu Server 18.04.

Download

First, we have to install some updates.

sudo apt update
sudo apt upgrade
sudo apt autoclean

Now we can install Bind9.

sudo apt install bind9
The bind files can now be found in /etc/bind9

Bind9 files

In this passage, we show you the tasks of the various files.

named.conf

This file integrates the other ones. We can leave this default.

named.conf.options

We define the next DNS server for our bind and allow recursive queries for our subnets.

RTENOTITLE

named.conf.local

Defines the DNS zones.

RTENOTITLE

Forward lookup zones

For this example, we define a DMZ and a LAN zone.

db.example.dmz

The file db.0 can be used as a template.

RTENOTITLE

192.168.220.12 is our DNS- and web server. You have to replace server with the real server name. Do the same for the gateway.

db.example.lan

RTENOTITLE

Replace names and IP addresses for the LAN appliances.

Reverse lookup zones

In the next passage, we examine the reverse lookup zones.

db.192.168.220.12

This is the reverse lookup zone for the DMZ.

RTENOTITLE

The numbers under the @ are always the last octet from the appliance's IP address.

db.192.168.210.12

This is the reverse lookup zone for the LAN.

RTENOTITLE

Important! After every change in a zone file, we need to count up the serial by 1.

Bind commands

sudo service bind9 start
sudo service bind9 status
sudo service bind9 restart

If the status says that all zones are loaded, we did it.