How to use Resolvconf: Managing DNS easily for free in 2024

Hello hackers in this video i will teaching you on how you can set and manage DNS permanenty using Resolvconf. So read the articles from the top to bottom.Let’s go

How to use Resolvconf

What is DNS ?

Every device on the internet has an IP address that other devices can use to locate it.
A Domain Name System (DNS) converts domain names into IP addresses, which browsers use to access webpages and other internet resources.

Why to manage DNS ?

Managing your DNS allows you to apply custom DNS settings to specific websites and gives you control over who can access and use your domain names.For example, if someone decides to sell your domain name to another company, you may have issues.

Understanding Resolvconf

What Is Resolvconf ?

On Linux and Unix-based systems, the tool Resolvconf lets you see and edit DNS resolver configuration data.
It offers a command-line interface for changing and querying DNS settings, domain name servers, and search domains, among other resolver configuration options.

Resolvconf is used by applications to programmatically retrieve and modify DNS resolver configuration data, and it is commonly used by system administrators to manage DNS resolver settings for numerous hosts on a network.

Installing Resolvconf

Using the aptitude package manager of linux (as i am using kali)

How to use Resolvconf: Managing DNS
How to use Resolvconf
type : apt-get install -y resolvconf

And yeah that’s it your configuration file is all set to be used.

In order to ensure you are on the right track and that you have installed the program go forward and type the following command.

How to use Resolvconf
cat /etc/resolv.conf

If the output returned matches with the above photo you have done it right.

How to use Resolvconf

Using GUI networkmanager

How to use Resolvconf

So if you are on a gui system like xfce on kali then it comes pre packaged with networkmanager applet that you can check from here.

Clicking on the applet you see inputs to specify your name servers.
Click on the setting and you can see a lot of data.

Go into IPv4 setting and in the Addtional DNS Server .
And that’s it type in the name servers and you are good to go.

Now you might be thinking what is a name server….so let’s get you what it is

What is a name Server ?

Name servers function as the Internet equivalent of phone book directories, allowing users to navigate between websites and online services using human-readable domain names rather than numerical IP addresses.Name servers are a component of the Domain Name System (DNS) that manages and responds to queries for domain names, translating them into IP addresses.

Manually Configuring Dns Via Resolvconf

To easily set up and manually manage Name server using Resolvconf you need to install it as i mentioned above.

Enabling services

To enable the resolvconf service type:-

How to use Resolvconf
systemctl enable resolvconf.service

As you see this is active and running right now.

Checking the resolv.conf file again type

How to use Resolvconf
How to use Resolvconf
cat /etc/resolv.conf

You see now it’s managed by resolvconf. This is what we want.

Configuring Configuration File

So in order to edit we are looking for the base configuration file

How to use Resolvconf
type: vim /etc/resolvconf/resolv.conf.d/base

And this will open the file in the Vim Edtior

Put in the nameserver now manually
Instance to add the Cloudflare Name server

type: nameserver

Or the Google Name server (Not Recommended)

Now Restart the service

How to use Resolvconf
systemctl restart resolvconf.service

and Restart the networkmanager

systemctl restart Networkmanager

And Let’s cat the content of the file

cat /etc/resolv.conf

and Yeah here you see your manually added name servers.

As you see you primary nameserver is still available to modify this

How to use Resolvconf
type vim /etc/network/interfaces

Type the dns nameserver here by typing

type :wq and reboot the system

cat the content and you can see it’s done manually and permanenty….

So that is it for this blog visit other blogs and the website and i’ll see you in the next video…..
Happy Hacking Hackers

Frequently Asked Questions

  1. What is resolvconf in Linux?
    Resolvconf is a daemon that dynamically updates the DNS resolver configuration on a Linux system.
  2. How does resolvconf work?
    Resolvconf listens for changes in network configuration files and updates the /etc/resolv.conf file accordingly with the appropriate DNS servers and search domains.
  3. How do I install resolvconf on my Linux system?
    You can install resolvconf using the package manager of your Linux distribution. For example, on Ubuntu, you can use the command “sudo apt-get install resolvconf”.
  4. Can I manually configure resolvconf settings?
    While resolvconf is designed to update automatically based on network changes, you can manually edit the configuration files in /etc/resolvconf to customize the DNS settings.
  5. How do I restart the resolvconf service?
    You can restart the resolvconf service on Linux by using the command “sudo service resolvconf restart” or “sudo systemctl restart resolvconf” depending on your Linux distribution.
  6. Can I disable resolvconf on my system?
    Yes, you can disable resolvconf by stopping the service and removing the package from your system using your package manager.
  7. Does resolvconf cache DNS lookup results?
    No, resolvconf does not cache DNS lookup results. It simply updates the /etc/resolv.conf file with the current DNS settings.
  8. Is resolvconf compatible with all Linux distributions?
    Resolvconf is primarily designed for Debian-based distributions like Ubuntu, but it can also be used on other Linux distributions with some modifications.
  9. Can resolvconf be used with DHCP clients?
    Yes, resolvconf works well with DHCP clients and automatically updates DNS settings when the DHCP lease is renewed.
  10. Are there any alternatives to resolvconf for managing DNS settings on Linux?
    Yes, there are other tools like systemd-resolved and NetworkManager that can also manage DNS settings on Linux systems.

About The Author

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top