Unbound is an open-source, secure, and high-performance DNS resolver that can be used as a caching or forwarding DNS server. In this tutorial, we will show you how to install Unbound on Fedora Server Latest.
Before we proceed with the installation, make sure that you have the following:
The first step is to update your system to ensure that all packages and dependencies are up to date.
To do this, run the following command:
sudo dnf update -y
To install Unbound, we need to run the following command:
sudo dnf install unbound -y
This command will install Unbound along with any required dependencies.
By default, Unbound comes with a minimal configuration file. However, you can customize it to meet your needs.
server:
interface: 0.0.0.0
access-control: 0.0.0.0/0 allow
do-ip4: yes
do-ip6: no
do-udp: yes
do-tcp: yes
hide-identity: yes
hide-version: yes
This configuration file will allow Unbound to listen on any interface, support both UDP and TCP protocols, and hide its identity and version number.
After configuring Unbound, we need to start the service and enable it to start at boot time.
To start the service, run the following command:
sudo systemctl start unbound.service
To enable the service at boot time, run the following command:
sudo systemctl enable unbound.service
To verify that the installation was successful, you can use the dig command to test DNS resolution.
For example, to test DNS resolution of example.com
, run the following command:
dig example.com
You should see output similar to the following:
; <<>> DiG 9.16.12 <<>> example.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 36458
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1472
;; QUESTION SECTION:
;example.com. IN A
;; ANSWER SECTION:
example.com. 470 IN A 93.184.216.34
;; Query time: 23 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Aug 17 22:20:19 UTC 2021
;; MSG SIZE rcvd: 55
This output shows that Unbound was able to resolve example.com
to the IP address 93.184.216.34
.
In this tutorial, we demonstrated how to install Unbound on Fedora Server Latest. With Unbound installed, you can configure it for your specific needs, such as setting up caching or forwarding DNS services.
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!