Pages

Monday, April 30, 2018

Configuring Eve-NG on Google Compute Engine

In this blogtorial I will walk-through on how to deploy Eve-NG on the cloud and more specifically on Google Compute Engine. I've tried Eve-NG on AWS and Azure but neither of them actually worked since nested virtualization isn't supported or is a very convoluted process (i.e Ravello).  Google Compute Engine was also the cheapest option at the time of this writing. 

Why deploy Eve-NG on the clould?


This whole blogtorial came about because I wanted to study advanced topics in the CCIE DC curriculum such as VXLAN with BGP EVPN. In order to virtualize the type of routers capable of running these advanced DC technologies it requires a lot of RAM and CPU. In addition, I didn't need these routers to be running all the time wasting power, so I needed the flexibility of powering these devices on and off. I decided to search google on how to virtualize the topology and much to my surprise, I could not find an article that encompassed all the steps. After reading about 15 different articles and stitching together all the information, I decided perhaps I should write an article that has everything you need to know (the whole nine yards!!) on how to get Eve-NG on the cloud (Google Compute Engine). 

If you follow this article from step 1 to step Z, you will end up with a fully functioning google instance running Eve-NG. 

First, register for a free google compute engine account and then log into the console (I believe you get $300 in free credits ... so enjoy!!). Once you log into the console, click on "Activate Google Cloud Shell". 


Once you activate it you should see something very similar.




We need to create a custom image (that enables Virtualization) from an Ubuntu base image which we can then use it to build the system so we can install Eve-NG accordingly.


Once the command completes you should see a custom image with status = 'READY'.


Once the process completes you are now ready to create a google compute vm instance.


Create the instance accordingly.


Feel free to give it as much as RAM and CPU as you like and finally click on "Change" under Boot Disk.


Now specify the custom image you created with vmx enabled and I also went with a bigger HD because of all the images I wanted to upload to Eve-NG to virtualize.


Allow HTTP traffic so you can log into the Eve-NG web console.





Get a public IP that is static so you can start and stop your instance and still retain the same public IP.


Follow the steps below to gain access into the Linux Machine.





Now follow the rest of the steps to allow root access into your machine via SSH from anywhere in the world.

Set the root password.



Permit RootLogin.
Set PasswordAuthentication to yes
Save and Quit


Restart sshd service.


Follow the rest of the steps to now install Eve-NG on top of your Ubuntu.



Update the grub.


Edit the following file to rename the interface to eth0 on boot.



Reboot the machine and you should have eth0


Upgrade and update.


Run the install command and reboot. (Thanks to Besal Mon for reminding me this)

DEBIAN_FRONTEND=noninteractive apt-get -y install eve-ng


You might have to run the install command a couple of times. But once the install completes log out and SSH back in as root and you should see the blue installation prompt below.


Accept the default options through all the prompts.


After it finishes you should be able to hit the IP address (the public address that you created earlier in the process) for the Eve-NG console.



Make sure you can SSH into your ubuntu machine and see that vmx and kvm_intel is showing up.


Now we need to edit Google Compute Engine firewall so that we can telnet into our virtual devices on Eve-NG.

This firewall rule is pretty relaxed for illustrative purposes, so edit your firewall accordingly.

Go to Firewall Rules under VPC Network.


Create a new firewall rule.


Basically create a rule that allows any source to your server public IP on ports 32000 - 65535. Seems like Eve-NG picks ports after tcp:32000. 



Also make sure that you have SSH allowed through the firewall as well.



Drop me an email or comment if you have any issues setting this up.

Many more articles to come so ....

Please subscribe/comment/+1 if you like my posts as it keeps me motivated to write more and spread the knowledge.

No comments:

Post a Comment