How to Install CoreDNS on Manjaro

CoreDNS is a DNS server that can serve as a replacement for traditional DNS servers like BIND or dnsmasq. In this tutorial, we'll go through the steps required to install CoreDNS on Manjaro.

Prerequisites

You will need the following before proceeding with this tutorial:

  1. A Manjaro Linux installation
  2. Basic knowledge of using the terminal/command line on Linux

Step 1: Update Your System

Before installing CoreDNS, it's important to ensure that your system is up-to-date. Open a terminal window and run the following command to update your system:

sudo pacman -Syu

Step 2: Install CoreDNS

To install CoreDNS on Manjaro, you can use the following command:

sudo pacman -S coredns

This command will install CoreDNS along with any necessary dependencies.

Step 3: Configure CoreDNS

By default, CoreDNS does not have any configuration files. You will need to create a configuration file to tell CoreDNS how to handle DNS requests. You can create a configuration file using your preferred text editor.

For example, you can create a configuration file at /etc/coredns/Corefile with the following contents:

. {
  log
  forward . 8.8.8.8 8.8.4.4
}

This configuration file tells CoreDNS to log requests and forward them to the Google DNS servers.

Step 4: Start and Enable CoreDNS

After creating the configuration file, you can start CoreDNS using the following command:

sudo systemctl start coredns

You can also enable CoreDNS to start automatically at boot time using the following command:

sudo systemctl enable coredns

Conclusion

In this tutorial, we covered the steps required to install CoreDNS on Manjaro. With CoreDNS installed, you can serve as a replacement for traditional DNS servers like BIND or dnsmasq.

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!