How to Install & Manage DNS server using Webmin?

Here assuming that, the Webmin already installed. If not then can follow our webmin install tutorial.

For Manage DNS by Webmin we have to do 2 things :

  • Install DNS server

  • Allow DNS server to resolve from outside

  • Add Bind DNS into Firewall

  • Manage DNS zone by Webmin


Install DNS server

  • Login to Webmin

  • Under the Un-used Modules find BIND DNS Server click on it.

  • Now you should see the BIND DNS Server panel.

  • From that panel click on Install Now

  • The Installation process will start, wait until the Installation complete

  • Click the Return to BIND DNS Server for back to the DNS settings.

  • Congratulations we are successfully Installed the BIND DNS on the server using Webmin.

Refresh Modules

  • From left menu click on Refresh Modules it will rearrange the navigation

  • Now you should see the BIND DNS Server from Un-used Modules >> BIND DNS Server to Servers >> BIND DNS Server


Add Bind DNS server to startup

  • Login to your server by SSH

  • Run the below command

systemctl enable named


Manipulate the DNS server

  • For start the BIND DNS Server click Servers >> BIND DNS Server

  • Top right cornet you will find a play button, click on it for start the DNS

  • For Stop, Apply Configuration you will find those Top right cornet as well after the DNS server started.


Allow DNS server to resolve from outside

Assumed that the Webmin DNS server IP is 192.168.150

  • Click to Networking >> FirewallD from left navigation

  • Click on Edit Config file

  • Find the line listen-on port 53 { 127.0.0.1;}; & update to listen-on port 53 { 127.0.0.1; 192.168.1.150;};. Here we added our server IP for listen from outside from the server.

  • Find the line allow-query { localhost; }; & update to allow-query { localhost; any;};. Here we added any for allow query from anywhere.


Add Bind DNS Service into Firewall

  • Click to Networking >> FirewallD from left navigation

  • Now find the button from second row called Add allowed service

  • From Service to allow dropdown find the DNS and select it.

  • Click on Create button

  • From the FirewallD panel click on Apply Configuration

  • Successfully added the DNS port into the firewall.


Manage DNS zone by Webmin

Assume that our main domain is hmtmcse.xyz & we want to add entry for vm.hmtmcse.xyz & IP will be 192.168.1.210

  • Login to Webmin

  • From left navigation under the Servers find BIND DNS Server click on it.


Add the master record of the domain

  • Click on Create master zone

  • Fill the Domain name / Network input box with the domain hmtmcse.xyz

  • Fill the Email address input box with an email address, for example hmtmcse.com@gmail.com

  • Click on Create.


Add record of a domain

  • Now we are going to add vm.hmtmcse.xyz

  • Again click on the left menu called Servers >> BIND DNS Server

  • Under the section Existing DNS Zones you will find the record called hmtmcse.xyz, click on it

  • Now you are seeing the Edit Master Zone panel, from here click on Address

  • Fill the Name text box using vm & Address text box using the IP address 192.168.1.210

  • Click on Create button.

  • Successfully added the record.


Check the newly added record

Assumed that the Webmin DNS server IP is 192.168.150

  • Login to the server and type the below commands

nslookup vm.hmtmcse.xyz 192.168.150
  • If the nslookup command is not found please run the below command for CentOS 8

dnf install -y bind-utils
  • If everything configured correctly and step by step which we have shown then you can see the ip address from the vm.hmtmcse.xyz