System Foundations: DNS Configuration
Lab 0x05 – DNS Configuration
Overview
The student will have the opportunity to configure a live DNS server for use on their local host-only network. This uses an OpenBSD system that requires the usage of slightly different command options and directories.
Part I – Preparing the Server for Classroom Use
Remote Server VIA the VirtualBox Console! (all future commands are via SSH)
Login to cybdns02
root/Passw0rd
Configuration Changes (use vim) and reboot
Change the name to cybdns01
/etc/myname
Change the Gateway to 192.168.56.1
/etc/mygate
Change the Interface to 192.168.56.11
/etc/em0.hostname
Change sshd to allow remote access via password
/etc/ssh/sshd_config ### PasswordAuthentication yes
shutdown -r now ### reboot
Part II – Query DNS Remotely
Open a terminal window for both the local machine and remote dns server (2 Terminal Windows)
Local Machine: Terminal
Remote Machine: ssh root@192.168.56.11
Place your local machine terminal on the top of your screen (drag and snap the window)
Place the remote server (virtual machine) at the bottom of your screen (drag and snap the window)
Local Machine:
Verify that DNS is working on the remote server.
dig cybernados.net @192.168.56.11
Query MX, NS, and TXT records from the server.
dig MX cybernados.net @192.168.56.11
Query a reverse address and find out where a company is hosted.
dig www.geneva.edu
dig -x 216.21.13.139
whois 216.21.13.139
Part III – Create a new zone (bank.com)
Remote Server:
Create a new domain named bank.com (2 steps)
Step 1:
cd /var/named/etc
vim named.conf
(copy and paste the information for chechnya.ru)
Step 2:
cd /var/named/master
cp zone.chechnya.ru zone.bank.com
vim zone.bank.com
### Rename the chechnya.ru entries to bank.com entries
:%s/chechnya.ru/bank.com/g
Restart the name service
rcctl restart isc_named
Local Machine:
Verify that DNS is working on the remote server.
dig bank.com @192.168.56.11
Query MX, NS, and TXT records from the server.
dig MX bank.com @192.168.56.11
or
for x in mx nx txt ; do dig $x bank.com @192.168.56.11 ; done
by Paul W. Poteete
linux foundation