Lab: Installing BIND on Ubuntu
Budget: $10 – $30 USD
CNIT 40 Homework: Configuring BIND on
Ubuntu
Note: this lab is derived from a lab developed by Sam Bowne
What You Need for This Project
• The Ubuntu VM as installed in previous homework
Purpose
Make a DNS server with BIND on Linux.
1. Starting Ubuntu VM and Adjusting Networking
Start the Ubuntu VM in VMware
Log in to the VM
Open Terminal
Type in ifconfig to check your current IP address
If you’re using the default Ubuntu 18.04 LTS desktop version that I specified in the
earlier assignment, you’ll get an error message about the “Command ‘ifconfig’ not
found” this is because ifconfig is deprecated (it works fine for us, though). Install by
typing
sudo apt update && sudo apt upgrade
sudo apt install net-tools
2. Setting the Ubuntu VM to Bridged or NAT Networking
In the VMware menu (host machine, not the Ubuntu VM), go to VM > Settings
In the "Virtual Machine Settings" box, on the left side, click "Network Adapter".
On the right side, click "Bridged: Connect directly to the physical network" or
"NAT". Click OK.
In Terminal, type ifconfig Compare your new IP address against the IP address of
your VM as determined in the earlier step.
It may be necessary to refresh your IP address. To refresh your IP address, in Terminal,
type dhclient -v
Finding your Ubuntu Linux VM's IP Address
Once again, in the Terminal window, execute ifconfig
You should see your IP address, as shown below:
Testing the Internet Connection
In the Terminal window, execute this command:
ping google.com
Make
sure the terminal window on Ubuntu is visible showing these items:
•54.68.10.30
•SERVER: 127.0.0.1#53(127.0.0.1)
YOU MUST SUBMIT A FULL-DESKTOP IMAGE INCLUDING THE HOST
MACHINE FOR CREDIT!
Submit the image on Canvas.
Viewing the Server Cache
No Client Cache
Ubuntu Linux does not cache DNS entries by default at the client level the way
Windows does, so there's no client cache to observe. We’ll look at the cache in our new
BIND server.
In the Terminal window, execute these commands:
sudo rndc dumpdb
less /var/cache/bind/named_dump.db
Scroll through the file and find the entry for ccsf.edu, as shown below.
You should see ccsf.edu followed several lines later by the A record showing the address
of 54.68.10.30
NOTE: if you don’t see an entry for ccsf.edu, close less (just type the letter q), then in
the terminal, type dig @127.0.0.1 ccsf.edu once again, then reopen
named_dump.db
DELIVERABLE #2: Server Cache
Take a screenshot of the output that includes output similar to the image above. Make
sure the terminal window on Ubuntu is visible showing these two items:
• ccsf.edu
• 54.68.10.30
YOU MUST SUBMIT A FULL-DESKTOP IMAGE INCLUDING THE HOST
MACHINE FOR CREDIT!
Submit the image on Canvas
Exit less by typing the letter q
Viewing DNS Delegation
In the Terminal window, execute this command:
dig @127.0.0.1 ccsf.edu +trace
You should see four sections, as shown below:
•13 root nameservers labeled "." on the left
•13 "edu." nameservers
•4 "ccsf.edu." nameservers
•The answer (A record): 54.68.10.30
•Note that the above nameserver counts and A record are current as of
November 2020. Your results may differ depending on later configuration
changes.
Screenshot continued below
DELIVERABLE #3: trace and delegation
Take a screenshot of the output that includes output similar to the image above. Make
sure the terminal window on Ubuntu is visible showing the four items listed above.
If your screen resolution is small, you may need to capture two images to get it all.
YOU MUST SUBMIT A FULL-DESKTOP IMAGE INCLUDING THE HOST
MACHINE FOR CREDIT!
Submit image(s) on Canvas
DELIVERABLES RECAP:
- DELIVERABLE #1: Testing resolver
- DELIVERABLE #2: Server Cache
- DELIVERABLE #3: trace and delegation
Ubuntu
Note: this lab is derived from a lab developed by Sam Bowne
What You Need for This Project
• The Ubuntu VM as installed in previous homework
Purpose
Make a DNS server with BIND on Linux.
1. Starting Ubuntu VM and Adjusting Networking
Start the Ubuntu VM in VMware
Log in to the VM
Open Terminal
Type in ifconfig to check your current IP address
If you’re using the default Ubuntu 18.04 LTS desktop version that I specified in the
earlier assignment, you’ll get an error message about the “Command ‘ifconfig’ not
found” this is because ifconfig is deprecated (it works fine for us, though). Install by
typing
sudo apt update && sudo apt upgrade
sudo apt install net-tools
2. Setting the Ubuntu VM to Bridged or NAT Networking
In the VMware menu (host machine, not the Ubuntu VM), go to VM > Settings
In the "Virtual Machine Settings" box, on the left side, click "Network Adapter".
On the right side, click "Bridged: Connect directly to the physical network" or
"NAT". Click OK.
In Terminal, type ifconfig Compare your new IP address against the IP address of
your VM as determined in the earlier step.
It may be necessary to refresh your IP address. To refresh your IP address, in Terminal,
type dhclient -v
Finding your Ubuntu Linux VM's IP Address
Once again, in the Terminal window, execute ifconfig
You should see your IP address, as shown below:
Testing the Internet Connection
In the Terminal window, execute this command:
ping google.com
Make
sure the terminal window on Ubuntu is visible showing these items:
•54.68.10.30
•SERVER: 127.0.0.1#53(127.0.0.1)
YOU MUST SUBMIT A FULL-DESKTOP IMAGE INCLUDING THE HOST
MACHINE FOR CREDIT!
Submit the image on Canvas.
Viewing the Server Cache
No Client Cache
Ubuntu Linux does not cache DNS entries by default at the client level the way
Windows does, so there's no client cache to observe. We’ll look at the cache in our new
BIND server.
In the Terminal window, execute these commands:
sudo rndc dumpdb
less /var/cache/bind/named_dump.db
Scroll through the file and find the entry for ccsf.edu, as shown below.
You should see ccsf.edu followed several lines later by the A record showing the address
of 54.68.10.30
NOTE: if you don’t see an entry for ccsf.edu, close less (just type the letter q), then in
the terminal, type dig @127.0.0.1 ccsf.edu once again, then reopen
named_dump.db
DELIVERABLE #2: Server Cache
Take a screenshot of the output that includes output similar to the image above. Make
sure the terminal window on Ubuntu is visible showing these two items:
• ccsf.edu
• 54.68.10.30
YOU MUST SUBMIT A FULL-DESKTOP IMAGE INCLUDING THE HOST
MACHINE FOR CREDIT!
Submit the image on Canvas
Exit less by typing the letter q
Viewing DNS Delegation
In the Terminal window, execute this command:
dig @127.0.0.1 ccsf.edu +trace
You should see four sections, as shown below:
•13 root nameservers labeled "." on the left
•13 "edu." nameservers
•4 "ccsf.edu." nameservers
•The answer (A record): 54.68.10.30
•Note that the above nameserver counts and A record are current as of
November 2020. Your results may differ depending on later configuration
changes.
Screenshot continued below
DELIVERABLE #3: trace and delegation
Take a screenshot of the output that includes output similar to the image above. Make
sure the terminal window on Ubuntu is visible showing the four items listed above.
If your screen resolution is small, you may need to capture two images to get it all.
YOU MUST SUBMIT A FULL-DESKTOP IMAGE INCLUDING THE HOST
MACHINE FOR CREDIT!
Submit image(s) on Canvas
DELIVERABLES RECAP:
- DELIVERABLE #1: Testing resolver
- DELIVERABLE #2: Server Cache
- DELIVERABLE #3: trace and delegation
Related categories:
Virtual Machines