1
00:00:00,000 --> 00:00:17,719
Hey everyone and welcome back. So in the previous nugget we had just laid out what we actually

2
00:00:17,719 --> 00:00:22,359
have planned for within this skill. What we're now going to do is to walk through some of

3
00:00:22,359 --> 00:00:29,560
the basic configurations that we need to implement in order to get this DNS zone up and running.

4
00:00:29,559 --> 00:00:34,399
Now the first thing that I will just point out is that you may notice that my little prompt

5
00:00:34,399 --> 00:00:38,839
here is a little bit different. The reality is my virtual machine was giving me a little

6
00:00:38,839 --> 00:00:44,000
bit of bother. So I've actually moved on to another Ubuntu virtual machine that I have

7
00:00:44,000 --> 00:00:48,280
on my system. So the IP addressing is a little bit different. Let me just show you what I

8
00:00:48,280 --> 00:00:55,599
have here. The address of this server right here is 192.168.0.44. So just be aware that

9
00:00:55,679 --> 00:01:00,320
is a little bit of a difference if you're following along from a previous skill. Now the good news

10
00:01:00,320 --> 00:01:05,320
is that that won't make much difference. The configuration will be exactly the same. So with

11
00:01:05,320 --> 00:01:10,040
that said let's dive in and do this then. So what I'm going to do first is I'm going to install

12
00:01:10,040 --> 00:01:18,240
bind9 onto this server as well as bind9utils. So if I just hit enter I will type in my password.

13
00:01:18,240 --> 00:01:23,359
Okay and I'll just say yes as per usual we'll go through the installation and then I'll have

14
00:01:23,679 --> 00:01:30,359
everything I need in order to make these configuration changes. Okay so like I said my IP address

15
00:01:30,359 --> 00:01:38,039
here is 192.168.0.44. I actually want to tell my system that this is the address that I want to

16
00:01:38,039 --> 00:01:43,760
use for DNS services. So pop quiz can you remember which configuration fail that we can use to

17
00:01:43,760 --> 00:01:50,200
specify the DNS server we want to use. If you said resolve.conf you would be absolutely correct.

18
00:01:50,240 --> 00:01:57,280
So I'll go into the Etsy directory and go into the resolve.conf file. So I'll just hit enter.

19
00:01:57,280 --> 00:02:02,960
Perfect. So what I'm going to do is I'll just specify my DNS server here. So the keyword name

20
00:02:02,960 --> 00:02:07,840
server followed by the IP address. This is no doubt going to be a different address for you.

21
00:02:07,840 --> 00:02:15,560
Like I say my IP address on this local machine is 192.168.0.44 for your machine put in the IP

22
00:02:15,599 --> 00:02:21,560
address of your system here. So I'll write those changes and I will exit out. Perfect. So what I

23
00:02:21,560 --> 00:02:26,599
will do here is I'll just restart my networking services with that change made. So I'll say

24
00:02:26,599 --> 00:02:32,840
pseudo service networking restart. Okay great. Now there are some configuration fails that we

25
00:02:32,840 --> 00:02:37,920
have to have in play first. Some of this part will look familiar to you because it's going to relate

26
00:02:37,920 --> 00:02:43,800
closely to what we saw in the previous skill with respect to creating our caching DNS server. So

27
00:02:43,840 --> 00:02:50,280
what I'm going to do here is I'm going to go into a directory called Etsy and then bind. Once you

28
00:02:50,280 --> 00:02:55,439
install bind you should have this directory here and within this directory we're going to have a

29
00:02:55,439 --> 00:03:00,680
whole bunch of different configuration files. Now you may recall that we have this particular

30
00:03:00,680 --> 00:03:06,960
file called named.conf and within this here in fact let me just nano it. We can see here it's just

31
00:03:06,960 --> 00:03:13,080
going to include these particular directories and you could use this configuration file as one

32
00:03:13,240 --> 00:03:19,160
monolithic configuration file but as we can see here it actually has been broken up into these

33
00:03:19,160 --> 00:03:23,480
smaller configuration fails and it's these configuration fails that I'm going to modify right

34
00:03:23,480 --> 00:03:29,960
now. The first one is going to be that very top one named.conf.option. So let's just go into that

35
00:03:29,960 --> 00:03:37,640
one first. So I'll say pseudo nano and I will say named.conf.options. Perfect. So within here what

36
00:03:37,640 --> 00:03:42,600
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

37
00:03:42,599 --> 00:03:50,680
specify that we want to listen on and I'm going to specify an IPv4 address. So I'll just say 192.1680.44

38
00:03:50,680 --> 00:03:56,519
that is the IP address of this server right here that is going to be doing the DNS request and I

39
00:03:56,519 --> 00:04:03,319
will do my semicolon followed by my curly brace and then again we always want to end with a semicolon.

40
00:04:03,319 --> 00:04:08,840
We talked about this in the previous skill and at the very bottom here what I'll also add in

41
00:04:08,840 --> 00:04:14,759
as I will just add in my recursion yes and then semicolon again this should be very familiar from

42
00:04:14,759 --> 00:04:19,879
the previous skill. So we'll exit out of this and now what we're going to do is we are actually going

43
00:04:19,879 --> 00:04:25,879
to create our particular zones or in this case our particular zone should I say we're only going to

44
00:04:25,879 --> 00:04:31,879
focus on one. Now one thing I just want to point out here what's going to happen. Now you may remember

45
00:04:31,879 --> 00:04:37,000
from the previous skill we talked about what we could do with respect to a forward lookup as well

46
00:04:37,079 --> 00:04:45,399
as a reverse lookup. So a forward lookup would be if I happen to say dig google.com and I would get

47
00:04:45,399 --> 00:04:52,759
the IP addressing information back whereas if I had to specify the IP address information and instead

48
00:04:52,759 --> 00:04:58,519
I got the domain name back that would be referred to as a reverse lookup. Again I'll just quickly show

49
00:04:58,519 --> 00:05:03,720
you what that looks like. So I could use nslookup or dig or say for example the host command and I

50
00:05:03,720 --> 00:05:09,160
can say host google.com and we can see the actual IP address this would be the forward request and

51
00:05:09,160 --> 00:05:19,320
if I happen to say host 142 250 187 206 we would actually get information relating to the domain

52
00:05:19,320 --> 00:05:25,480
of this IP address. Notice that this is called a pointer record and you'll notice this thing right

53
00:05:25,480 --> 00:05:32,360
here in adder arpa. Now this might seem a little bit random what is that all about but just be aware

54
00:05:32,439 --> 00:05:37,639
that this actually is crucially important with respect to the configurations that we are just

55
00:05:37,639 --> 00:05:44,520
about to do. Now this domain this in adder arpa this is just part of the dns namespace and it's just

56
00:05:44,520 --> 00:05:51,639
really something we have to remember and use. So with that said let's actually look at what we can

57
00:05:51,639 --> 00:05:58,439
actually configure then. Now remember we went into namede.conf and then we saw this particular

58
00:05:58,439 --> 00:06:05,800
configuration file namede.conf.local this is where we're going to specify our particular zones.

59
00:06:05,800 --> 00:06:10,519
So let's go into that file right now then again I'll use my super user privileges because we are

60
00:06:10,519 --> 00:06:18,199
in the etsy directory and I'll say namede.conf.local. Now right now this is pretty empty and what I'm

61
00:06:18,199 --> 00:06:25,000
going to do is I'm going to create my very first zone so the example that I happened to mention

62
00:06:25,079 --> 00:06:32,439
in the previous nugget was ipv0.com now I actually don't own this I have not registered this this is

63
00:06:32,439 --> 00:06:36,920
just something I'm making up in the fly you can use anything you wish this is just something I am

64
00:06:36,920 --> 00:06:42,519
configuring locally on my server right here so the way we can do this is we're going to use the

65
00:06:42,519 --> 00:06:49,720
particular keyword zone this is how we can specify the zone that we want to create and then with thin

66
00:06:49,720 --> 00:06:56,600
inverted commas I'm going to specify that zone name so like I say I'm going to say ipv0.com whereas

67
00:06:56,600 --> 00:07:03,400
you maybe want to say blah blah random.com whatever it may be I have no idea choose whatever you want

68
00:07:03,400 --> 00:07:10,360
so ipv0.com is going to be the domain that I am creating now the format of this goes as I'm going

69
00:07:10,360 --> 00:07:17,960
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

70
00:07:17,959 --> 00:07:23,560
to do is I'm going to specify which type of server this is going to actually be right now now this

71
00:07:23,560 --> 00:07:30,279
is when I want to talk to you about the role of a master and a slave server so really we can have

72
00:07:30,279 --> 00:07:37,799
this idea of a master dns server as well as a slave dns server so the master is going to be the

73
00:07:37,799 --> 00:07:45,000
authoritative server and really all the slave is going to do is going to get that dns zone information

74
00:07:45,079 --> 00:07:50,439
from the master now we are going to configure a master dns server here we're actually not going

75
00:07:50,439 --> 00:07:57,079
to focus on slave configuration but one thing to note here is that when we actually do create this

76
00:07:57,079 --> 00:08:05,959
server and we create particular zones such as ipv0.com if we make a change to ipv0.com or we add in

77
00:08:05,959 --> 00:08:12,600
new zones basically if we modify any of the dns configurations what that master is going to do

78
00:08:12,600 --> 00:08:18,520
it's going to look at its configurations and see if it has any particular slaves if we do have a

79
00:08:18,520 --> 00:08:24,120
slave we want to notify those slaves about the changes that we made on the master this is going

80
00:08:24,120 --> 00:08:29,400
to happen automatically so really whenever we modify anything from the master those changes get

81
00:08:29,400 --> 00:08:34,680
pushed down to the slaves and the slaves are going to be well apprised of those updates so really you

82
00:08:34,680 --> 00:08:41,399
can just think of the master as the big boss in the relationship right here and the slave is really

83
00:08:41,399 --> 00:08:46,039
just kind of taking orders and storing that information okay so check this out i'm going

84
00:08:46,039 --> 00:08:52,120
to use the keyword type and then i'm going to specify am i creating a master or am i creating

85
00:08:52,120 --> 00:08:58,439
a slave so i will say master here and then i'll do my semicolon now i'm going to tab in and now

86
00:08:58,439 --> 00:09:04,840
what i want to do is i want to specify where my forward lookup configuration file is going to be

87
00:09:04,840 --> 00:09:10,519
so i will use the keyword file and then inverted commas i'm going to specify the name of this

88
00:09:10,519 --> 00:09:15,480
configuration file now this configuration file is going to be within the exit directory and in the

89
00:09:15,480 --> 00:09:21,319
bind directory and then it can be anything that i wish to call it now generally speaking people

90
00:09:21,319 --> 00:09:27,559
have some type of convention when creating these files usually you're going to end it with dot db as

91
00:09:27,559 --> 00:09:33,879
it's going to act as a database configuration file but any type of convention you wish to use is

92
00:09:33,879 --> 00:09:40,679
perfectly acceptable right here so all i will say here is i will say ipv0.com and i will end

93
00:09:40,679 --> 00:09:46,600
with dot db again you don't have to do this but it does keep things nice and clear and as for every

94
00:09:46,600 --> 00:09:52,759
single line we always want to be ending with this semicolon now i am going to specify an

95
00:09:52,759 --> 00:09:59,559
additional configuration right here this is just with respect to who can actually provide dynamic

96
00:09:59,559 --> 00:10:04,679
updates for master zones i don't want that to actually happen so i'm going to use the keyword

97
00:10:04,679 --> 00:10:09,639
allow updates and i don't want anyone to be doing this i'll just say none and then i'll have my

98
00:10:09,639 --> 00:10:16,759
semicolon i'll use my curly braces and then again at the end semicolon now here to close this off

99
00:10:16,759 --> 00:10:22,839
i'm going to have a curly brace and then a semicolon again the syntax of this can be a little

100
00:10:22,839 --> 00:10:28,759
bit confusing this is by far in my opinion the most challenging part of this is not making a mess

101
00:10:28,759 --> 00:10:34,360
of the syntax for people who are not used to doing things such as programming and writing scripts all

102
00:10:34,360 --> 00:10:39,480
of these funny characters can be a little bit intimidating but honestly it is the same process

103
00:10:39,480 --> 00:10:45,319
you're repeating over and over and over again so simply put practice makes perfect now this is the

104
00:10:45,319 --> 00:10:50,840
forward zone that we've done here we've created the name ipv0.com we specified we're going to be

105
00:10:50,840 --> 00:10:57,399
using a master server here and we have specified a configuration file now this configuration file

106
00:10:57,399 --> 00:11:03,639
right here does not exist yet i've specified the name but i am going to have to create this

107
00:11:03,639 --> 00:11:08,679
configuration file and we'll get to look at that very very shortly for now though like i say this

108
00:11:08,679 --> 00:11:15,399
is just the forward lookup we also now have to address the reverse lookup so the process is

109
00:11:15,399 --> 00:11:21,799
very similar but we do have some slight modifications here so we're going to use the zone keyword once

110
00:11:21,799 --> 00:11:28,599
again and now this part here is part of a naming convention this might be confusing now what i want

111
00:11:28,599 --> 00:11:37,319
to show you here is the ip address that i'm using here is 192 1680.44 remember that now the way i'm

112
00:11:37,319 --> 00:11:43,719
going to have to name this i kind of have to name this in reverse but i'm going to actually chop off

113
00:11:43,719 --> 00:11:49,879
this last octet right here because this is going to be part of the host and not the network again

114
00:11:49,879 --> 00:11:54,279
you may recall from lpik 1 when we talked about subnetting this is what we're talking about so

115
00:11:54,279 --> 00:12:01,960
really look at your ip address chop off the last octet and then work backwards so the first octet

116
00:12:01,960 --> 00:12:06,759
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

117
00:12:06,759 --> 00:12:16,200
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

118
00:12:16,200 --> 00:12:24,200
are doing things in reverse right here but that is not all remember that in adder arpa we talked about

119
00:12:24,200 --> 00:12:33,400
that part of the domain also must exist right here so i'm going to say dot in hyphen a d dr periods

120
00:12:33,400 --> 00:12:39,400
and then arpa and this is going to be the naming convention i am using here okay so again a little

121
00:12:39,400 --> 00:12:43,879
bit confusing if you have not seen it before but this is exactly what we're going to be doing

122
00:12:43,879 --> 00:12:51,639
so check this out then i'm going to open my quotation marks i will say 0.168.192 remember

123
00:12:51,639 --> 00:12:59,960
we're working backwards dots in hyphen a d dr dots arpa and then i will close my quotation marks and

124
00:12:59,960 --> 00:13:04,840
then i will open my curly braces for the actual configuration tier and again we're going to use

125
00:13:04,840 --> 00:13:11,399
the type it's going to be a master and then i will have my semicolon i will tab in again

126
00:13:11,399 --> 00:13:17,319
now i'm going to specify the configuration file for the reverse lookup so i will say file and it

127
00:13:17,319 --> 00:13:25,559
will be in the xa directory within the bind folder and now i can call this file anything i wish but

128
00:13:25,559 --> 00:13:34,199
to make it nice and clear people often just follow a similar convention so i will just say 0.168.192

129
00:13:34,199 --> 00:13:39,079
and i'll make it a dot db file once again so this part here isn't actually crucial you can call it

130
00:13:39,080 --> 00:13:44,600
anything you wish this part here though is actually a strong naming convention you definitely do want

131
00:13:44,600 --> 00:13:50,840
to be having this configured correctly so at the very end i'm going to have to do my semicolon

132
00:13:50,840 --> 00:13:57,080
and i'll just copy the same thing right here i will say allow updates and i will say none and then

133
00:13:57,080 --> 00:14:04,680
semicolon curly brace semicolon and then again curly brace and semicolon and now what i will do

134
00:14:04,759 --> 00:14:11,159
here is i will just save this file the named dot com dot local and then i will now escape so now what

135
00:14:11,159 --> 00:14:17,479
we've done here is we have created our options configuration file and we have now generated

136
00:14:17,479 --> 00:14:23,559
some zone information with respect to forward and reverse lookups but as it stands those files are

137
00:14:23,559 --> 00:14:29,879
going to rely upon these particular configuration files which have not been yet created and it's

138
00:14:29,879 --> 00:14:34,759
the creation of these files as well as the particular format and syntax of these files

139
00:14:34,759 --> 00:14:39,960
that we're going to be looking at next so how about we dive into those configuration files

140
00:14:39,960 --> 00:14:43,879
next so that's what's coming up but for now i hope this has been informative for you and i'd like to

141
00:14:43,879 --> 00:14:46,840
thank you for viewing

