1 00:00:00,05 --> 00:00:02,02 - [Instructor] You can turn any 2 00:00:02,02 --> 00:00:05,02 ordinary computer into a router. 3 00:00:05,02 --> 00:00:06,09 Here is what you need. 4 00:00:06,09 --> 00:00:09,07 Hardware-wise, a second network interface card, 5 00:00:09,07 --> 00:00:12,04 or NIC, is necessary. 6 00:00:12,04 --> 00:00:15,05 In terms of software, you could be using 7 00:00:15,05 --> 00:00:18,07 any Linux distribution. 8 00:00:18,07 --> 00:00:21,06 Ubuntu is our choice. 9 00:00:21,06 --> 00:00:24,03 If you're using a physical computer, 10 00:00:24,03 --> 00:00:28,07 go ahead and plug in your second NIC and set it up. 11 00:00:28,07 --> 00:00:34,02 A virtual machine, or VM, requires a virtual NIC. 12 00:00:34,02 --> 00:00:36,03 Here is the big picture view. 13 00:00:36,03 --> 00:00:38,05 Think of what a home router does. 14 00:00:38,05 --> 00:00:42,08 It allows you to share a single external IP address 15 00:00:42,08 --> 00:00:48,02 among multiple hosts in the same local area network, or LAN. 16 00:00:48,02 --> 00:00:53,06 We call this feature network address translation, or NAT. 17 00:00:53,06 --> 00:00:57,06 NAT also enables you to forward packets. 18 00:00:57,06 --> 00:01:00,06 There could be two types of forwarding. 19 00:01:00,06 --> 00:01:03,06 One is ingress forwarding, meaning forwarding packets 20 00:01:03,06 --> 00:01:07,06 from outside your network into your network. 21 00:01:07,06 --> 00:01:11,01 The other is egress, meaning forwarding packets 22 00:01:11,01 --> 00:01:15,08 from within your network to the outside of your network. 23 00:01:15,08 --> 00:01:19,06 This diagram shows our overall network architecture 24 00:01:19,06 --> 00:01:23,06 we're working toward throughout this course. 25 00:01:23,06 --> 00:01:25,02 In the previous lessons, 26 00:01:25,02 --> 00:01:29,06 we set up our host firewall on a local host. 27 00:01:29,06 --> 00:01:31,01 The rest of the architecture 28 00:01:31,01 --> 00:01:34,08 yet to be completed is grayed out. 29 00:01:34,08 --> 00:01:37,03 In this chapter, we'll configure 30 00:01:37,03 --> 00:01:41,00 a second Ubuntu VM host as a router. 31 00:01:41,00 --> 00:01:43,09 It has two network interface cards, 32 00:01:43,09 --> 00:01:47,04 network interface card zero, or eth0, 33 00:01:47,04 --> 00:01:51,05 and network interface card one, or eth1. 34 00:01:51,05 --> 00:01:54,04 Between these two network interfaces 35 00:01:54,04 --> 00:01:57,05 is where the forwarding is happening, 36 00:01:57,05 --> 00:02:01,09 whether it's ingress forwarding or egress forwarding. 37 00:02:01,09 --> 00:02:04,08 And behind the Ubuntu host as a router, 38 00:02:04,08 --> 00:02:07,06 you can see an additional host connected 39 00:02:07,06 --> 00:02:09,08 through a switch the is also connected 40 00:02:09,08 --> 00:02:15,02 to the Ubuntu host routers NIC1 or eth1. 41 00:02:15,02 --> 00:02:18,03 What I'm showing you here is precisely 42 00:02:18,03 --> 00:02:21,00 how your home router works. 43 00:02:21,00 --> 00:02:24,03 The only difference is that the entire computer, 44 00:02:24,03 --> 00:02:30,00 namely Ubuntu host, is now dedicated as a router.