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 themylabserver.com
zone declaration, and change the file line.From: zone "mylabserver.com" IN { type master; file "/var/named/forward.db"; }; To: zone "mylabserver.com" 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
mylaberver.com
and the file containsoldcompany.edu
, 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 is10.10.1.XX
. That should be fixed as well.Verify the IP address of the ‘A’ record for
dns.mylabserver.com
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 mylabserver.com /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 dns.mylabserver.com localhost nslookup test1.mylabserver.com localhost nslookup db1.mylabserver.com localhost nslookup web3.mylabserver.com localhost
dns.mylabserver.com
should resolve to your local IP address.test1.mylabserver.com
should resolve to10.0.1.30
.db1.mylabserver.com
should resolve to10.0.1.78
.web3.mylabserver.com
should resolve to10.0.1.230
.