WEBVTT - This file was automatically generated by VIMEO

0
00:00:07.390 --> 00:00:10.530
In this B D U, you learn how to create a simple Lennox firewall.

1
00:00:12.350 --> 00:00:15.370
Our plan is to explore Lennox Firewalls U using IP tables.

2
00:00:15.750 --> 00:00:18.650
You learn about IP table fundamentals. Finally,

3
00:00:18.750 --> 00:00:21.970
you will create a simple host-based firewall for your e c two instance.

4
00:00:23.800 --> 00:00:25.770
Okay, so what is a host based firewall?

5
00:00:26.150 --> 00:00:28.730
It is a firewall that monitors traffic from a single host.

6
00:00:29.070 --> 00:00:31.090
You may be more familiar with the firewall appliance,

7
00:00:31.090 --> 00:00:36.050
which monitors traffic for many hosts and it is a single point of entry and exit

8
00:00:36.050 --> 00:00:36.883
in your network.

9
00:00:37.710 --> 00:00:42.140
We're gonna use IP tables to create our firewall IP tables as a command line

10
00:00:42.140 --> 00:00:46.800
application that can manage the kernel packet filtering framework IP tables is

11
00:00:46.800 --> 00:00:48.720
made up of a few components like net filter,

12
00:00:48.730 --> 00:00:52.680
connection tracking and network translation. But for this video,

13
00:00:53.060 --> 00:00:56.800
you only need to know about using the IP tables command. Let's get started.

14
00:00:59.080 --> 00:00:59.430
Okay,

15
00:00:59.430 --> 00:01:04.370
so IP tables filters packets based on a few concepts called

16
00:01:04.430 --> 00:01:06.130
tables, chains, and rules and targets.

17
00:01:06.650 --> 00:01:10.370
I could basically do three or four videos just on IP tables and net filter,

18
00:01:11.250 --> 00:01:14.990
but just know that there are four default main tables.

19
00:01:16.430 --> 00:01:19.420
There are four default tables used in IP tables.

20
00:01:20.020 --> 00:01:23.370
There are filter nat mangolin raw filter's.

21
00:01:23.370 --> 00:01:24.730
The only one that we're gonna use in this video,

22
00:01:25.110 --> 00:01:27.770
and most of the time what you're gonna use is filter.

23
00:01:28.390 --> 00:01:32.290
The other thing to think about is filter table has three default chain.

24
00:01:33.020 --> 00:01:35.760
So a chain is basically like a string of rules.

25
00:01:36.970 --> 00:01:38.340
When a packet is received,

26
00:01:38.560 --> 00:01:43.380
IP tables finds the appropriate table in this case would be filter and then it

27
00:01:43.380 --> 00:01:47.940
runs it through a chain of rules until it finds a match. If no match is found,

28
00:01:48.450 --> 00:01:51.380
then it goes back to the table's default policy.

29
00:01:52.830 --> 00:01:56.650
If no rule is matched, it then falls back to the default chain policy.

30
00:01:57.400 --> 00:02:02.060
The filter table has to ult chains. They are input output and forward.

31
00:02:02.990 --> 00:02:04.520
They do exactly what they sound,

32
00:02:04.830 --> 00:02:08.440
they control the input output and forwarding packets are on your host.

33
00:02:09.290 --> 00:02:13.070
For our simple host based firewall, we're gonna work with the input chain only.

34
00:02:13.400 --> 00:02:17.830
We're gonna open ports for S S H and H E T P and then we'll drop everything

35
00:02:17.830 --> 00:02:22.830
else. And how we drop everything else is when a rule is matched.

36
00:02:23.530 --> 00:02:27.310
We basically can use a target to tell what to do with that rule.

37
00:02:27.740 --> 00:02:31.110
This can either be accept, drop or reject and as you see, we'll,

38
00:02:31.110 --> 00:02:34.030
we'll do a little mixture of both of accept and drop. Okay,

39
00:02:34.450 --> 00:02:39.070
so I wanna show you what opt tables looks like now on our host and then we'll go

40
00:02:39.070 --> 00:02:39.870
ahead and look at the,

41
00:02:39.870 --> 00:02:42.750
I provided two scripts to enable and disable the firewall and then we,

42
00:02:42.750 --> 00:02:46.010
we'll look at it through after we apply both of them. But before we do that,

43
00:02:46.090 --> 00:02:48.290
I want to go ahead and get a little disclaimer outta the way.

44
00:02:49.250 --> 00:02:52.460
Anytime that you start filtering network traffic on a host,

45
00:02:52.640 --> 00:02:56.780
you run the risk of dropping your SSH connection since you're remote.

46
00:02:57.350 --> 00:03:00.000
I've taken a lot of care to make sure that these scripts,

47
00:03:00.000 --> 00:03:03.320
and this shouldn't happen to you, but if it does, um,

48
00:03:03.380 --> 00:03:07.540
you can go ahead and go into the AWS console, go to EC two,

49
00:03:08.010 --> 00:03:12.820
find the instance that we created and then you can select it and then click

50
00:03:12.820 --> 00:03:15.380
up in the top actions and you could reboot your host.

51
00:03:15.650 --> 00:03:20.620
Once you reboot these IP table rules will be all gone and you should be able to

52
00:03:20.840 --> 00:03:22.140
SSH back into your host again.

53
00:03:22.820 --> 00:03:26.730
I just wanted to say that to get that out of the way. Okay,

54
00:03:27.150 --> 00:03:31.460
so to view what we have for an IP tables right now,

55
00:03:32.970 --> 00:03:34.510
I'm gonna use the IP tables command.

56
00:03:34.510 --> 00:03:38.110
You need pseudo when using any of the IP tables command because it requires

57
00:03:38.230 --> 00:03:40.630
alphabet privileges. We're gonna do a dash l.

58
00:03:40.630 --> 00:03:42.590
There's list all of our chains and rules

59
00:03:44.090 --> 00:03:46.220
dash n so it doesn't try to, um,

60
00:03:47.280 --> 00:03:50.980
so it doesn't try to do any resolution of addresses and ports.

61
00:03:51.900 --> 00:03:54.960
And then we're gonna use the dash dash line numbers flag.

62
00:03:55.420 --> 00:03:56.760
So it's easier just to follow.

63
00:03:56.790 --> 00:04:01.690
Each chain will have a specific set of line numbers. Okay,

64
00:04:01.790 --> 00:04:04.810
so there, there are three main chains like we talked about,

65
00:04:04.810 --> 00:04:08.700
which was input output and forward.

66
00:04:09.200 --> 00:04:11.620
But you can see here we have these docker chains as well.

67
00:04:11.810 --> 00:04:14.540
This was created when we installed and started Docker.

68
00:04:14.960 --> 00:04:16.660
And Docker handles the controlling of those.

69
00:04:16.960 --> 00:04:20.780
It is safe to ignore anything in this command output that has the word docker in

70
00:04:20.780 --> 00:04:20.920
it.

71
00:04:20.920 --> 00:04:25.340
It is not going to affect us in the least bit when we're creating our firewall.

72
00:04:26.060 --> 00:04:29.790
What we will look at right now is the first chain, which is the input chain.

73
00:04:29.810 --> 00:04:31.870
You could see the default policy is except,

74
00:04:31.870 --> 00:04:35.950
which means right now there's no rules. So because there's no rules,

75
00:04:35.950 --> 00:04:37.110
there's nothing to match.

76
00:04:37.670 --> 00:04:41.390
A packet will just automatically go to whatever the default policy of the chain

77
00:04:41.390 --> 00:04:42.470
is in this case, except,

78
00:04:42.520 --> 00:04:46.870
which is what we'd expect because we can SSH in it would allow any packet to

79
00:04:46.870 --> 00:04:51.030
come in if, if we had something running, we're not limiting anything.

80
00:04:51.750 --> 00:04:55.130
The forward chain has a, uh, default policy of drop.

81
00:04:55.510 --> 00:04:59.090
And you can see here it has a whole bunch of docker commands and Ford is used

82
00:04:59.090 --> 00:05:02.490
for routing packets usually internally on your host.

83
00:05:03.110 --> 00:05:05.370
And so it makes sense for Docker. And if you remember,

84
00:05:05.370 --> 00:05:06.330
if you viewed this back when we,

85
00:05:06.470 --> 00:05:09.450
we made our connection to the Docker container running,

86
00:05:10.090 --> 00:05:14.330
a lot of this has to do with the IP tables forwarding those packets to and from

87
00:05:14.670 --> 00:05:18.730
Docker host and then inside the Docker network back out to our host.

88
00:05:20.130 --> 00:05:24.510
Our final chain is the output chain and its default policy is accept meaning

89
00:05:25.130 --> 00:05:27.870
any packets going out through our firewall, um,

90
00:05:27.870 --> 00:05:31.750
throughout through IP tables and net filter. Just go ahead and let it accept it.

91
00:05:33.040 --> 00:05:34.850
Okay, I'm gonna clear the screen.

92
00:05:37.730 --> 00:05:41.380
Like I said earlier, I provided two files. One to enable the firewall,

93
00:05:41.440 --> 00:05:44.860
one to disable the firewall and they are in our repo

94
00:05:47.270 --> 00:05:48.280
section six.

95
00:05:50.500 --> 00:05:52.800
And let's look at the enable firewall first.

96
00:05:53.600 --> 00:05:58.360
So go ahead and open that up in your editor. Okay,

97
00:05:58.540 --> 00:06:03.400
so basically it's just a bash script. There's nothing fancy, um,

98
00:06:03.850 --> 00:06:04.720
going on here.

99
00:06:06.640 --> 00:06:11.250
The first line of our firewall really starts at line five here and

100
00:06:11.320 --> 00:06:16.170
basically this dash capital P means policy and we're saying

101
00:06:16.550 --> 00:06:20.450
set the input chains default policy to drop.

102
00:06:21.190 --> 00:06:26.140
So if you just ran line five all by itself right now on your host,

103
00:06:26.670 --> 00:06:30.540
don't do it. But if you did, it would accidentally would drop um,

104
00:06:30.540 --> 00:06:34.540
your s SSH connection because there's no rules to match in that chain.

105
00:06:35.110 --> 00:06:37.500
You'd by setting the default policy to drop,

106
00:06:37.530 --> 00:06:40.100
that means all these SSH packets that are,

107
00:06:40.100 --> 00:06:44.500
that are going right now live as I'm connected to this host would automatically

108
00:06:44.500 --> 00:06:46.140
drop because they didn't match a rule.

109
00:06:46.720 --> 00:06:50.070
So thankfully what we have here is line six,

110
00:06:50.720 --> 00:06:55.310
which if you notice here we're using the dash capital A for input chain

111
00:06:55.570 --> 00:06:59.670
and dash capital A for IP tables command. It means appended. And remember

112
00:07:01.330 --> 00:07:03.280
rules are read from top down.

113
00:07:03.580 --> 00:07:07.160
So it starts at the first rule in the chain and works its way down.

114
00:07:07.960 --> 00:07:12.020
And so when you append, you're just putting them in order if you will.

115
00:07:12.120 --> 00:07:16.220
So we want this order. Um, and it'll make more sense when we get to line 10.

116
00:07:16.760 --> 00:07:20.180
So we're appending this rule, which is using the contract module,

117
00:07:20.310 --> 00:07:21.740
which is the dash M here.

118
00:07:22.580 --> 00:07:25.700
Contract module is a way for IP tables to be able to track connections,

119
00:07:26.050 --> 00:07:28.300
keep some state about 'em so it knows like, okay,

120
00:07:28.400 --> 00:07:30.980
you initiated this connection or you accepted this connection.

121
00:07:31.000 --> 00:07:35.260
So I'm going to leave that alone because obviously I assume you know what you're

122
00:07:35.260 --> 00:07:37.710
doing. Uh,

123
00:07:38.010 --> 00:07:42.150
CT state is basically the connection state and we want anything that's already

124
00:07:42.150 --> 00:07:46.910
established or related and that's how it'll keep our connection live.

125
00:07:47.450 --> 00:07:50.230
And then dash J here, this is when I talked about the targets,

126
00:07:50.420 --> 00:07:52.710
that once the rule matches, what do we do with it?

127
00:07:53.100 --> 00:07:57.830
Well this is that J means jump to a target and then there's the accept dropped

128
00:07:57.830 --> 00:08:01.510
and reject targets. And in our case those are default ones.

129
00:08:01.810 --> 00:08:03.990
In our case we're gonna use accept meaning Hey,

130
00:08:04.100 --> 00:08:05.590
just go ahead and accept this packet.

131
00:08:05.890 --> 00:08:09.390
No need to keep looking any further in the rules. We're all set.

132
00:08:09.390 --> 00:08:14.300
We've matched Line seven is our first rule in the

133
00:08:14.300 --> 00:08:16.500
chain that has to do with a device.

134
00:08:17.000 --> 00:08:21.380
And you see we're doing the dash capital A for input again dash I here for

135
00:08:21.380 --> 00:08:24.380
interface and we're gonna use the loopback interface. And if you recall,

136
00:08:24.400 --> 00:08:26.940
the loopback interface is the local to your host.

137
00:08:26.970 --> 00:08:29.500
It's the 1 27 0.0 0.1.

138
00:08:29.800 --> 00:08:33.300
And we want any traffic that is coming into that.

139
00:08:33.400 --> 00:08:37.780
So it's like a few videos back when we tested connecting to our

140
00:08:38.240 --> 00:08:41.580
MyQ client on if you used local host, if this rule,

141
00:08:41.580 --> 00:08:43.220
if the firewall was enabled and this rule was in here,

142
00:08:43.220 --> 00:08:45.780
we wouldn't have been able to connect cause it would've dropped, it wouldn't,

143
00:08:45.780 --> 00:08:48.340
wouldn't have matched any packets destined for that interface.

144
00:08:48.640 --> 00:08:52.340
We jumped the accept target cuz we want to be able to communicate with anything

145
00:08:52.340 --> 00:08:57.050
listing on our loopback address locally. Okay, so lines eight,

146
00:08:57.050 --> 00:08:57.883
nine here.

147
00:08:58.100 --> 00:09:02.570
These are our pinholes and this is us opening up two ports

148
00:09:03.230 --> 00:09:08.210
in our firewall to allow them to come in. And you can see both a line eight,

149
00:09:08.210 --> 00:09:11.570
nine, we're both a pending, doesn't matter this order on eight or nine,

150
00:09:11.590 --> 00:09:13.850
you could have done 81st or 2022, it doesn't matter.

151
00:09:14.700 --> 00:09:16.290
We're appending to our input chain.

152
00:09:16.910 --> 00:09:20.570
The dash lowercase P is protocol and that's,

153
00:09:20.570 --> 00:09:24.290
we're using the TCP protocol cause that's what s ssh and H E T P use.

154
00:09:25.210 --> 00:09:27.910
And the dash dash D port is just destination port.

155
00:09:28.080 --> 00:09:31.710
Where is this packet destined for? If it is destined for port 22,

156
00:09:32.170 --> 00:09:34.190
go ahead and jump to the accept target.

157
00:09:34.800 --> 00:09:38.660
We're okay to let that in exact case here on line nine,

158
00:09:39.160 --> 00:09:42.860
the destination port is 80. Go ahead and accept it. Let it come on in.

159
00:09:44.570 --> 00:09:48.510
Now here we are to line 10 and this is the catchall rule.

160
00:09:49.010 --> 00:09:53.430
And basically we're saying if nothing is matched up until this point on the

161
00:09:53.440 --> 00:09:58.250
input chain, so this is the last rule in our input chain, jump to the drop.

162
00:09:59.170 --> 00:10:01.550
And we're just saying if we don't match a rule,

163
00:10:01.550 --> 00:10:05.670
then I don't want that traffic in our host or connecting to our host or uh,

164
00:10:05.670 --> 00:10:09.670
attempting to connect to our host. And so we use the drop, drop and reject.

165
00:10:09.670 --> 00:10:12.830
The two differences between drop will silently just drop the packet,

166
00:10:13.210 --> 00:10:16.590
the calling, whatever's sending the packet will never know.

167
00:10:16.590 --> 00:10:20.030
It just drops or it'll, it'll hang Sometimes depending on the client,

168
00:10:20.650 --> 00:10:25.030
the reject will actually return a response back to whatever's sending the

169
00:10:25.030 --> 00:10:28.430
packet. And so on. Host based firewalls,

170
00:10:28.470 --> 00:10:33.060
I like the drop as the default because I don't wanna give anybody any

171
00:10:33.060 --> 00:10:37.060
inclination if people are running port mappers and stuff like that. Port scans.

172
00:10:37.440 --> 00:10:40.540
So, uh, just drop. I don't wanna give them any indication that I'm,

173
00:10:40.540 --> 00:10:45.270
I'm listening on ports there. Okay, so that is the enable firewall.

174
00:10:45.650 --> 00:10:48.790
So I'm gonna close shift colon Q and Vim.

175
00:10:49.850 --> 00:10:54.670
And then this case we are going to use the disabled firewall.

176
00:10:55.880 --> 00:10:59.180
And here as you can see we're using the dash capital P again,

177
00:10:59.180 --> 00:11:02.300
which sets the default policies for our chains.

178
00:11:02.840 --> 00:11:07.500
And here on line four we're setting the input back to accept meaning la

179
00:11:07.940 --> 00:11:11.140
trafficking, which is what the default was when we spun up our e c two instance

180
00:11:12.800 --> 00:11:15.570
dash P. The output is accept, which is what it already was.

181
00:11:15.590 --> 00:11:18.050
But I want to be explicit here forward.

182
00:11:18.150 --> 00:11:21.730
We set the drop by default it's accept,

183
00:11:22.150 --> 00:11:25.530
but when dockers installed and Docker sets up the IP table rules,

184
00:11:25.590 --> 00:11:28.050
it puts it to drop and only has a certain rules.

185
00:11:28.510 --> 00:11:31.290
So I just went ahead and was explicit there as well.

186
00:11:32.510 --> 00:11:35.250
So line seven is the dash capital F,

187
00:11:35.250 --> 00:11:37.690
which means flush all the rules and all the chains.

188
00:11:38.230 --> 00:11:40.450
So if there's any rules left, they're just gonna flush 'em.

189
00:11:40.450 --> 00:11:41.490
They'll be like they never happened.

190
00:11:42.000 --> 00:11:46.980
This will also remove the docker chain rules that are

191
00:11:46.980 --> 00:11:50.020
in there as well. Not the chains themselves, but the rules inside the chains.

192
00:11:50.830 --> 00:11:53.800
And it's okay because if you restart dock service,

193
00:11:53.800 --> 00:11:56.440
they'll come back and I'll show you when we do that. Okay,

194
00:11:56.930 --> 00:12:00.860
shift colon q we'll close this file. We're done here. So I think,

195
00:12:00.960 --> 00:12:02.260
let me click at the screen.

196
00:12:03.340 --> 00:12:07.440
So I think what we'll do now is we will enable the firewall, like I said before,

197
00:12:07.440 --> 00:12:09.520
it should not drive the connection so I'll just go ahead and run it.

198
00:12:10.410 --> 00:12:13.870
So I ran it as you can see, nothing happened. Um,

199
00:12:13.870 --> 00:12:16.200
that's good and we didn't lose the connection.

200
00:12:16.460 --> 00:12:19.480
Let me go ahead and run the IP tables with the list.

201
00:12:19.480 --> 00:12:21.280
All the rules again with the line numbers.

202
00:12:23.490 --> 00:12:27.590
And so as you can see here, we now have in our input chain,

203
00:12:28.010 --> 00:12:29.870
we have five different rules now.

204
00:12:30.560 --> 00:12:34.300
So lines one and two are basically related to the C state,

205
00:12:34.310 --> 00:12:37.500
which is the related or established. Um, like I was saying before,

206
00:12:37.520 --> 00:12:40.140
if we've created a connection or if we've accepted the connection,

207
00:12:40.200 --> 00:12:42.660
go ahead and go ahead and keep that going.

208
00:12:42.800 --> 00:12:45.260
That's important that that's the number one rule, right?

209
00:12:45.690 --> 00:12:47.940
That way we keep all of our connections live and going.

210
00:12:49.220 --> 00:12:50.990
Rule three basically says,

211
00:12:51.680 --> 00:12:56.630
we'll accept any packet on the TCP protocol destined for port

212
00:12:56.650 --> 00:13:01.190
22 on this host from any source, um, to any IP address on our host.

213
00:13:02.280 --> 00:13:04.810
Same thing for, uh, rule number four. Uh,

214
00:13:04.810 --> 00:13:08.810
number four in the input chain except the certain is for destination port 80 for

215
00:13:08.890 --> 00:13:13.100
a for web server. And then here's our catchall, which just says drop.

216
00:13:13.280 --> 00:13:18.200
So if your packet goes through rule one, rule two, rule three,

217
00:13:18.270 --> 00:13:21.240
rule four, and nothing is matched at that point,

218
00:13:21.340 --> 00:13:25.930
you will match on rule five. Rule five always matches a packet.

219
00:13:26.030 --> 00:13:30.750
It just says drop it at that point. So the Ford chain,

220
00:13:30.750 --> 00:13:33.310
everything is correct, nothing has changed there. The output,

221
00:13:33.310 --> 00:13:35.630
nothing has changed. All the docker stuff is the same.

222
00:13:36.470 --> 00:13:40.170
So if you were to run a port scan or, uh,

223
00:13:40.520 --> 00:13:42.170
from the outside against this,

224
00:13:42.430 --> 00:13:47.370
you would now see that that port 22 and port 80

225
00:13:47.370 --> 00:13:49.450
were open, but the rest of the, uh,

226
00:13:49.500 --> 00:13:53.170
ports were filtered if you were doing a scan for all the most common ports.

227
00:13:53.230 --> 00:13:54.210
And that's what we want.

228
00:13:55.690 --> 00:14:00.470
So I think at this point we can disable the firewall and put it back the way it

229
00:14:00.470 --> 00:14:01.790
was. And I'll show you how to, uh,

230
00:14:01.810 --> 00:14:04.070
and we'll restart Docker to bring back those docker rules.

231
00:14:04.770 --> 00:14:06.390
But there's one more caveat here.

232
00:14:06.410 --> 00:14:09.550
If you wanted to save these rules and survive reboots,

233
00:14:09.840 --> 00:14:14.160
there isn't a command called IP tables

234
00:14:17.590 --> 00:14:21.020
save dash save. And if we look at the man page here,

235
00:14:21.090 --> 00:14:26.060
this basically allows you to save the IP table rules and chains into a file that

236
00:14:26.060 --> 00:14:27.660
can get run on reboots.

237
00:14:28.000 --> 00:14:29.820
And so if you want and you're in a production environment,

238
00:14:29.820 --> 00:14:32.860
you wanna make this permanent, you would use this command. Um,

239
00:14:32.860 --> 00:14:36.140
we're not gonna use it here because we don't want to accidentally lock lock

240
00:14:36.140 --> 00:14:38.540
anybody out or, uh, we still have, you know, some more,

241
00:14:38.730 --> 00:14:42.020
some more videos left in this course. So we'll go ahead and just,

242
00:14:42.020 --> 00:14:43.420
but I wanted you to be aware of that.

243
00:14:44.420 --> 00:14:47.640
So let's go ahead and disable.

244
00:14:48.260 --> 00:14:53.040
So I'll go back up into the section six directory where our disabled script is.

245
00:14:53.840 --> 00:14:58.050
We'll run disabled, we'll run our list rules and commands again.

246
00:14:58.310 --> 00:15:00.050
Now as you see, this looks completely different.

247
00:15:00.070 --> 00:15:04.370
And this is the dash F capital F I was talking to you about that we would flush

248
00:15:04.550 --> 00:15:06.890
all the rules and chains out. But as you can see,

249
00:15:06.890 --> 00:15:11.130
what's more important is the input policy here is accept

250
00:15:12.680 --> 00:15:17.300
the default and output is still, uh, accept the Ford is dropped. That's okay.

251
00:15:17.920 --> 00:15:19.980
But to bring back the docker,

252
00:15:19.980 --> 00:15:24.740
we're gonna use the system CTL command again and we're gonna restart Docker

253
00:15:24.920 --> 00:15:28.660
dot service. And what this will do is once this comes back up,

254
00:15:28.660 --> 00:15:31.140
Docker will go ahead and run its own IP table

255
00:15:32.710 --> 00:15:36.420
rules and it'll bring everything back. So we will go ahead.

256
00:15:36.420 --> 00:15:39.340
Let me clear the screen here. We'll go ahead and run this again.

257
00:15:41.060 --> 00:15:41.960
And as you can see here,

258
00:15:42.060 --> 00:15:45.320
all the forward rules inside the forward chain are back.

259
00:15:47.970 --> 00:15:50.020
Okay, that brings us to an end here in the terminal.

260
00:15:50.270 --> 00:15:53.340
Let's jump back over and let's do a recap of what we did.

261
00:15:55.410 --> 00:15:57.140
Okay, so let's talk about what we did. In this video,

262
00:15:57.600 --> 00:16:01.780
you learned how IP tables can keep your Lennox host secure by restricting packet

263
00:16:01.800 --> 00:16:05.940
access like we did for s SSH port and http.

264
00:16:06.400 --> 00:16:10.020
You were also introduced to concepts like tables change rules and targets.

265
00:16:11.050 --> 00:16:11.560
Finally,

266
00:16:11.560 --> 00:16:16.060
you created a simple host-based firewall that allowed s SSH in http traffic,

267
00:16:16.400 --> 00:16:18.220
but dropped all other inbound traffic.

268
00:16:18.800 --> 00:16:22.380
We used two simple batch scripts that allowed you to enable and disable it,

269
00:16:22.720 --> 00:16:26.100
and you also learned how to save it if you wanted to make it permanent.

270
00:16:27.430 --> 00:16:30.410
In the next video, you'll learn about security logging and auditing.

271
00:16:30.830 --> 00:16:31.410
See you soon.
