Skip to content

Ubuntu DNS Server for VMware environment

While I was rebuilding my homelab from scratch , I thought that would be a good idea to setup the DNS server for my VMware environment on a Ubuntu server.

So I installed Ubuntu server on a VM and after the installation finished I did a sudo apt-get update && sudo apt-get upgrade  and then installed BIND to configure DNS sudo apt-get install bind9.

Once installed go to /etc/bind and here add the zone in named.conf.local


// Do any local configuration here

// Consider adding the 1918 zones here, if they are not used in your
// organization
//include “/etc/bind/zones.rfc1918”;
zone “mdc.local”{
type master;
file “/etc/bind/zones/mdc.local.db”;
zone “”{
type master;
file “/etc/bind/zones/”;

Now you need to create the zone files:

mkdir /etc/bind/zones

vim /etc/bind/zones/mdc.local.db

vim /etc/bind/zones/ 

This is how it should look like:


@ 1D IN SOA srv-dns.mdc.local. hostmaster.mdc.local. (
2002022401 ; serial
3H ; refresh
15 ; retry
1w ; expire
3h ; minimum
mdc.local. IN NS srv-dns.mdc.local.

srv-dns IN A
vcsa IN A
esxi01 IN A
esxi02 IN A
esxi03 IN A

@ IN SOA srv-dns.mdc.lab.local. admin.mdc.local. (

IN NS srv-dns.mdc.local
10 IN PTR mdc.local
20 IN PTR vcsa.mdc.local
17 IN PTR esxi01.mdc.local
18 IN PTR esxi02.mdc.local
19 IN PTR esxi03.mdc.local

After you configured these you will have to edit /etc/resolv.conf as well to add your domain name and IP:

search mdc.local

Now since all the configuration is done you will need to restart BIND using service bind9 restart.

Published inGeneral

One Comment

  1. joseph cabayacruz joseph cabayacruz

    when you fire up a DNS server ubuntu what is the guest specs you need to put on that vm Guest

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.