Skip to content

Linux VPS & VPS Windows Setup Guide | NetCloud24 a Local DNS Resolver with Dnsmasq on Rocky Linux

Netcloud24
Cloud Infrastructure Expert
NetCloud24 Expert Guides Open the dedicated video page

Video transcript: NetCloud24 Expert Guides. Practical knowledge for a reliable cloud. Cloud and VPS expertise, security, performance, and step-by-step tutorials. Learn, deploy, and keep building with NetCloud24.

Introduction

Dnsmasq is a lightweight DNS forwarder and DHCP server. This tutorial will guide you through the process of installing and configuring Dnsmasq as a local DNS resolver on Rocky Linux.

Prerequisites

Before you begin, ensure you have:

  1. A Rocky Linux system
  2. Root or sudo privileges

Step 1: Install Dnsmasq

Install Dnsmasq using the following command:

sudo dnf install -y dnsmasq

Step 2: Configure Dnsmasq

Edit the Dnsmasq configuration file:

sudo nano /etc/dnsmasq.conf

Add the following configuration to the file:

listen-address=127.0.0.1
bind-interfaces
domain-needed
bogus-priv
no-resolv
server=8.8.8.8
server=8.8.4.4

Save and close the file.

Step 3: Restart Dnsmasq

Restart the Dnsmasq service to apply the changes:

sudo systemctl restart dnsmasq

Step 4: Test DNS Resolution

Test DNS resolution using the nslookup command:

Visual overview of Linux VPS & VPS Windows Setup Guide | NetCloud24 a Local DNS Resolver with Dnsmasq on Rocky Linux
Visual overview: Linux VPS & VPS Windows Setup Guide | NetCloud24 a Local DNS Resolver with Dnsmasq on Rocky Linux
nslookup example.com

Step 5: Configure Network Settings

Update the network settings on your system to use the local DNS resolver. Edit the network configuration file:

sudo nano /etc/sysconfig/network-scripts/ifcfg-eth0

Add the following line to the file:

DNS1=127.0.0.1

Save and close the file. Restart the network service:

sudo systemctl restart NetworkManager

Conclusion

Congratulations! You have successfully installed a local DNS resolver with Dnsmasq on Rocky Linux. Your system is now configured to use Dnsmasq for DNS resolution.

Windows VPS Deutschland

Windows VPS España

Windows VPS Nederland

Windows VPS Italia

Windows VPS Portugal

Key topics covered in Linux VPS & VPS Windows Setup Guide | NetCloud24 a Local DNS Resolver with Dnsmasq on Rocky Linux
Key topics covered in this NetCloud24 guide.

VPS Windows Italia

Windows VPS

Windows VPS

Windows VPS Sverige

Windows VPS Norge

Windows VPS

Windows VPS Türkiye

Windows RDS (Remote Desktop Services)

Practical checklist for Linux VPS & VPS Windows Setup Guide | NetCloud24 a Local DNS Resolver with Dnsmasq on Rocky Linux
Practical checklist for applying the guidance in this article.

Windows VPS

Linux VPS & VPS Windows Setup Guide | NetCloud24 a Local DNS Resolver with Dnsmasq on Rocky Linux
Linux VPS & VPS Windows Setup Guide | NetCloud24 a Local DNS Resolver with Dnsmasq on Rocky Linux
Explore more

More on this topic

Netcloud24
Netcloud24
Cloud Infrastructure Expert · NetCloud24

Comments are closed.