1
00:00:00,150 --> 00:00:07,560
Now, in case one what we want, we want to deny access to website www.example1.com, which

2
00:00:07,560 --> 00:00:10,950
is running on 172.24.0.1 from.

3
00:00:11,070 --> 00:00:17,330
Everywhere, mean, neither C10 or C20 they should not be able to access, even master.

4
00:00:17,340 --> 00:00:27,480
it should not be able to access, your www.example1.com site and we will see what parameter

5
00:00:27,480 --> 00:00:28,230
we have to write.

6
00:00:28,710 --> 00:00:32,730
Then we want that www.example2.com.

7
00:00:33,210 --> 00:00:41,490
We want to deny access to website www.example2.com which is running on our IP address two from

8
00:00:41,490 --> 00:00:42,120
which system.

9
00:00:42,120 --> 00:00:46,940
Ten system that mean this should not be able to access your example2 site.

10
00:00:47,310 --> 00:00:52,140
But this system or master system, they should be able to access the website.

11
00:00:52,710 --> 00:01:01,200
Then in the third case, we want that, allow access to the www.example3.com site which is running

12
00:01:01,200 --> 00:01:03,980
on your three ip address from everywhere.

13
00:01:04,230 --> 00:01:14,760
So we have to edit this file, httpd.config file and we have to include the directive as

14
00:01:14,880 --> 00:01:16,530
we are going to discuss.

15
00:01:16,950 --> 00:01:25,770
So we are going to write Directory /var/www/html/example1, because what we want, from example,

16
00:01:25,770 --> 00:01:29,480
1.com, we want to deny access from everywhere.

17
00:01:29,910 --> 00:01:34,520
So we have got one parameter Require all denied require.

18
00:01:34,530 --> 00:01:35,340
all denied.

19
00:01:35,340 --> 00:01:43,170
mean nobody can access your website if we are going to write Require all granted, It mean by default

20
00:01:43,170 --> 00:01:47,780
in all the systems will be granted access.

21
00:01:48,480 --> 00:02:01,860
So in the second Directory, what we wanted, we wanted deny access your example2.com from Ten system

22
00:02:01,860 --> 00:02:06,790
that mean ten should not be able to access but rest of the network should be able to access.

23
00:02:07,440 --> 00:02:17,700
So here we are going to write one directive parameters /var/www/html/example2 why example2 because our

24
00:02:17,700 --> 00:02:21,210
example2 is going to serve the material from this directory.

25
00:02:21,600 --> 00:02:28,200
So we are going to specify and here we are going to specify RequireAll the what is the meaning

26
00:02:28,200 --> 00:02:29,160
of RequireAll.

27
00:02:29,220 --> 00:02:38,280
It means it satisfied all these conditions if we are going to specify RequireAny then what will happen

28
00:02:38,430 --> 00:02:47,220
if any of the condition is satisfied, then you will be given the access if you are not specifying anything

29
00:02:47,220 --> 00:02:50,380
by default RequireAny is assumed.

30
00:02:50,700 --> 00:02:53,400
So here what we are writing a Require ip.

31
00:02:53,820 --> 00:03:03,660
That means 172.24.0.0/16 network.

32
00:03:04,050 --> 00:03:11,820
Then we are using Require not IP, not IP mean we want to negate that mean we do not want this system

33
00:03:11,840 --> 00:03:12,490
to access.

34
00:03:13,290 --> 00:03:23,810
So what will happen when we are going to send the request from ten, because in this case the entries

35
00:03:24,420 --> 00:03:31,350
in both the system, because the Require IP when we are making the entry 172.24.0.0,

36
00:03:31,770 --> 00:03:36,240
it also contains this address so that mean it is here also.

37
00:03:36,240 --> 00:03:37,230
It is here also.

38
00:03:37,590 --> 00:03:40,020
So by default, what will happen?

39
00:03:40,290 --> 00:03:41,850
It will be denied access.

40
00:03:42,690 --> 00:03:50,490
But what will happen if we are going to access from twenty system, noow wenty system, because

41
00:03:50,490 --> 00:03:53,790
only twenty system comes under this.

42
00:03:54,180 --> 00:03:55,160
This is not there.

43
00:03:55,590 --> 00:03:58,020
So this condition will not satisfy.

44
00:03:58,050 --> 00:04:00,370
So by default, access will be given.

45
00:04:00,600 --> 00:04:10,240
So in this case, twenty will be able to access your example2.com website, but not

46
00:04:10,590 --> 00:04:20,020
this ten and will not specify any information regarding example3.com.

47
00:04:20,340 --> 00:04:25,530
So by default, it will be granted all access.

48
00:04:25,800 --> 00:04:27,180
So that is what we wanted.

49
00:04:27,540 --> 00:04:33,230
Then we will test with service htttpd configtest whether the syntax is okay or

50
00:04:33,240 --> 00:04:37,330
not, then we will reload the service, then we will test.

51
00:04:38,100 --> 00:04:41,370
So in this case, we are testing from the C10.

52
00:04:41,790 --> 00:04:53,130
So what is happening when we are using elinks dumb http www. example1.com because it is, we

53
00:04:53,130 --> 00:04:58,740
are denying this so it is going to display one very large default page.

54
00:04:59,100 --> 00:04:59,840
Testing page.

55
00:05:00,150 --> 00:05:05,180
So that is why put head one command so that we are only getting the first page.

56
00:05:05,640 --> 00:05:13,360
So it is going to show you testing that mean it is not serving the material which is lying in example.com.

57
00:05:14,310 --> 00:05:19,430
So ten is not able to access we will go to the twenty system.

58
00:05:20,070 --> 00:05:22,870
We will see whether elinks is working or not.

59
00:05:23,160 --> 00:05:32,100
For example1.como site again it is showing testing that mean it proves that www.example1.

60
00:05:32,520 --> 00:05:40,050
com access example1 is denied from everywhere that mean from

61
00:05:40,050 --> 00:05:45,320
10 system 20 system and then will test about the second site.

62
00:05:45,780 --> 00:05:50,520
So we will go to the ten and will try to access the website again.

63
00:05:50,520 --> 00:05:57,570
It is going to show you testing that mean again we are not able to view the proper page so that mean

64
00:05:57,570 --> 00:05:58,710
access is denied.

65
00:05:59,370 --> 00:06:01,260
Then we will go to the twenty system.

66
00:06:01,260 --> 00:06:03,710
We will see that access is alow.

67
00:06:03,930 --> 00:06:07,230
That is what we wanted in our requirement.

68
00:06:07,800 --> 00:06:10,040
Then we will check third site.

69
00:06:10,770 --> 00:06:18,150
by again, using elinks dump done from C10, we are able to access from C20, we are able to

70
00:06:18,150 --> 00:06:18,530
access.

71
00:06:18,960 --> 00:06:27,270
So now we have implemented that mean that according to our requirement, now we will see that demo of

72
00:06:27,270 --> 00:06:27,630
this.
