Changes

Jump to: navigation, search

OPS335 Lab 3

13 bytes added, 14:46, 14 February 2020
Testing
=== /etc/named.conf ===
When you install Bind you'll get a default '''/etc/named.conf'''. Copy this file over to a backup location and empty the original (If you have SELinux enabled - do not delete or move the file as that will cause SELinux not to trust it). We will be writing one from scratch with only the following contents, but use your own X XX value where applicable.
<pre>
options {
directory "/var/named/";
allow-query {127.0.0.1; 192.168.XXX.0/24;};
#forwarders { 208.67.222.222; }; # This one works at home
forwarders { 10.102.100.21; }; # This one works at Seneca
=== Zone file ===
Now edit '''/var/named/mydb-for-yoursenecaid-ops''' and enter the following (use your own X XX value and domain where applicable).
<pre>
);
@ IN NS host.yoursenecaid.ops.
host IN A 192.168.XXX.1
</pre>
'''Perform the Following Steps:'''
# Note: Since you are going to save your firewall at the end of this step, you may wish to '''stop libvirtd''' and '''restart iptables ''' now in order to avoid saving the rules the libvirtd automatically adds to your INPUT, FORWARD, and POSTROUTING chains.
# You will need to update the firewall on '''host''' to allow <u>incoming</u> connections to '''port 53 for both UDP and TCP''' (i.e. the protocol and port that DNS uses).
# After you have updated your firewall, save your iptables rules.
{{Admon/important |Host Command Doesn't Work|Your machines do not know what domain to automatically add to the end of hostnames (or believe they are still in the seneca domain). The '''SEARCH''' (or DOMAIN) parameter in the '''ifcfg-eth0''' file is used to specify your own domain (eg. '''yoursenecaid.ops''' ).<br><br>}}
<li> Add the '''SEARCH''' (or DOMAIN) parameter for your '''ifcfg-eth0''' file as shown above for your '''host''' machine.</li>
<li> Issue the '''host ''' command for all vm names and host name to make certain that is works.</li>
<li>Also on all of the VMs, install and use a text-based browser called '''lynx''' to access the Web, and test-out to see if it works by issuing the command '''lynx''' with the URL as an argument.</li><li>Experiment with the following commands:<br>
<source>
As it stands now, your server will only handle forward resolution (converting names into addresses), but it is also sometimes necessary to convert addresses back into human readable names. For public IP addresses only your ISP can provide this service for you. For private networks you can set it up for your own organisation. But even if you're setting up reverse DNS on the public internet - you need to understand what information the ISP would require.
Issue the following commands on any of your VMs (once again replacing X XX with your network octet):
<source>
host 192.168.XXX.1host 192.168.XXX.2host 192.168.XXX.3host 192.168.XXX.4</source>
Each one should have failed because there is currently nothing that will handle this reverse lookup for you. This requires another zone on your server.
Add the following entry to your '''/etc/named.conf''' (once again replacing X XX with your own octet):
<pre>
zone "XXX.168.192.in-addr.arpa." {
type master;
file "mydb-for-192.168.XXX";
};
</pre>
1D ; Negative Cache TTL
);
@ IN NS host.yoursenecaid.ops.1 IN PTR host.yoursenecaid.ops.
</pre>
572
edits

Navigation menu