Hey everyone and welcome back. So in the previous nugget we had just laid out what we actually
have planned for within this skill. What we're now going to do is to walk through some of
the basic configurations that we need to implement in order to get this DNS zone up and running.
Now the first thing that I will just point out is that you may notice that my little prompt
here is a little bit different. The reality is my virtual machine was giving me a little
bit of bother. So I've actually moved on to another Ubuntu virtual machine that I have
on my system. So the IP addressing is a little bit different. Let me just show you what I
have here. The address of this server right here is 192.168.0.44. So just be aware that
is a little bit of a difference if you're following along from a previous skill. Now the good news
is that that won't make much difference. The configuration will be exactly the same. So with
that said let's dive in and do this then. So what I'm going to do first is I'm going to install
bind9 onto this server as well as bind9utils. So if I just hit enter I will type in my password.
Okay and I'll just say yes as per usual we'll go through the installation and then I'll have
everything I need in order to make these configuration changes. Okay so like I said my IP address
here is 192.168.0.44. I actually want to tell my system that this is the address that I want to
use for DNS services. So pop quiz can you remember which configuration fail that we can use to
specify the DNS server we want to use. If you said resolve.conf you would be absolutely correct.
So I'll go into the Etsy directory and go into the resolve.conf file. So I'll just hit enter.
Perfect. So what I'm going to do is I'll just specify my DNS server here. So the keyword name
server followed by the IP address. This is no doubt going to be a different address for you.
Like I say my IP address on this local machine is 192.168.0.44 for your machine put in the IP
address of your system here. So I'll write those changes and I will exit out. Perfect. So what I
will do here is I'll just restart my networking services with that change made. So I'll say
pseudo service networking restart. Okay great. Now there are some configuration fails that we
have to have in play first. Some of this part will look familiar to you because it's going to relate
closely to what we saw in the previous skill with respect to creating our caching DNS server. So
what I'm going to do here is I'm going to go into a directory called Etsy and then bind. Once you
install bind you should have this directory here and within this directory we're going to have a
whole bunch of different configuration files. Now you may recall that we have this particular
file called named.conf and within this here in fact let me just nano it. We can see here it's just
going to include these particular directories and you could use this configuration file as one
monolithic configuration file but as we can see here it actually has been broken up into these
smaller configuration fails and it's these configuration fails that I'm going to modify right
now. The first one is going to be that very top one named.conf.option. So let's just go into that
one first. So I'll say pseudo nano and I will say named.conf.options. Perfect. So within here what
I'm going to do is I'm going to go down to the bottom here and I will tab in and I'll just
specify that we want to listen on and I'm going to specify an IPv4 address. So I'll just say 192.1680.44
that is the IP address of this server right here that is going to be doing the DNS request and I
will do my semicolon followed by my curly brace and then again we always want to end with a semicolon.
We talked about this in the previous skill and at the very bottom here what I'll also add in
as I will just add in my recursion yes and then semicolon again this should be very familiar from
the previous skill. So we'll exit out of this and now what we're going to do is we are actually going
to create our particular zones or in this case our particular zone should I say we're only going to
focus on one. Now one thing I just want to point out here what's going to happen. Now you may remember
from the previous skill we talked about what we could do with respect to a forward lookup as well
as a reverse lookup. So a forward lookup would be if I happen to say dig google.com and I would get
the IP addressing information back whereas if I had to specify the IP address information and instead
I got the domain name back that would be referred to as a reverse lookup. Again I'll just quickly show
you what that looks like. So I could use nslookup or dig or say for example the host command and I
can say host google.com and we can see the actual IP address this would be the forward request and
if I happen to say host 142 250 187 206 we would actually get information relating to the domain
of this IP address. Notice that this is called a pointer record and you'll notice this thing right
here in adder arpa. Now this might seem a little bit random what is that all about but just be aware
that this actually is crucially important with respect to the configurations that we are just
about to do. Now this domain this in adder arpa this is just part of the dns namespace and it's just
really something we have to remember and use. So with that said let's actually look at what we can
actually configure then. Now remember we went into namede.conf and then we saw this particular
configuration file namede.conf.local this is where we're going to specify our particular zones.
So let's go into that file right now then again I'll use my super user privileges because we are
in the etsy directory and I'll say namede.conf.local. Now right now this is pretty empty and what I'm
going to do is I'm going to create my very first zone so the example that I happened to mention
in the previous nugget was ipv0.com now I actually don't own this I have not registered this this is
just something I'm making up in the fly you can use anything you wish this is just something I am
configuring locally on my server right here so the way we can do this is we're going to use the
particular keyword zone this is how we can specify the zone that we want to create and then with thin
inverted commas I'm going to specify that zone name so like I say I'm going to say ipv0.com whereas
you maybe want to say blah blah random.com whatever it may be I have no idea choose whatever you want
so ipv0.com is going to be the domain that I am creating now the format of this goes as I'm going
to have a curly brace I will hit enter and then I'll use my tab key to tab in now what I'm now going
to do is I'm going to specify which type of server this is going to actually be right now now this
is when I want to talk to you about the role of a master and a slave server so really we can have
this idea of a master dns server as well as a slave dns server so the master is going to be the
authoritative server and really all the slave is going to do is going to get that dns zone information
from the master now we are going to configure a master dns server here we're actually not going
to focus on slave configuration but one thing to note here is that when we actually do create this
server and we create particular zones such as ipv0.com if we make a change to ipv0.com or we add in
new zones basically if we modify any of the dns configurations what that master is going to do
it's going to look at its configurations and see if it has any particular slaves if we do have a
slave we want to notify those slaves about the changes that we made on the master this is going
to happen automatically so really whenever we modify anything from the master those changes get
pushed down to the slaves and the slaves are going to be well apprised of those updates so really you
can just think of the master as the big boss in the relationship right here and the slave is really
just kind of taking orders and storing that information okay so check this out i'm going
to use the keyword type and then i'm going to specify am i creating a master or am i creating
a slave so i will say master here and then i'll do my semicolon now i'm going to tab in and now
what i want to do is i want to specify where my forward lookup configuration file is going to be
so i will use the keyword file and then inverted commas i'm going to specify the name of this
configuration file now this configuration file is going to be within the exit directory and in the
bind directory and then it can be anything that i wish to call it now generally speaking people
have some type of convention when creating these files usually you're going to end it with dot db as
it's going to act as a database configuration file but any type of convention you wish to use is
perfectly acceptable right here so all i will say here is i will say ipv0.com and i will end
with dot db again you don't have to do this but it does keep things nice and clear and as for every
single line we always want to be ending with this semicolon now i am going to specify an
additional configuration right here this is just with respect to who can actually provide dynamic
updates for master zones i don't want that to actually happen so i'm going to use the keyword
allow updates and i don't want anyone to be doing this i'll just say none and then i'll have my
semicolon i'll use my curly braces and then again at the end semicolon now here to close this off
i'm going to have a curly brace and then a semicolon again the syntax of this can be a little
bit confusing this is by far in my opinion the most challenging part of this is not making a mess
of the syntax for people who are not used to doing things such as programming and writing scripts all
of these funny characters can be a little bit intimidating but honestly it is the same process
you're repeating over and over and over again so simply put practice makes perfect now this is the
forward zone that we've done here we've created the name ipv0.com we specified we're going to be
using a master server here and we have specified a configuration file now this configuration file
right here does not exist yet i've specified the name but i am going to have to create this
configuration file and we'll get to look at that very very shortly for now though like i say this
is just the forward lookup we also now have to address the reverse lookup so the process is
very similar but we do have some slight modifications here so we're going to use the zone keyword once
again and now this part here is part of a naming convention this might be confusing now what i want
to show you here is the ip address that i'm using here is 192 1680.44 remember that now the way i'm
going to have to name this i kind of have to name this in reverse but i'm going to actually chop off
this last octet right here because this is going to be part of the host and not the network again
you may recall from lpik 1 when we talked about subnetting this is what we're talking about so
really look at your ip address chop off the last octet and then work backwards so the first octet
here we're going to use is this one here which is zero so i'm going to say zero and i'll move to the
next one so it'll be a 168 so 168 and then move to the next one 192 this is a reverse lookup we really
are doing things in reverse right here but that is not all remember that in adder arpa we talked about
that part of the domain also must exist right here so i'm going to say dot in hyphen a d dr periods
and then arpa and this is going to be the naming convention i am using here okay so again a little
bit confusing if you have not seen it before but this is exactly what we're going to be doing
so check this out then i'm going to open my quotation marks i will say 0.168.192 remember
we're working backwards dots in hyphen a d dr dots arpa and then i will close my quotation marks and
then i will open my curly braces for the actual configuration tier and again we're going to use
the type it's going to be a master and then i will have my semicolon i will tab in again
now i'm going to specify the configuration file for the reverse lookup so i will say file and it
will be in the xa directory within the bind folder and now i can call this file anything i wish but
to make it nice and clear people often just follow a similar convention so i will just say 0.168.192
and i'll make it a dot db file once again so this part here isn't actually crucial you can call it
anything you wish this part here though is actually a strong naming convention you definitely do want
to be having this configured correctly so at the very end i'm going to have to do my semicolon
and i'll just copy the same thing right here i will say allow updates and i will say none and then
semicolon curly brace semicolon and then again curly brace and semicolon and now what i will do
here is i will just save this file the named dot com dot local and then i will now escape so now what
we've done here is we have created our options configuration file and we have now generated
some zone information with respect to forward and reverse lookups but as it stands those files are
going to rely upon these particular configuration files which have not been yet created and it's
the creation of these files as well as the particular format and syntax of these files
that we're going to be looking at next so how about we dive into those configuration files
next so that's what's coming up but for now i hope this has been informative for you and i'd like to
thank you for viewing