Bind 9.9 configuration guide – opensuse / vSphere lab

Share This:

vCentre dns, home lab.

This Configuration is written for a local vSphere lab, but same principles apply for any small/medium size company or if you are starting with BIND.

 

I highly recommend some reading about DNS and bind before going into configuration, it’s very easy to make a tiny mistake and you’d need to have some understanding of basic networking concepts to effectively fix it and get on with it. Knowing your local network is key, the IP addresses you see may be different for your local network, which could be 192.168.0.0/24. My 172.16.209.1/24 is private network just for my lab environment using Vmware Fusion on a Mac.

My favourite distro is SLES, in this example I used opensuse as it’s free to download and use.

Each release of opensuse later becomes the major release of SLES anyway. – FYI

First of install bind:

Installer creates some files and directories under /var/lib/named

Before going any further make sure you enable DNS on your firewall, UDP 53, this is always missed from most of the guides you come across.

Now we have to create forward and reverse zone files , I like to put them in /master subdirectory of /var/lib/named. I also like to name my zone files with db prefix rather than zone. , such as db.vlab.com etc)

Two zones and source code:

 

Here you may notice entries for ESXi hosts, vCentre server and NFS server respectively.

Reverse lookup zone:

 

Now we have to make changes to bind configuration file /etc/named.conf

Add newly created zones:

Change allow-query to:

Change Listen on to:

We can now check the configuration file for inconsistencies:

No output is good, don’t panic 🙂

We can also check the zones:

Now we can restart bind:

Lastly edit /etc/resolv.conf and provide your own IP so that the server query only itself.

Time to test some entries:

Then reserve lookup:

Good stuff.

Enjoy.

Leave a comment

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

Time limit is exhausted. Please reload the CAPTCHA.