Setup your local DNS server using Webmin.

Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
"The best Linux newsletter on the web"

Today, you will learn how to setup your local DNS server using Webmin

Webmin is a powerful and flexible web-based server management control panel for Unix-like systems. Webmin allows the user to configure operating system internals, such as users, disk quotas, services, or configuration files, and modify and control open-source apps, such as the Apache HTTP Server, PHP, or MySQL.


  • OS: Ubuntu 22.04
  • Webmin
  • DNS Server

Step 1: Install Ubuntu OS and Update

# sudo apt update && upgrade -y

Step 2: Install Webmin

Install dependencies packages

# sudo apt install software-properties-common apt-transport-https

Enable Webmin repository

Add Webmin’s GPG key

# sudo wget -q -O- | sudo apt-key add -

Manually add Webmin repository

# sudo add-apt-repository "deb [arch=amd64] sarge contrib"

Install Webmin

# sudo apt install webmin

Check the status of Webmin

# systemctl status webmin

Allow webmin port 10000 in the firewall

# sudo ufw allow 10000/tcp

# sudo ufw reload

set the webmin password for root

# sudo /usr/share/webmin/ /etc/webmin root [new password]

access thourgh web browser


login username: root and your configured password

Step 3: Setup local DNS server using Webmin

Open Webmin -> Unused Modules -> Bind DNS -> Install now

Setup your local DNS server using Webmin.
Setup your local DNS server using Webmin.

a. Create an access list and allow your infrastructure network subnets according to your design

Configure global configuration options

click on edit config file

configure as below

options {
        directory "/var/cache/bind";

        recursion yes;
        allow-recursion { localhost; allowed-subnet; };
        listen-on port 53 { localhost;; };
        allow-query { localhost; allowed-subnet; };
        allow-transfer { none; };
        // If there is a firewall between you and nameservers you want
        // to talk to, you may need to fix the firewall to allow multiple
        // ports to talk.  See

        // If your ISP provided one or more IP addresses for stable
        // nameservers, you probably want to use them as forwarders.
        // Uncomment the following block, and insert the addresses replacing
        // the all-0's placeholder.

           forwarders {

        // If BIND logs error messages about the root key being expired,
        // you will need to update your keys.  See
        dnssec-validation auto;
        auth-nxdomain no;
        listen-on-v6 { none; };
  • allowed-subnet is the ACL we have created
  • is the server IP
  • is the default gateway/DNS of the network

Check the configuration using “Check BIND Config”

Create Zones

Create master zone

click on create master zone from the zone-list menu

Create Reverse Zone Statement

Return to zone list -> create master zone select Reverse (Address to Name)

Setup the A records

goto to the master zone created above and click addresses

now check the bind configuration

Configure the DNS IP in your laptop/Desktop to verify.


Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
"The best Linux newsletter on the web"
Solution Architect. passionate about exploring, deploying, and writing about new technologies related to systems, networks, cloud, and microservices.


Please enter your comment!
Please enter your name here

Latest articles

Join us on Facebook