1 00:00:00,00 --> 00:00:03,08 - [Instructor] The area behind our Ubuntu router serving as 2 00:00:03,08 --> 00:00:09,02 a network firewall is a demilitarized zone or DMZ. 3 00:00:09,02 --> 00:00:13,08 We call it DMZ because it's a relatively safe place 4 00:00:13,08 --> 00:00:18,00 after our first layer of firewall filtering 5 00:00:18,00 --> 00:00:22,03 our goal is to provide an HTTP service 6 00:00:22,03 --> 00:00:26,01 on our Ubuntu local host in the DMZ. 7 00:00:26,01 --> 00:00:28,02 Let's start by installing 8 00:00:28,02 --> 00:00:33,01 a popular Linux web server called apache 9 00:00:33,01 --> 00:00:35,07 type sudo, 10 00:00:35,07 --> 00:00:39,04 space apt 11 00:00:39,04 --> 00:00:42,08 space install, 12 00:00:42,08 --> 00:00:47,05 space apache two 13 00:00:47,05 --> 00:00:50,03 press enter 14 00:00:50,03 --> 00:00:58,05 type Y press enter. 15 00:00:58,05 --> 00:01:03,05 Now you have a working HTTP or web server 16 00:01:03,05 --> 00:01:06,06 on the Ubuntu local host. 17 00:01:06,06 --> 00:01:11,00 Let's check the status of the apache web server 18 00:01:11,00 --> 00:01:14,07 type sudo space 19 00:01:14,07 --> 00:01:18,09 system ctl 20 00:01:18,09 --> 00:01:23,09 space apache two 21 00:01:23,09 --> 00:01:28,04 space status 22 00:01:28,04 --> 00:01:30,09 press enter 23 00:01:30,09 --> 00:01:32,02 wrong sequence 24 00:01:32,02 --> 00:01:35,07 type sudo 25 00:01:35,07 --> 00:01:38,08 system ctl 26 00:01:38,08 --> 00:01:42,03 space status 27 00:01:42,03 --> 00:01:44,08 apache two 28 00:01:44,08 --> 00:01:47,06 press enter. 29 00:01:47,06 --> 00:01:50,00 The web server is up and running. 30 00:01:50,00 --> 00:01:52,07 If it's down, start the web server 31 00:01:52,07 --> 00:01:57,02 by typing sudo system ctl 32 00:01:57,02 --> 00:02:01,02 apache two space start 33 00:02:01,02 --> 00:02:03,07 and then press enter 34 00:02:03,07 --> 00:02:05,06 an ultimate test to check if 35 00:02:05,06 --> 00:02:08,04 the web server is up and running is 36 00:02:08,04 --> 00:02:14,00 opening a web browser and loading a homepage 37 00:02:14,00 --> 00:02:18,05 type local host 38 00:02:18,05 --> 00:02:20,09 and press enter. 39 00:02:20,09 --> 00:02:24,03 As you can see, you can load the default page from 40 00:02:24,03 --> 00:02:28,00 the web server on the Ubuntu local host. 41 00:02:28,00 --> 00:02:32,02 the successfully loaded test page means that 42 00:02:32,02 --> 00:02:35,04 the web server is up and running 43 00:02:35,04 --> 00:02:37,09 to restart the web server 44 00:02:37,09 --> 00:02:41,07 type sudo space system ctl 45 00:02:41,07 --> 00:02:44,08 space, restart space 46 00:02:44,08 --> 00:02:47,03 apache two like this 47 00:02:47,03 --> 00:02:49,08 press enter 48 00:02:49,08 --> 00:02:52,00 to stop the web server 49 00:02:52,00 --> 00:02:56,03 type sudo system ctl 50 00:02:56,03 --> 00:02:59,00 stop apache two 51 00:02:59,00 --> 00:03:01,00 press enter. 52 00:03:01,00 --> 00:03:04,00 Let's check the status of the web server again 53 00:03:04,00 --> 00:03:07,08 by typing sudo system ctl 54 00:03:07,08 --> 00:03:10,07 status apache two 55 00:03:10,07 --> 00:03:13,07 press enter. 56 00:03:13,07 --> 00:03:17,07 The web server is no longer running 57 00:03:17,07 --> 00:03:21,01 for now the host in our DMZ, 58 00:03:21,01 --> 00:03:23,04 which is the same local area network 59 00:03:23,04 --> 00:03:27,08 behind Ubuntu router slash Network firewall 60 00:03:27,08 --> 00:03:31,01 are the only ones that can access the web server. 61 00:03:31,01 --> 00:03:34,09 The next step is to enable port forwarding 62 00:03:34,09 --> 00:03:38,00 to allow host on the internet 63 00:03:38,00 --> 00:03:41,00 to send the request to our web server.