Unformatted text preview:

Lab 4 Implement DNS Server with Bind 9OverviewStep 0: Change your VM to use DHCP first!Step 1: Install BindStep2. Network ConfigurationStep 2 Trouble ShootingStep3. Edit DNS configuration filesStep4.Create and Edit Zone FilesStep5. Test DNSMore than likely at this point nslookup will have failed due to typos in the previous actions. There may be a misspelling in the contents of a file, in the name of a file, or in the changing of a configuration file. The rest of the lab will be spent tracking down those errors. Use the hints in the troubleshooting section and the end of this lab to help you debug the DNS.DeliverablesTrouble ShootingLab 4 Implement DNS Server with Bind 9OverviewThe fifth lab will implement a simple domain name server between the end clients host andthe top level domain (TLD) DNS server. In this lab the hades server DNS will serve as the TLD, and the student will implement their own sub domain server on their Debian VM. The system will then be tested by using another client. The sub domain DNS server will be used to resolve local domain names passed to it.Again, with this lab, familiarity with VI (or vim) and basic Linux command will be a definite asset in getting the lab done efficiently. The editing examples in this lab use vim as the editor of choice.Before starting the installation be sure your Debian VM is “clean”. It should start cleanly. Leaving Apache on it from the previous lab should be no problem; in fact if you leave Apache on the system you can now use the domain name to access the html files instead of typing the IP address. It wouldn’t hurt to reboot the actual (base) pc before starting the lab either.Also, keep in mind the VMs get assigned an IP address via DHCP. Part of this lab has you change from the IP address being assigned by DHCP to using a static assigned address (butyou will keep the address assigned originally by DHCP) The DHCP assigned address has a finite lifetime. The duration should last for the duration of the lab (that is the DHCP server within hades will not assign that IP address to another machine for a certain period of time), but if you stop the lab partway through and then resume it another day you should check to see if that address has been reassigned to another machine. If it has been, you must update the static address to a new address.Step 0: Change your VM to use DHCP first!Step 1: Install BindThe procedure to install BIND is similar to theprocedure used to install Apache for Lab 4:- Start the “Synaptic Package Manager” o Applications DebianApps System  Synaptic PackageManager- Find bind9 in the package list andinstall it (See Error: Reference source not found)o Use same procedure that youused for Apache in Lab 4Step2. Network ConfigurationStart a Terminal, once in Terminal- Change to “root” (su)Page 1 of 6Figure 1Lab 4 Implement DNS Server with Bind 9- Type following command:o #ifconfig. - Write down your VM's IP address. o For example, in Error: Reference source not found the IP address is 192.168.50.128. o Your address should be similar to the following: 172.16.1.220.From the VMs GUI use the “Networking” utility to modify your VM network configuration:- Desktop  Administration  Networking- Ensure the Connections tab is selected, then click Ethernet connection (in the big white box), then Propertieso Configuration: changefrom DHCP to Static IPaddresso IP address: use the value younoted from ifconfigaboveo Subnet mask: use default(255.255.0.0)o Gateway Address:172.16.1.1- If you get an error (“Could notenable…”) go to the troubleshooting section at the end of thisstep- Select the DNS tab to change theDNS configurationo In “Search Domains”  Delete hades.lab Add localdomain “DNS Servers” is your VM's IP address, because you will set up your VM to a DNS sub domain serverPage 2 of 6Figure 2Figure 5Figure 4Lab 4 Implement DNS Server with Bind 9Step 2 Trouble ShootingIf you see the Error screen (Error: Reference source not found) most likely it is do to the NIC not being active. Go to a (root) Terminal and type the following command:#ifconfig eth0 downThen return to the Networks Settings window and click Activate.Step3. Edit DNS configuration filesNotes:- The bind configuration files are located in /etc/bind (contains some default files)- The default zone files are located in /var/cache/bind/ (initially empty)- The name fxu.uncc is used as the default domain in the following examples; replace fxu with your own uid.Open a Terminal, change to “root”- Change to the /etc/bind directory- Back up the named.conf.local file before editing:Page 3 of 6Figure 3Figure 6Figure 7Lab 4 Implement DNS Server with Bind 9o cp named.conf.local named.conf.local.backup- Edit the named.conf.local file:o # vim /etc/bind/named.conf.local- See Error: Reference source not found as an example and enter information for two zones into the file:o For the first zone: Substitute your UID name for fxu in the exampleo For the second zone: Substitute your IP address (in reverse order for the top 3 addresses)for 50.168.192o Note that for the file names referenced in both zone definitions is not critical, youcan use any name. But using the above notation is following the typical naming conventions used for such files- Save and quit vimStep4.Create and Edit Zone FilesOpen a Terminal, change to “root”- Create the zone file for the first zoneo # vim /var/cache/bind/db.fxu.uncco Note: the file name must match the file name in the above named.conf.local file, change the name in the above command to create the proper named file- Modify the file to match Error: Reference source not foundo Be sure to change the names in the file to match your UID nameso Warning: Be sure to put the ending “.” on the names!- Set up a Domain and a Sub- domain in the zone file- Create the zone file for the second zoneo # vim/var/cache/bind/db.192o Again match the name of this file with the name of the second zone reference in the named.conf.local file- Edit this file to match the data shown inError: Reference source not foundo Again change the names to match your id: fxu to your UID The reverse addresses to match your reverse addresses- Save and quit vim- Reload bind with the following command: #/etc/init.d/bind9 reloadPage 4 of 6Figure 8Figure 9Lab 4 Implement DNS Server with Bind 9Step5. Test DNSUse nslookup to test DNS- Open Terminal, change to “root”- Type the following command:o #


View Full Document

UNCC ITIS 3100 - Lab 4 Implement DNS Server with Bind 9

Download Lab 4 Implement DNS Server with Bind 9
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lab 4 Implement DNS Server with Bind 9 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lab 4 Implement DNS Server with Bind 9 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?