WEBVTT

1
00:00.000 --> 00:07.840
So our final step is going to be to actually test the reachability of the

2
00:07.840 --> 00:08.800
internet from

3
00:08.800 --> 00:11.920
a machine in subnet 10.

4
00:11.920 --> 00:16.000
So for this, we're going to deploy two Linux servers.

5
00:16.000 --> 00:20.960
The first one is going to be acting as a jump box, or you could call it out of

6
00:20.960 --> 00:22.320
band management

7
00:22.320 --> 00:27.200
to give us a way to SSH into the other Linux box.

8
00:27.200 --> 00:33.550
Now again, we could give the other Linux box its own external address, but just
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

8
00:27.200 --> 00:33.550
Now again, we could give the other Linux box its own external address, but just

9
00:33.550 --> 00:33.760
for the

10
00:33.760 --> 00:39.080
case in point, I would prefer to have it just have private addresses.

11
00:39.080 --> 00:43.560
Besides these spin up real quick and easy in AWS.

12
00:43.560 --> 00:50.200
So let's jump in, get these configured, and do our final verification.

13
00:50.200 --> 00:53.680
So we'll start off here on the EC2 dashboard.

14
00:53.680 --> 00:58.520
Let's just go ahead and hit launch instance for the name this first one.

15
00:58.520 --> 01:00.520
We're going to call jump box.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

15
00:58.520 --> 01:00.520
We're going to call jump box.

16
01:00.520 --> 01:06.440
We're simply going to use the Amazon Linux image so we can keep scrolling down.

17
01:06.440 --> 01:11.560
For the instance type, we're going to use the T2 micro for the key pair.

18
01:11.560 --> 01:13.960
We'll choose our key pair.

19
01:13.960 --> 01:17.260
And then for the network settings, we'll hit edit.

20
01:17.260 --> 01:20.360
Of course, we're going to be choosing RVPC.

21
01:20.360 --> 01:25.360
This machine is going to be on subnet one acting like our management machine.

22
01:25.360 --> 01:28.800
We're not going to auto assign a public IP address because we're going to

23
01:28.800 --> 01:30.640
configure that.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

23
01:28.800 --> 01:30.640
configure that.

24
01:30.640 --> 01:34.000
We're going to select an existing security group for this one.

25
01:34.000 --> 01:35.320
It's going to be SG one.

26
01:35.320 --> 01:37.360
That's the outside group.

27
01:37.360 --> 01:40.920
Then we'll click advanced network configuration.

28
01:40.920 --> 01:45.510
And under our new network interface for the primary IP, we'll put in its

29
01:45.510 --> 01:46.640
address, which

30
01:46.640 --> 01:50.520
is going to be 10 dot 20 dot 1 dot 252.

31
01:50.520 --> 01:52.920
This is coming from our diagram.

32
01:52.920 --> 01:55.360
That should be all we need to configure.

33
01:55.360 --> 01:57.880
We'll verify everything else looks correct.

34
01:57.880 --> 02:00.200
And then we'll hit launch instance.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

34
01:57.880 --> 02:00.200
And then we'll hit launch instance.

35
02:00.200 --> 02:02.320
Let's go back to instances.

36
02:02.320 --> 02:05.520
We're going to launch another one that's almost exactly like that.

37
02:05.520 --> 02:08.320
So once again, we'll hit launch instance.

38
02:08.320 --> 02:11.640
This one for the name is going to be SRV one.

39
02:11.640 --> 02:15.000
Once again, it's going to be the Amazon Linux image.

40
02:15.000 --> 02:17.680
It's going to be a T2 micro.

41
02:17.680 --> 02:20.800
We'll choose our key pair for the network settings.

42
02:20.800 --> 02:22.400
We'll hit edit.

43
02:22.400 --> 02:24.480
Now this one is going to be on subnet 10.

44
02:24.480 --> 02:27.040
So we need to choose subnet 10.

45
02:27.040 --> 02:30.180
We're going to use an existing security group.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

45
02:27.040 --> 02:30.180
We're going to use an existing security group.

46
02:30.180 --> 02:35.970
This one's going to be on SG land and under advanced network configuration for

47
02:35.970 --> 02:36.720
the primary

48
02:36.720 --> 02:37.720
IP address.

49
02:37.720 --> 02:43.920
This one is going to be 10 dot 20 dot 10 dot 100.

50
02:43.920 --> 02:45.440
Everything else should be correct.

51
02:45.440 --> 02:47.400
So we'll hit launch instance.

52
02:47.400 --> 02:49.520
Let's go back to instances.

53
02:49.520 --> 02:52.600
We can see that these are in the process of deploying.

54
02:52.600 --> 02:57.930
So let's pause for just a moment until they're up with their status checks

55
02:57.930 --> 02:58.800
passed.

56
02:58.800 --> 03:00.520
So it's been just a few moments.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

56
02:58.800 --> 03:00.520
So it's been just a few moments.

57
03:00.520 --> 03:02.680
Now our devices are up and running.

58
03:02.680 --> 03:08.260
The next thing we have to do is assign our elastic IP to our jump box so that

59
03:08.260 --> 03:08.640
we can

60
03:08.640 --> 03:11.520
SSH into it from the outside.

61
03:11.520 --> 03:14.240
So let's go to our elastic IPs.

62
03:14.240 --> 03:17.120
Here I have one configured for the jump box.

63
03:17.120 --> 03:22.400
So we'll go to actions and say associate elastic IP address.

64
03:22.400 --> 03:25.240
So we want to associate it with a network interface.

65
03:25.240 --> 03:27.280
We'll choose that.

66
03:27.280 --> 03:32.080
Then for the network interface, we'll choose the one for the jump box for the
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

66
03:27.280 --> 03:32.080
Then for the network interface, we'll choose the one for the jump box for the

67
03:32.080 --> 03:32.880
private IP

68
03:32.880 --> 03:33.880
address.

69
03:33.880 --> 03:38.800
We'll of course choose the 10 dot 20 dot one dot 252.

70
03:38.800 --> 03:43.970
And we will say that it's allowed to be reassociated in case it has a previous

71
03:43.970 --> 03:45.120
association.

72
03:45.120 --> 03:46.480
We'll scroll down.

73
03:46.480 --> 03:49.120
We'll hit associate.

74
03:49.120 --> 03:54.280
Now that this is complete, we should be able to SSH into our jump box.

75
03:54.280 --> 03:59.080
So now let's jump over to secure CRT and do just that.

76
03:59.080 --> 04:01.480
We can see here that we are connected.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

76
03:59.080 --> 04:01.480
We can see here that we are connected.

77
04:01.480 --> 04:06.640
And in fact, it has the IP address 10 dot 20 dot 1 dot 252.

78
04:06.640 --> 04:10.520
The first thing we want to do is make sure that it can actually reach our

79
04:10.520 --> 04:11.280
server.

80
04:11.280 --> 04:15.480
So let's do a ping of the 10 dot 20 dot 10 dot 100.

81
04:15.480 --> 04:17.680
This should be successful.

82
04:17.680 --> 04:19.600
We can see that it is.

83
04:19.600 --> 04:25.560
So we have reachability and management from the jump box to server one.

84
04:25.560 --> 04:30.760
However, in order to actually be able to SSH, we need to get our private key
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

84
04:25.560 --> 04:30.760
However, in order to actually be able to SSH, we need to get our private key

85
04:30.760 --> 04:31.240
here onto

86
04:31.240 --> 04:33.000
this management server.

87
04:33.000 --> 04:35.480
So there's a few things we're going to do.

88
04:35.480 --> 04:39.820
First thing we're going to do is change the host name on this machine so that

89
04:39.820 --> 04:40.560
we can easily

90
04:40.560 --> 04:42.360
identify it.

91
04:42.360 --> 04:46.000
So for this, we'll simply use the command host name control.

92
04:46.000 --> 04:50.520
We'll set the host name to jump box dot AWS dot com.

93
04:50.520 --> 04:52.000
We'll hit enter.

94
04:52.000 --> 04:57.720
And if we simply log off and log back on to reset the shell, this will take

95
04:57.720 --> 04:57.920
effect.

96
04:57.920 --> 05:00.680
And we can see now this is listed as jump box.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

96
04:57.920 --> 05:00.680
And we can see now this is listed as jump box.

97
05:00.680 --> 05:03.400
That way we know which device we're on.

98
05:03.400 --> 05:07.360
The next thing we want to do is create that private key.

99
05:07.360 --> 05:11.540
So the first thing we'll do is we'll run nano, which is simply a text editor.

100
05:11.540 --> 05:16.820
And then we will paste in the contents of the key that we downloaded from

101
05:16.820 --> 05:17.660
Amazon.

102
05:17.660 --> 05:22.830
Once that's in, we'll hit control O to write out the file and we'll name this

103
05:22.830 --> 05:24.280
AWS underscore

104
05:24.280 --> 05:29.800
key dot PM just because that's what I had named my key.

105
05:29.800 --> 05:34.120
We'll hit control X to exit, we'll save the buffer.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

105
05:29.800 --> 05:34.120
We'll hit control X to exit, we'll save the buffer.

106
05:34.120 --> 05:37.600
If we do an LS, we can see we have that file here now.

107
05:37.600 --> 05:40.680
The other thing we have to do is change the permissions on it.

108
05:40.680 --> 05:42.960
So we'll change the permissions.

109
05:42.960 --> 05:45.280
600 is fine.

110
05:45.280 --> 05:51.920
Then we should be able to use this key to SSH into our server one for this.

111
05:51.920 --> 05:57.250
The command is simply SSH minus I, then the name of the key, then the name of

112
05:57.250 --> 05:57.960
the user

113
05:57.960 --> 06:02.480
at and of course, the IP address of server one.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

113
05:57.960 --> 06:02.480
at and of course, the IP address of server one.

114
06:02.480 --> 06:06.480
It's going to ask if we want to save us information, we'll say yes.

115
06:06.480 --> 06:09.600
And now we are logged in to server one.

116
06:09.600 --> 06:13.680
So we can see here that we're on 10 dot 20 dot 10 dot 100.

117
06:13.680 --> 06:21.520
However, once again, let's set its host name real quickly.

118
06:21.520 --> 06:24.800
Log back in and now we're on server one.

119
06:24.800 --> 06:28.480
Now, of course, don't forget the whole reason we're here.

120
06:28.480 --> 06:32.640
We should now be able to ping eight dot eight dot eight dot eight.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

120
06:28.480 --> 06:32.640
We should now be able to ping eight dot eight dot eight dot eight.

121
06:32.640 --> 06:34.520
And it should be successful.

122
06:34.520 --> 06:37.120
We can see here that it is.

123
06:37.120 --> 06:38.880
We should be able to ping Cisco dot com.

124
06:38.880 --> 06:41.200
It should have name resolution.

125
06:41.200 --> 06:44.200
We can see that that is successful as well.

126
06:44.200 --> 06:48.390
And finally, just to verify that this is in fact going through router one, let

127
06:48.390 --> 06:48.960
's connect

128
06:48.960 --> 06:50.880
to router one.

129
06:50.880 --> 06:53.920
And let's do a show IP net translations.

130
06:53.920 --> 06:59.080
You can see here that we actually have a lot of traffic going from 10 dot 20

131
06:59.080 --> 06:59.720
dot 10 dot

132
06:59.720 --> 07:06.320
100 out through being natted as 10 dot 20 dot one dot two 54.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

132
06:59.720 --> 07:06.320
100 out through being natted as 10 dot 20 dot one dot two 54.

133
07:06.320 --> 07:08.380
Some of these are ICMP.

134
07:08.380 --> 07:10.560
Those would be the pings we just did.

135
07:10.560 --> 07:15.040
The rest of these are all UDP traffic going to port 123.

136
07:15.040 --> 07:20.430
So it appears that that server is really, really, really trying to get the time

137
07:20.430 --> 07:20.600
from

138
07:20.600 --> 07:21.880
somebody.

139
07:21.880 --> 07:24.400
Because those are NTP requests.

140
07:24.400 --> 07:28.510
But at the end of the day, the important thing is that this is functioning

141
07:28.510 --> 07:29.400
properly.

142
07:29.400 --> 07:33.920
So that takes care of everything that we need to cover in this skill.
WEBVTT
X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000

142
07:29.400 --> 07:33.920
So that takes care of everything that we need to cover in this skill.

143
07:33.920 --> 07:36.960
That just leaves you with a challenge.

144
07:36.960 --> 07:37.960
Good luck.

145
07:37.960 --> 07:39.520
And I'll see you in the solution.
