Showing posts with label lab. Show all posts
Showing posts with label lab. Show all posts

Sunday, December 30, 2018

Add a Virtual Router on your Lab Network (Part 1 VM Installation)

My preferable setup is to bridge the Laptop Ethernet NIC with all the VMs in order to separate my Home Network with my Lab one. My VMs won't have a direct access to the Internet. In a typical real-life small office  network, you will have a switch that connects all your devices and a Router that is connected with your ISP and routers the internet traffic. 

In this case, the Wireless Network is our path to the internet, so we will consider it as our ISP and the Ethernet will be considered our Internal Network (and where we will place all our VMs). The gateway that connects those two different networks is a VM with two interfaces, one on the Ethernet (internal) and one on the Wireless (internet). The different is that normally the ISPs would provide you with a public IP Address, while in our case the "outside" network will be on a private range "192.168.0.0/24). But we can still use different technologies like NAT, ACLs etc. 







We will choose VyOS, formerly known as Vyatta. Vyatta was acquired by Brocade and later by AT&T and is not an open source OS any more. VyOS, a Debian (Linux) network Operating System and is based on the latest "public" version of Vyatta, so it is free to use. 

In future for testing purposes, we can replace that VM (by simply saving its state) and add setup Device , a Cisco CSR 1000V, Cisco ASA, Palo Alto etc. Once we finish our test, we can resume again our Main Gateway.
You can download the "latest" public version (6.5) of Vyatta realeased by them (2012-11-20 from archive.os website

For VyOS, we have the option to download an ISO (Rolling Release or Stable Release) and build our VM as we did with the Windows machine, or we can download an OVA/OVA File (VyOS on VMWare) that can simplify our lives.

I had some issues with the OVA file on VIrtualBox, so I re-wrote this post using the ISO Stable Image. 



 
On VirtualBox's main page we will press the "New" Icon to create a new VM


We wil specify the name of the VM, the location and the Type/Version would be Linux/Debian.


We will reduce the RAM size from default 1024MB to 512MB. We can expand at any time if needed.


and follow the wizard as in the Windows setup







Before we power up the VM, we will change the Networking settings.Go to Settings...


Adapter 1: Bridged with Wireless NIC


Adapter 2: Enable it, and Bridge it with the Ethernet NIC.



We also want to add the ISO that contains the OS. Under Storage find the Optical Drive and mount the Virtual Optical Disk File. File Name: vyos-1.1.8-amd64.iso


Now we can power on (Start) and configure our Internal Router
The OS will be loaded from the ISO (Virtual Disk). The start screen suggest us to start the installation using the install image command

The default login / password is vyos/vyos



We can press [Enter] or type Yes to continue, since Yes is the default Option.


The installation will create a partition. We will press enter and select the default option - Auto. 


We will install the OS on the main partition, sda. We can simply press Enter


We are warned that any data will be destroyed on the disk, but our Disk was blank, so we don't have to worry. 


We will use all the available partition for our OS - default option. 


After that we can set the hostname , default 1.1.8


The configuration files will be linked to /config/config.boot


Finally we can set a password for the vyos user. 

 


Installation was successful. We will now remove the Optical Disk, in order the OS to boot from our Disk.




After the reboot, the OS loads through the HDD.




Thursday, December 27, 2018

Network Setup for your Virtual Environment

Once we have installed our Hypervisor, we can start implementing and inteconnecting various VMs.The VM adapter can run on different modes


  • NAT (Network Adress Translation) - Default Option
  • Bridged Adapter
  • Internal networking
  • Host-only networking
  • NAT with Port Forwarding
  • Not attached (No NIC)
NAT is a cool technlogy, but because I want to keep networking under my control, I avoid using it. For example, I want to give my VM Hosts specific IPs, I may want the internet traffic to path through a specific Router etc. 

With the NAT setup, each VM can get an IP Address from the Hypervisor, which also acts as a gateway in order the VMs to be able to access outside networks. 

You can setup the NAT networking, by simply going to File > Preferences...




Network TAB and Add new NAT network.




But as I mentioned I will not use any type of NAT networks on any of my Labs. My typical options are:
  • Internal networking - This is my option when I want to create a network that doesn't  have to communicate with the outside world.
  • Bridged Adapter  - This is my default option. The virtual NIC is bridged to one of the Phycial NICs of your Host. This is the easiest way to connect a VM to your physical network, and to the Internet. 
  • Host-only networking - I use this option when I want to connect my VMs with GNS3






Wednesday, December 26, 2018

Initial setup for your Virtual Environment (Oracle VirtualBox)

To test real life scenarios we will need different applications to run and work together, for example an Email, a (DS) Directory Services, a Domain Name System (DNS) , an NTP (Network Time Protocol) Server, a Router etc. Some applications can co-exist on the same “box”, for example a DS and DNS,  but in most cases we will need more than one servers.

So how can we run multiple servers on one physical entity. The answer is simple – Virtualization. We will need a HyperVisor, “a proccess that can create and run Virtual Machines”. (https://www.vmware.com/topics/glossary/content/hypervisor)

There are two different paths that we can choose.

1. Install a Type-2 Hypervisor on top of our Operating System (OS) such as
VMWare Workstation Pro: https://www.vmware.com/uk/products/workstation-pro.html
Oracle Virtual Box: https://www.virtualbox.org/wiki/Downloads

2. Install a Type-1 (Bare Metal) Hypervisor, for example
VMWare ESXi: https://www.vmware.com/uk/products/esxi-and-esx.html
Microsoft Hyper-V: https://www.microsoft.com/en-us/evalcenter/evaluate-hyper-v-server-2019

The Oracle Virtual Box Hypervisor will be my choice, since it is free to use and also VirtualBox is a Type-2 Hypervisor, so the Application runs inside the Operating System. This means that we won’t need another Computer to connect and administer our environment, our (Virtual Machines) VMs.

The installation is very simple. We will use Windows 7 OS.  I think Windows 7 is a very stable OS, it runs much faster and uses less resourses than any newer Windows version. In addition, I have disabled most Visual Effects, to improve performance. I want my OS to use minimum resources, since most of CPU, RAM and Disk will be consumed by my Virtual Environment.  If my OS is taking up a lot of resources, then my VMs will suffer.

The current Virtual Box release (2018-12-26) is VirtualBox-6.0.0-127566-Win
You can also find a beta version that may support more features









Okta Workflows - Send Customised Email

Simiar to the previous flows, where we sent a Slack message to users assigned to a new app, we can send a Welcome Email message. This mess...