How to Install dnsmasq on Fedora Server Latest
Dnsmasq is a lightweight and versatile DNS and DHCP server. This tutorial will guide you on how to install dnsmasq on Fedora Server Latest.
Prerequisites
- A Fedora Server Latest.
- A user with sudo privileges.
Step 1: Update the System
Update the system's package index and upgrade all installed packages by running the following command:
sudo dnf update -y
Step 2: Install dnsmasq
To install dnsmasq, run the following command:
sudo dnf install dnsmasq -y
Step 3: Configure dnsmasq
By default, dnsmasq is pre-configured to work as a DNS and DHCP server for your local network. However, you can customize its configuration by editing the /etc/dnsmasq.conf file:
sudo nano /etc/dnsmasq.conf
Step 4: Start dnsmasq
After configuring dnsmasq, start the service and enable it to start at boot time:
sudo systemctl start dnsmasq
sudo systemctl enable dnsmasq
Step 5: Verify dnsmasq Installation
To verify that dnsmasq is working as expected, use the nslookup command to query a domain name:
nslookup google.com
If dnsmasq is working correctly, you should receive a response with the IP address of the domain.
Conclusion
In this tutorial, you've learned how to install and configure dnsmasq on Fedora Server Latest. With dnsmasq, you can have a local DNS and DHCP server, which can make managing your local network easier.