How to Install Unbound DNS resolver on Ubuntu 22.04

Today we focusing How to Install Unbound DNS resolver on Ubuntu 22.04.

In this article we will talk how to Install Unbound DNS Resolver on Ubuntu 22.04. Unbound is a free, open source, recursive and validating DNS caching server. Uses DNS-over-TLS and DNS-over-HTTPS to encrypt connections between clients. Compared to Bind9, Unbound is lightweight and very fast. A caching server helps reduce website loading time by keeping the cache database on an unbound server. It is capable of verifying DNSSEC and can act as a trusted notifier.

Unbound is a recursive, validating, highly secure DNS caching server distributed freely under the BSD license. Unbound supports DNS-over-TLS and DNS-over-HTTPS to increase online privacy by allowing clients to encrypt their connection. Depending on your network configuration, Unbound can support both IPv4 and IPv6. Installation and configuration of Unbound on Linux distributions is very simple and straightforward. The Unbound package is available on modern operating systems such as CentOS, Ubuntu and Fedora. Organizations that use their own domain to host applications or websites internally can use Unbound DNS as a server. Below are the steps to install Unbound DNS solution on Ubuntu 22.04.

How to Install Unbound DNS Resolver on Ubuntu 22.04

Create an Atlantic.Net cloud server

  • First, log in to your Atlantic.Net Cloud Server. Create a new server and choose Ubuntu 20.04 as the operating system with at least 2 GB of RAM. Connect to your cloud server via SSH and login using the credentials highlighted at the top of the page.
  • Once you are logged into the Ubuntu 20.04 server, run the following command to update your base system with the latest packages.
See also  How To Clear Windows 11 Cache

Install required dependencies

  • Before starting, you need to install some basic DNS tools on your computer. You can install all of them using the following command:
  • apt-get install bind9-utils dnsutils net-tools -y
  • Once all packages are installed, you can proceed to the next step.

Install and configure Unbound DNS

By default, the Unbound package is included in the Ubuntu default repository. It can be installed using the following command:

    • apt-get install unbound -y

After installing Unbound DNS, you need to configure it. By default, the Unbound main configuration file is located in /etc/unbound/unbound.conf. However, it is recommended to create a separate configuration file:

    • Nano /etc/unbound/unbound.conf.d/myunbound.conf

Add the following lines:

    • Server:
    • Port: 53
    • verbosity: 0
    • No.-Threads: 2
    • Outgoing limit: 512
    • Number of queries per thread: 1024
    • msg-cache-size: 32m
    • Interface: 0.0.0.0
    • rrset-cache-size: 64m
    • cache-max-ttl: 86400
    • infra-host-ttl: 60
    • infra-lame-ttl: 120
    • access-control: 127.0.0.0/8 permit
    • access-control: 0.0.0.0/0 allow
    • Username: Unlimited
    • Directory: “/etc/unbound”
    • logfile: “/var/log/unbound.log”
    • use-syslog: no
    • Hidden Version: Yes
    • so-rcvbuf: 4 m
    • so-sndbuf: 4m
    • do-ip4: Yes
    • do-ip6: No
    • do-udp: Yes
    • do-tcp: Yes
    • Remote:
    • Enable Control: Yes
    • Control port: 953
    • Control Interface: 0.0.0.0

Save and close the file, then verify the configuration file with the following command:

    • unbound-checkconf /etc/unbound/unbound.conf.d/myunbound.conf

You should get the following output:

    • unbound-checkconf: no errors in /etc/unbound/unbound.conf.d/myunbound.conf

Next, create a registry file for Unbound and set the correct permissions:

    • Touch /var/log/unbound.log
    • chown unbound:unbound /var/log/unbound.log

Start an unlimited DNS service

At this point, Unbound DNS is installed and configured. Now, restart the Unbound service and enable it to start on system restart:

    • systemctl unlimited restarts
    • Systemctl enables unbound

You can check the status of Unbound with the following command:

See also  How To Clear Windows 11 Cache

At this point, the Unbound service is started and listens on port 53. You can check it using the following command:

Unlimited DNS testing

Now, you need to perform some DNS queries using the dig command to test the unbound DNS server. Let’s use ubuntu.com for testing.

    • dig ubuntu.com @localhost

You can also test the Unbound DNS server from the client machine. In this case, you should specify your Unbound DNS server IP with the query:

    • dig ubuntu.com @69.87.221.220

Problem solving is limitless

If you want to check the status of Unbound DNS, run the following command:

If you want to retreat up DNS cache in a text file, run the following command:

    • unbound-control dump_cache > cache.txt

You can check the cache.txt file with the following command:

Final words

I hope you have understood this article how to Install Unbound DNS Resolver on Ubuntu 22.04. If your answer is no, you can ask anything about this article in the contact forum. If your answer is yes, please support us by sharing this article with your friends and family.

Faq

About This Guide?


In this guide, we told you about the How to Install Unbound DNS resolver on Ubuntu 22.04; please read all steps above so that you understand How to Install Unbound DNS resolver on Ubuntu 22.04 in case if you need any assistance from us, then contact us.

How this tutorial or guide assisting you?


So in this guide, we discuss the How to Install Unbound DNS resolver on Ubuntu 22.04, which undoubtedly benefits you.



Share this article about How to Install Unbound DNS resolver on Ubuntu 22.04

I hope you like the guide How to Install Unbound DNS resolver on Ubuntu 22.04. In case if you have any queries regards this article/tutorial you may ask us. Also, share your love by sharing this article with your friends and family.
#Install #Unbound #DNS #resolver #Ubuntu

See also  How To Clear Windows 11 Cache
Trickbugs: Tips and Tutorials
Logo