In the previous video, we have done configuring ssh on router1 and router2, so now we can 2
remote router1 and router2 using ssh from ubuntu server 3
Next in this video, we are going to connecting guest os with host os. 4
What is guest os and host os? We will talk more about this in this video. 5
In the previous video, we already create topology like this, so the ubuntu is connected to switch 6
inside gns3, and also we have two router that connected to a switch. 7
And the ubuntu is also connected to the internet. If you remember, ubuntu have 2 interface, 8
the first interface is connected to internet, and the second interface is connected to gns3. 9
Ubuntu is guest os, so guest os is the virtual machine. 10
And then our laptop is host os. 11
In this case, I use mac, so this mac is host os. If you use windows on your laptop, so 12
the windows is host os. 13
In the previous video, we already learn how to connecting ubuntu with router inside gns3. 14
Now in this video, we are going to learn how to connecting the ubuntu with our laptop. 15
So we will able to remote the ubuntu server from our laptop. Let’s just start. 16
Shutdown the ubuntu server first, here we can right click and then shutdown. 17
Next, let’s go to setting, in the network section, we have network adapter 1 that connected 18
to internet, this is attached to nat, 19
And then network adapter2, this is connected to gns3, here we can see that the attached 20
to is generice driver and the name is UDPTunnel. This is changed automatically when we connecting 21
the ubuntu with router inside gns3. 22
And then to connecting ubuntu with our laptop, we need to add one more interface, so let’s 23
enable network adapter 3. 24
Attached to is host only adapter, and here, in the name, this is not selected. 25
This is means that we don’t have host only adapter yet. Let’s create it first. 26
Cancel this, go to file, and then host network manager. Here we can create. 27
Here we can see that by default the ip address is 192.168.56.1, close this. 28
Now let’s check on our laptop, open the terminal, ifconfig, 29
Here we can see that now we have 1 new interface, which is vboxnet0. 30
Now let’s configure the ubuntu again, enable network adapter 3, attached to is host only 31
adapter, and here we can choose vboxnet0. 32
Okay we have done here, let’s start the ubuntu again. 33
Let’s login, now let’s configure the ip address that connected to our laptop. Let’s 34
check the interface first, ip address, 35
Okay here we only have 2 interface. So the new interface is not detected yet. Shutdown 36
the ubuntu first. 37
Right click here and then choose configure. In the network section, here we can see that 38
the interface is still 2, 39
Let’s also check on the virtualbox, 40
Okay here the network adapter 3 is not enabled yet, let’s enable this. 41
And then in the gns3, we also need to change this become 3. 42
Okay we get an error here, this is means that we can not add new interface when there is 43
a cable connected to the ubuntu. 44
Let’s close this, and then remove the cable first. 45
Configure again, and then change the network to 3. 46
Let’s also configure the template, so if we import ubuntu in the other project, we 47
don’t need to configure the network adapter again. 48
Right click here and then configure. 49
Here the interface is still 2, let’s change this become 3. 50
Okay now let’s connecting the ubuntu to the switch again. Remember that we need to 51
connecting ubuntu with gns3 in the second interface, first interface is connected to 52
internet, and the last interface is connected to our laptop. 53
Let’s start the ubuntu, 54
Wait for a minute . Let’s login, now let’s check the interface, 55
okay here now we have 1 new interface, which is enp0s9. This interface is connected to 56
host os or our laptopo. 57
We will need to configure the ip address of this interface based on the ip address in 58
the virtual box. Let’s check it, here we can see that the ip address in the virtualbox 59
is 192.168.56.1, this is the ip address on the host os or our laptop. Let’s check it, 60
Ifconfig, here we can see that the ip address of vboxnet0 is 192.168.56.1 61
So in the ubuntu server, we need to configure the ip address become 192.168.56.x, let’s 62
say we are going to use 2, so the ip address will be 192.168.56.2. 63
let’s start, go to ubuntu, sudo nano /etc/netplan/00-installer-config.yml. 64
type the password. 65
Now let’s configure for enp0s9. 66
Save the configuration, ctrl + x , y , enter. 67
Let’s apply the configuration, sudo netplan apply, let’s check again, ip address, okay 68
here we can see that now the ip address of enp0s9 is 192.168.56.2. 69
Let’s try ping to host os, ping 192.168.56.1., okay this is success. 70
So now we have done connecting guest os or virtual machine with host os or our laptop. 71
Now we can remote the guest os from host os using ssh. Remember when we install the ubuntu, 72
we also install ssh server. 73
Open the terminal, ssh ubuntu and then the ip address of ubuntu, which is 192.168.56.2. 74
Okay I get an error here, this is because I already remote 192.168.56.2 before. Just 75
remove this. 76
Let’s remote again, 77
Okay we are success remote the ubuntu from our laptop. 78
I think enough for this video, thank you for watching and see you on the next video.