CoreDNS is a flexible, extensible DNS server that can serve as a primary or secondary DNS server for domains. In this tutorial, we will learn how to install CoreDNS on Fedora Server Latest.
First, update your operating system's package list by running:
sudo dnf update
To install CoreDNS, run the following command:
sudo dnf install coredns
After running the command, Fedora will download and install the CoreDNS server.
The CoreDNS configuration file is located at /etc/coredns/Corefile
. Open it in a text editor and configure it based on your DNS needs.
For example, to create a simple DNS server that resolves all queries to a specific IP address, add the following configuration to the file:
.:53 {
proxy . 8.8.8.8:53
}
This configuration forwards all DNS queries to Google's DNS server at 8.8.8.8:53
.
After configuring CoreDNS, start and enable the service with the following commands:
sudo systemctl start coredns
sudo systemctl enable coredns
To verify that CoreDNS is working correctly, use the following command to query the DNS server:
nslookup example.com localhost
Replace example.com
with a domain name you want to query.
If everything is set up correctly, CoreDNS will return the IP address of the specified domain.
Congratulations! You have successfully installed CoreDNS on Fedora Server Latest.
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!