Prepare a Bare-Metal Server to Host the Labs
Before you start
The size of the bare-metal machine depends on the lab you want to build, see the requirements on the page of that lab. Virtualization must be enabled on the server, and the labs that build private clouds need nested virtualization.
This guide shows how to build the lab environment on a bare-metal host with the help of Proxmox. The procedure is highly automated, so you save time: install Proxmox, prepare a template VM, then let the scripts create the whole environment.
Prepare the sandbox
If you have your own bare-metal host
Install Debian 13 (Trixie) first, then prepare the sandbox
# On the bare-metal node as root
# The node reboots into Proxmox at the end
curl -fsSL nfgd.net/setup/sandbox | bash && reboot
Reconnect after the reboot, then build the lab environment
# On the bare-metal node as root
# Import a VM to be used as template
curl -fsSL nfgd.net/setup/template-vm | bash
# Setup the lab environment
curl -fsSL nfgd.net/setup/<LAB_NAME> | bash # lab-openstack, lab-ceph, ...
If cloud-init is available
If your system / provider supports cloud-init, there is a more convenient
way: pass the predefined user-data.yaml through to cloud-init. It runs the same
steps unattended, the reboot included, so nothing is left to run by hand.
Review it, then paste it into the user-data field.
# Review
curl -fsSL nfgd.net/setup/<LAB_NAME>/user-data.yaml # lab-openstack, lab-ceph, ...
Access the lab environment
The browser sends its traffic into a local port (127.0.0.1:8888), and SSH
carries it through the hypervisor into the lab network.
+-------------+ SSH +-------------+ SSH +-------------+ +-------------+
| Browser |------>| hypervisor |------>| deployment |------>| Lab |
| | | | | | | Environment |
+-------------+ +-------------+ +-------------+ +-------------+
Your PC Bare-metal
server
Configure an SSH tunnel with SOCKS5 proxy
The setup script already generated a keypair and installed it on both the
hypervisor and the deployment node, so download it instead of creating your
own. The TOKEN is on the bare-metal host in /infraguide/setup-sandbox/conf/token.
curl -k -o ~/.ssh/infraguide "https://<HYPERVISOR_IP>:8443/<TOKEN>/infraguide"
chmod 600 ~/.ssh/infraguide
Add the two hosts to ~/.ssh/config. This works the same on Linux, macOS,
and Windows, where the OpenSSH client ships out of the box.
Host hypervisor
HostName <HYPERVISOR_IP>
User root
IdentityFile ~/.ssh/infraguide
Host deployment
HostName <DEPLOYMENT_IP>
User deploy
IdentityFile ~/.ssh/infraguide
ProxyJump hypervisor
DynamicForward 8888
Then open the tunnel with ssh deployment.
After establishing the connection to deployment, check the tunnel on your PC:
# A LISTEN line for 127.0.0.1 port 8888 means the tunnel is up, no line means it is not
netstat -an | grep 8888
Configure your browser to use SOCKS5 proxy
How to configure the proxy in well-known browsers:
| Browser | Windows | Linux | macOS |
|---|---|---|---|
| Firefox | Network Settings | Network Settings | Network Settings |
| Chrome | Launch flag | Launch flag | System proxy |
| Edge | Launch flag | Launch flag | System proxy |
| Safari | not available | not available | System proxy |
Proxy settings to be done:
| Setting | Value |
|---|---|
| Proxy mode | Manual |
| SOCKS Host | 127.0.0.1 |
| Port | 8888 |
| SOCKS version | v5 |
| Proxy DNS when using SOCKS v5 (Firefox) | on |
| HTTP, HTTPS and FTP proxy | empty |
Chrome/Edge: you can start the browser with a separate profile and the proxy flag, the settings in the table are the same.
:: Windows
chrome.exe --proxy-server="socks5://127.0.0.1:8888" --user-data-dir="%TEMP%\lab-profile"
msedge.exe --proxy-server="socks5://127.0.0.1:8888" --user-data-dir="%TEMP%\lab-profile"
# Linux
google-chrome --proxy-server="socks5://127.0.0.1:8888" --user-data-dir=/tmp/lab-profile
microsoft-edge --proxy-server="socks5://127.0.0.1:8888" --user-data-dir=/tmp/lab-profile