This implementation is done on Windows 10 Student Edition and VMPlayer
Ubuntu Machine configuration on VMPlayer.
Download the Ubuntu 14.04 .iso installation file from this link
On your VMPlayer click Create a New Virtual Machine and choose the location of downloaded .iso file from your local machine.
Hope your installations are finished and Now your virtual machine is ready!
Now Logon to your Ubuntu Machine.
Fine before we are setting up DNS we need to update the package lists from the repositories and updates then to get information on the newest versions of package and their dependencies.
The we need to install bind9 on the VM (Virtual Machine)
Update the forwarders to set the google default DNS servers on the file /etc/bind/named.conf.options
to configure this file sudo nano /etc/nano/named.conf.options and un comment and update the forwarders as follow,
Here 188.8.131.52 and 184.108.40.206 are google public DNS servers.
Restart the bind9 service as sudo service bind9 restart
Now edit the /etc/resolve.conf file and update nameserver 127.0.0.1
Then you feel the difference by using the command of dig somewebsite.com. Here from the following two snapshots observe the last line, which shows you how long your DNS request time is reduced.
Now lets maps some IPs to domains by editing the zones. for these setting follw steps below
DOMAIN : hellodns.com
SERVER IP : 192.168.20.5
SERVER HOST NAME : ns.hellodns.com
WEB SERVER IP : 192.168.20.10
We are going to setting up the following DNS to IPs, for hellodns.com by copying db.local conf file and change the default db.hellodns.com
Now open db.hellodns.com and update as follow.
Set the reverse zone file as follow
sudo cp /etc/bind/db.127 /etc/bind/db.192
then edit sudo nano /etc/bind/db.192
Now we set the last 3 sections of IP as follow
sudo nano /etc/bind/named.conf.local
Now using the nslookup command to check your dns setting is work fine or not.
But may be you cannot access these dns server from your local machine. for that you need to configure your VMPlayers Network adapter settings to Bridge connections with private IPs.
Thank you for your reading.