Apr 16, 2021 by Thibault Debatty | 849 views
cyrange is a Cyber Range platform built on top of VirtualBox. It brings some some additional features to support education and training:
Here is how you can create your own virtual machine (OVA), to run smoothly with cyrange.
To support guest configuration:
vagrant(don't worry, the password will be automatically modified during deployment);
vagrantuser must be allowed to used sudo without a password.
To support the Guacamole web interface, the keyboard must be configured as
For the best experience, we also recommend to:
Here is a step-by-step guide, for a Ubuntu 20.04 server image.
Create a new virtual machine. You an use the default settings, except for the harddisk. Choose to create a new virtual disk, with dynamic allocation, and a size of 1000GB (or more).
Start your VM, and begin the installation of Ubuntu, as usual.
For the keyboard, select English (US), even if you have a different layout.
Create a user named
vagrant with password
Select the option to install OpenSSH server.
And wait for the installation to finalize... After the VM has rebooted, you can continue with the installation.
To configure the guest VM, cyrange will use ssh to log in as user
vagrant. Then it will use sudo to execute the different configuration commands. Sudo usually asks the password of the user before commands are executed. To allow user vagrant to run sudo without providing a password:
and add the following line:
vagrant ALL=(ALL) NOPASSWD: ALL
At the time of writing, VirtualBox guest additions are at version 6.1.18. Here is how to install the guest additions from the command line:
sudo apt-get install -y dkms build-essential linux-headers-generic linux-headers-$(uname -r) wget http://download.virtualbox.org/virtualbox/6.1.18/VBoxGuestAdditions_6.1.18.iso sudo mount -o loop,ro VBoxGuestAdditions_6.1.18.iso /mnt sudo sh /mnt/VBoxLinuxAdditions.run sudo umount /mnt rm VBoxGuestAdditions_6.1.18.iso
sudo apt install aptdaemon
aptdaemon allows to install packages in the background. This means in your template, you can use the cli too
aptdcon to schedule the installation of packages:
yes | aptdcon --hide-terminal --install <packages>
Moreover, this will avoid errors like "Could not get lock /var/lib/dpkg/lock" and sibblings during deployment...
sudo touch /etc/cloud/cloud-init.disabled
This will speedup the boot process!
sudo nano /etc/apt/apt.conf.d/20auto-upgrades
APT::Periodic::Update-Package-Lists "0"; APT::Periodic::Download-Upgradeable-Packages "0"; APT::Periodic::AutocleanInterval "0"; APT::Periodic::Unattended-Upgrade "0";
To free some disk space, you can run:
sudo apt-get clean
You can now shutdown and export the VM as a
Once done, you can import the ova in cyrange, and deploy your machines...
You can perfectly deploy windows machines on cyrange, but be aware that we currently don't support guest configuration. Moreover, windows images are usually quite large, so you should clean and compress your windows vm before you export.