How to install Unbound on Ubuntu Server Latest

Unbound is a secure, high-performance recursive DNS resolver that can be used as an alternative to the widely-used BIND DNS server. In this tutorial, we will show you how to install Unbound on Ubuntu Server Latest step-by-step.

Prerequisites

Before you begin, make sure your Ubuntu Server Latest has the latest updates installed. You can do this by running the following command:

sudo apt update && sudo apt upgrade -y

Step 1 - Install Unbound

To install Unbound, run the following command:

sudo apt install unbound

This will install Unbound and its dependencies on your Ubuntu Server Latest system.

Step 2 - Configure Unbound

By default, Unbound is configured to act as a caching resolver. However, you can configure it to handle DNS queries for your own domains.

To configure Unbound, you will need to edit the /etc/unbound/unbound.conf configuration file. You can use any text editor of your choice. For example, to use nano, run the following command:

sudo nano /etc/unbound/unbound.conf

In the configuration file, you can add your own DNS zones by adding the following lines:

local-zone: "example.com" transparent
local-data: "example.com. IN A 192.168.0.1"

This will create a new zone for example.com and maps it to an IP address (in this case, 192.168.0.1). You can add more zones by repeating the local-zone and local-data lines with different domain names and IP addresses.

Once you have added your DNS zones, save the configuration file and exit your text editor.

Step 3 - Start Unbound

To start Unbound, run the following command:

sudo systemctl start unbound

To ensure that Unbound starts automatically at boot time, run the following command:

sudo systemctl enable unbound

Conclusion

Congratulations! You have successfully installed and configured Unbound on Ubuntu Server Latest. You can now use Unbound as a secure, high-performance DNS resolver for your own domains.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!