====== Basic Lab Setup ====== For this lab sessions, we are using your host machine as the ssh client and your Ubuntu VM as the ssh server. Please download following applications * {{https://the.earth.li/~sgtatham/putty/latest/w64/putty.exe|PuTTY}} (the Telnet and SSH client itself) * {{https://the.earth.li/~sgtatham/putty/latest/w64/puttygen.exe|PuTTYgen}} (an RSA and DSA key generation utility ==== Setting up virtualbox ==== === Installation of virtualbox and Downloading Ubuntu iso image === * Download and install virtualbox latest * Download Ubuntu 18.04 Ubuntu image from the {{https://ubuntu.com/download/server|official ubuntu website}} * Note down the location of downloaded iso file === Creating the VM === Start virtualbox and Click on New button (at top-right) to create new virtual machine Enter name of the VM as: **Ubuntu**. Select OS Type: **Linux** Select Version: **Ubuntu (64-bit)** Then click on **Continue** button * Set VM's memory size to **1024MB** and click on Continue button * Set VM's hard disk option to **Create a virtual hard disk now** and then click on **Create** * Select disk type to **VDI** * Select storage type to **Dynamically Allocated** and **Continue** * adjust the disk size to **12.0GB** and click on **Create** to create the VM This might take couple of minutes (Note down the location of vdi image file when virtualbox flashes it on the screen) === Setting up Network Interface === * Select the VM from left panel on Virtual box, right click and open **Settings** * Click on the **Network** title * On **Adapter 1** While ''Enable'' Network Adapter selected choose Attached to be **Bride Adapter**. This virtual interface will work as the WAN port of the firewall (Can be connect from out side). === Setting up boot device and Booting=== * Click on **Storage** title and select **CD ROM icon** with Caption "Empty" under the **Controller:IDE**, Click on CD ROM icon under the **Attribute** on the left side to select * Choose **Virtual Optical Disk File** * Locate the **Ubuntu CD Image** file you downloaded. Press OK to close the settings window. * Right click on VM and select Start to make a **Normal Start**. You should now see a separate window with Installation screen" === Installation === Installation is quite simple. You can figure it out your self; (Next... Next... Next) If asked, make sure you select **Install OpenSSH Server**. We may also not need any **Feature Server snaps** at the moment. Detailed installation guide can be found in the {{https://tutorials.ubuntu.com/tutorial/tutorial-install-ubuntu-server#0|ubuntu official documentation}} === Setting UP IP Addresses === After you install the Ubuntu OS, change the IP address. Run the commands below to create a new network configuration file sudo vi /etc/netplan/50-cloud-init.yaml Press **i** to edit the file Then configure IP addresses as shown below # This file describes the network interfaces available on your system # For more information, see netplan(5). network: version: 2 renderer: networkd ethernets: enp0s3: dhcp4: false dhcp6: false accept-ra: no addresses: - / - / gateway4: gateway6: nameservers: addresses: - - Exit and save your changes by pressing **esc** and type **:wq** Run the commands below. sudo netplan apply Then check the connectivity by pinging your favorite destination.