Skip to content

How to Set Up a Local DNS Resolver with Unbound on Rocky Linux 9

Cloud Infrastructure Expert
How to Set Up a Local DNS Resolver with Unbound on Rocky Linux 9

Introduction

Unbound is a validating, recursive, and caching DNS resolver. This guide will walk you through the process of setting up a local DNS resolver with Unbound on Rocky Linux 9.

Prerequisites

Before you begin, ensure you have:

  1. A Rocky Linux 9 system
  2. Root or sudo privileges

Step 1: Install Unbound

Update the package index and install Unbound:

sudo dnf update
sudo dnf install -y unbound

Step 2: Configure Unbound

Edit the Unbound configuration file:

sudo nano /etc/unbound/unbound.conf

Replace the contents with the following configuration:

server:
    interface: 127.0.0.1
    access-control: 127.0.0.0/8 allow
    verbosity: 1
    logfile: "/var/log/unbound.log"

Step 3: Start Unbound

Start the Unbound service:

sudo systemctl start unbound
sudo systemctl enable unbound

Step 4: Test Unbound

Use the dig command to test Unbound:

dig example.com @127.0.0.1

You should see DNS resolution results for example.com.

Conclusion

Congratulations! You have successfully set up a local DNS resolver with Unbound on Rocky Linux 9. You can now use Unbound to resolve DNS queries locally.

Windows VPS Deutschland

Windows VPS España

Windows VPS Nederland

Windows VPS Italia

Windows VPS Portugal

VPS Windows Italia

Windows VPS

Windows VPS

Windows VPS Sverige

Windows VPS Norge

Windows VPS

Windows VPS Türkiye

Windows RDS (Remote Desktop Services)

Windows VPS

Explore more

More on this topic

Netcloud24
Netcloud24
Cloud Infrastructure Expert · NetCloud24

Comments are closed.