Compdigitec Labs

« | Home | »

Simple recursive DNS server with Unbound DNS

By admin | July 30, 2020

This is a simple configuration for running a recursive DNS server (passes DNS requests to another server and caches responses) with the Unbound DNS server.

Installation (Ubuntu):

sudo apt-get install -y unbound

Open the config

sudo vim /etc/unbound/unbound.conf


Replace below with the desired upstream DNS server.

# The following line includes additional configuration files from the
# /etc/unbound/unbound.conf.d directory.
#include: "/etc/unbound/unbound.conf.d/*.conf"
# NOTE: needed to comment out the above line avoid a "status: SERVFAIL" response

    # Enable verbose debugging messages
    verbosity: 1000

    # Run on all interfaces

    # Hide the server name and version
    hide-identity: yes
    hide-version: yes

    # Who should be able to query the server
    access-control: allow

    do-ip4: yes
    do-ip6: no

    do-udp: yes
    # Enable this to support TCP DNS which is required in some applications
    do-tcp: yes

    # Allow forwarding to another DNS server (e.g. another local dnsmasq or systemd-resolve)
    do-not-query-localhost: no

    name: "."
    # Replace with your desired upstream DNS server
    # You can have multiple forward-addr lines

Starting the server

sudo systemctl restart unbound

Debugging / Troubleshooting

Query the server

dig @your_server_here

Read the DNS server log

sudo systemctl status unbound -n 50


If you found this article helpful or interesting, please help Compdigitec spread the word. Don’t forget to subscribe to Compdigitec Labs for more useful and interesting articles!

Topics: Linux | 7 Comments »

7 Responses to “Simple recursive DNS server with Unbound DNS”

  1. sbobeer Says:
    November 20th, 2021 at 18:56

    … [Trackback]

    […] Read More on to that Topic: […]

  2. ตู้แปลภาษา Says:
    December 4th, 2021 at 15:56

    … [Trackback]

    […] Information on that Topic: […]

  3. สล็อตเว็บตรง Says:
    December 12th, 2021 at 20:10

    … [Trackback]

    […] Find More to that Topic: […]

  4. Digital Transformation Strategies Says:
    December 14th, 2021 at 14:12

    … [Trackback]

    […] Here you can find 38528 additional Information on that Topic: […]

  5. no dust Says:
    January 6th, 2022 at 19:07

    … [Trackback]

    […] Read More on on that Topic: […]

  6. Buy weed online Says:
    January 13th, 2022 at 10:25

    … [Trackback]

    […] Here you will find 10332 additional Information on that Topic: […]

  7. is dumps to legit Says:
    January 15th, 2022 at 04:13

    … [Trackback]

    […] Read More on on that Topic: […]