Troubleshooting a DNS Zone

15 minutes
  • 2 Learning Objectives

About this Hands-on Lab

Understanding a service well enough to troubleshoot it is an important skill as a System Administrator. In this lab, we’ll go over troubleshooting BIND zone files.

This lab environment will start two linux servers, although you will only use the one labeled “Lab Server” to complete this lab. Due to security settings in the Cloud Playground, DNS resolution between nodes isn’t possible in that environment. The second server, named “Practice Server” is configured only as a sandbox for students to follow along with activities from other lessons in this section since a two node lab environment is needed for some tasks.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Use /var/named/new-forward.db as a new zone file moving forward.

The first thing we need to do is set up named to use this new zone file. Edit /etc/named.conf, find the zone declaration, and change the file line.

zone "" IN {
    type master;
    file "/var/named/forward.db";

zone "" IN {
    type master;
    file "/var/named/new-forward.db";

Second, we need to edit the new-forward.db zone file and make sure it’s correct.

Open it with your favorite editor and take a look.

The first thing to notice is the domain that the file is set to SOA for. Since we’re using and the file contains, we need to change that in every location.

Additionally, the IP scheme for the zone file doesn’t look right – our IP scheme is 10.0.1.XX while the one in the file is 10.10.1.XX. That should be fixed as well.

Verify the IP address of the ‘A’ record for is correct.

Verify that all FQDNs have a . at the end.

Once we have done all of that, we can verify that the file is correct by running:

named-checkzone /var/named/new-forward.db

When we get a good result there, we can run:

systemctl restart named

Finally, we can check our work using nslookup in the next task.

Verify that dns, test1, db1, and web3 all resolve to the correct addresses.

Use the following commands to check what address a name resolves to:

nslookup localhost
nslookup localhost
nslookup localhost
nslookup localhost
  • should resolve to your local IP address.
  • should resolve to
  • should resolve to
  • should resolve to

Additional Resources

You are your company's DNS administrator. As part of a merger, you've been tasked with bringing the DNS from the old company into your DNS setup. The server has named running on it, with a functional zone file. In /var/named there is a new-forward.db file that contains information for a new zone file.

Use the new-forward.db file to build a new zone file to use moving forward. Make sure that,, and all resolve correctly.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?