{"id":7059,"date":"2020-10-05T23:58:18","date_gmt":"2020-10-05T20:58:18","guid":{"rendered":"https:\/\/kifarunix.com\/?p=7059"},"modified":"2024-03-14T23:32:33","modified_gmt":"2024-03-14T20:32:33","slug":"setup-caching-only-dns-server-using-bind9-on-ubuntu-20-04","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/setup-caching-only-dns-server-using-bind9-on-ubuntu-20-04\/","title":{"rendered":"Setup Caching-Only DNS Server using BIND9 on Ubuntu 20.04"},"content":{"rendered":"\n

In this tutorial, we will discuss how to install and setup caching-only DNS server using BIND9 on Ubuntu 20.04. The Berkeley Internet Name Domain (BIND 9)<\/a> is a versatile, classic and complete name server software that implements an Internet domain name server. It is the most widely-used name server software on the Internet. DNS on the hand refers to a distributed naming system which maps the hostnames to their respective IP addresses. This enables the end users to refer to systems by their hostnames rather than IPs which are subject to changing from time to time depending on whether the IP is static or dynamic.<\/p>\n\n\n\n

Setting up Caching-Only DNS Server using BIND9<\/h2>\n\n\n\n

There are different roles in which any DNS server can be configured to server. In this guide, we will be looking at how to setup a caching-only DNS server using Bind9 on Ubuntu 20.04. As much as all DNS servers can cache the DNS queries, the major and only role of a caching-only DNS server is to cache the DNS queries. It has no any zone data information and thus does not serve out zones.<\/p>\n\n\n\n

The setup of the caching-only DNS server using BIND doesn’t require the expert level experience, even a newbie can handle it, :).<\/p>\n\n\n\n

Run System Update<\/h3>\n\n\n\n

To begin, ensure your system package repos are up-to-date.<\/p>\n\n\n\n

apt update<\/code><\/pre>\n\n\n\n

Install BIND9 on Ubuntu 20.04<\/h3>\n\n\n\n

Next, install Bind9 and other BIND\/DNS utilities on Ubuntu 20.04;<\/p>\n\n\n\n

apt install bind9 bind9utils -y<\/code><\/pre>\n\n\n\n

Theses tools installs the name server daemon, named<\/strong><\/code>, the Bind administration tool, rndc<\/strong><\/code> and the debugging utility, dig<\/strong><\/code>.<\/p>\n\n\n\n

Setup Caching-Only DNS Server using BIND9<\/h3>\n\n\n\n

Once the Bind9 package and other DNS utilities are installed, proceed to setup caching-only DNS server. \/etc\/bind\/named.conf<\/strong><\/code> is the main configuration file for BIND DNS server named. By default, this is how this configuration file looks like, at least on an Ubuntu 20.04;<\/p>\n\n\n\n

less \/etc\/bind\/named.conf<\/code><\/pre>\n\n\n\n
\/\/ This is the primary configuration file for the BIND DNS server named.\n\/\/\n\/\/ Please read \/usr\/share\/doc\/bind9\/README.Debian.gz for information on the \n\/\/ structure of BIND configuration files in Debian, *BEFORE* you customize \n\/\/ this configuration file.\n\/\/\n\/\/ If you are just adding zones, please do that in \/etc\/bind\/named.conf.local\n\ninclude \"\/etc\/bind\/named.conf.options\";\ninclude \"\/etc\/bind\/named.conf.local\";\ninclude \"\/etc\/bind\/named.conf.default-zones\";<\/code><\/pre>\n\n\n\n

From the file above;<\/p>\n\n\n\n