Changes

Jump to: navigation, search

OPS335 DNS Lab

115 bytes added, 12:34, 30 January 2016
no edit summary
===Purpose===
In this lab you will configure a Linux machine to be a DNS server for the rest of the machines in your intranet. You'll '''use <u>your </u> Seneca-ID as your domain with IP addresses in the range 192.168.X.1 - 192.168.X.254'''. The server will handle all queries for names in the <'''seneca-id>.org ''' domain and all reverse lookups for addresses in the given range of local IP numbers. The server will pass DNS queries for other names and addresses out to the Internet (i.e. to Seneca's DNS server).
Fully Qualified Domain Name IP Address
host.<'''seneca-id>'''.org 192.168.X.1 vm1.<'''seneca-ed>id'''.org 192.168.X.2 vm2.<'''seneca-id>'''.org 192.168.X.3 vm3.<'''seneca-id>'''.org 192.168.X.4
<br />
#Ensure you are connected to the Internet. Use Firefox to authenticate yourself so you can surf the web outside of the Seneca domain.
#Use yum to update your system if necessary:<br><pre>yum update</pre>
#If you have not already done so, permanently set the host name of the 'host' machine to "'''host.seneca-id.org'''" (without the < and >, they are just there to tell you put '''your seneca-id ''' there instead of the literal word ''seneca-id'').!
notify NO;
};
zone "<'''seneca-id>'''.org" {
type master;
file "mydb-for-<'''seneca-id>'''-org";
notify NO;
};
<ol><li value="2">Set the filesystem permissions for the above file to 644</li><li>Now edit '''/var/named/mydb-for-<'''seneca-id>'''-org''' and enter the following: But use your own X value where applicable. Note: if you copy-paste this code, there should be NO leading spaces before the first column of text (and [http://www.zytrax.com/books/dns/ch8/ here's a bit of documentation] to explain what the contents of this file are).</li></ol>
$TTL 3D
@ IN SOA vm1.<'''seneca-id>'''.org. webmaster.<'''seneca-id>'''.org.(
1 ; Serial
8H ; Refresh
1D ; Negative Cache TTL
);
@ IN NS vm1.<'''seneca-id>'''.org.
vm1 IN A 192.168.X.2
$TTL 3D
@ IN SOA vm1.<'''seneca-id>'''.org. webmaster.<seneda-id>.org. (
1 ; Serial
8H ; Refresh
1D ; Negative Cache TTL
);
@ IN NS vm1.<'''seneca-id>'''.org.
2 IN PTR vm1.<seneda-id>.org.
nameserver 192.168.X.2
search <'''seneca-id>'''.org
<ol><li value="6">Note that this is only temporary, and will go away when the machine reboots. There is another step later that will make this change permanently.</li><li>Start your DNS server with the command:<br><pre>systemctl start named.service</pre></li><li>Check that your name server is running:<br><pre>ps ax | grep named</pre> or <pre>systemctl status named.service</pre></li><li>Set the service to start automatically when this virtual machine boots.</li><li>When starting or restarting your name server view the log file (/var/log/messages) to ensure it started without error.</li><li>Try a few lookups:</li></ol>
host host.<'''seneca-id>'''.org host vm1.<'''seneca-id>'''.org host vm2.<'''seneca-id>'''.org host vm3.<seneda'''seneca-id>'''.org
host cbc.ca
<ol><li value="12">Now try a few reverse lookups:</li></ol>
#Edit the /etc/resolv.conf file and enter the following:
nameserver 192.168.X.2
domain <'''seneca-id>'''.org
<ol><li value="3">Now try the commands:</li></ol>
host host.<'''seneca-id>'''.org host vm1.<'''seneca-id>'''.org host vm2.<'''seneca-id>'''.org host vm3.<'''seneca-id>'''.org
host yahoo.ca
13,420
edits

Navigation menu