Virtual network with EVE-NG on Packet.net

Justin Guagliata
Jul 21, 2017 · 4 min read

Having a lab to study and mock designs for customers has always been a necessity for me. Over the years, I have had access to several physical network labs as well as utilising virtual labs such as GNS3.

Recently, EVE-NG which is the predecessor to UNetLAB was released. EVE-NG is a bare metal linux distribution (based on Ubunutu) which allows you to create a network lab of virtual devices. It does this by providing an easy to use web front end.

I recently discovered packet.net and was intrigued by their offering of a bare metal server with (1 × Atom C2550), 8 GB of DDR3 RAM, and 80 GB of SSD for just $0.05 per hour or $36.50 per month.

Will the following guide, you can be up in running in ~20 minutes. Note:

Note:I’ve only tested the following guide with the “0 instance” .

Packet.net Setup

Account setup is pretty straight forward. Unfortunately for me, I triggered the fraud detection when creating my account but they approved my account less than 10 minutes later. There is a free $25 dollar coupon code if you use the following link when signing up: https://www.packet.net/promo/hacker-news/

Once you have your account created, you will need to create an ssh-key to login to the server. This ssh-key will be pushed to automatically to the vm’s that you create.

Creating SSH-KEY(Mac/Linux)

Create a key-pair by typing

ssh-keygen -t rsaGenerating public/private rsa key pair.

Next, you will be prompted for a location to save your new public key.

Enter file in which to save the key (/Users/user/.ssh/id_rsa)

Finally, you will be asked to enter a passphrase.

Enter file in which to save the key (/Users/user/.ssh/id_rsa):Enter passphrase (empty for no passphrase):Enter same passphrase again:

This process will generate a file (in this case id_rsa.pub) which you will need to copy the contents of in to your packet.net portal.

cat ~/.ssh/id_rsa.pub

Copy the output of the above in to the portal.

Creating the server

We create a new server using Ubuntu 16.04 LTS. We will use the ubuntu image that is offered with packet.net with a custom install script. This method will have several advantages.

  • Not needing to host the eve.iso and perform a ipxe boot
  • Display redirection to the serial port is already configured.
  • This prebuilt image will already have our ssh keys added
  • The bonded Network adapters are already configured.

After pressing deploy, The process will take between 5 and 10 minutes.

Once the server is finished being provisioned you can ssh to the server. You will need to specify the keyphrase that you used above each time you connet.

ssh root@yourhostip

Installing EVE

The following script is a a modified version of the install script that the eve.iso install cd uses. This is the script that adds the eve specific packages to the system (along with the supporting packages)

You will next need to copy the script to your server and run it. The below link is just a shortened link to the above gist.

wget https://goo.gl/te11kV -O eve-install.sh
chmod 755 eve-install.sh
./eve-install.sh

The script will take 5–10 minutes to install. After installation you will need to perform a reboot.

reboot

Once the server is finished rebooting, you should be able to login to the web interface with the default credentials of admin/eve.

Since most of the devices you will want to virtualize are covered by licenses,etc; they aren’t included with eve-ng. At this point you will need to add software images to eve-ng create the virtual devices.

There are lots of tutorials you can follow on the eve-ng site which show you how to add images.

http://www.eve-ng.net/index.php/documentation/howto-s

)

Justin Guagliata

Written by

CCIE #36702.Network Consultant>

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade