/var/www/html.http://localhost:8080.CentOS9-WebLab.Username: student Password: password123
Open the VM settings in VirtualBox and go to:
Settings → Network → Adapter 1 → NAT → Advanced → Port Forwarding
| Name | Protocol | Host IP | Host Port | Guest Port |
|---|---|---|---|---|
| SSH | TCP | 127.0.0.1 | 2222 | 22 |
| Field | Value |
|---|---|
| Host Name | 127.0.0.1 |
| Port | 2222 |
| Connection Type | SSH |
sudo dnf update -y sudo dnf install -y wget curl vim net-tools sudo dnf install -y httpd mariadb-server php php-mysqlnd php-cli git
Enable and start the services:
sudo systemctl enable --now httpd sudo systemctl enable --now mariadb
sudo firewall-cmd --permanent --add-service=http sudo firewall-cmd --reload
sudo rm -rf /var/www/html/* sudo git clone https://github.com/tariqbuilds/linux-dash.git /var/www/html sudo chown -R apache:apache /var/www/html sudo chmod -R 755 /var/www/html sudo systemctl restart httpd
Within PuTTY, navigate to:
Connection → SSH → Tunnels
| Field | Value |
|---|---|
| Source Port | 8080 |
| Destination | 127.0.0.1:80 |
L8080 127.0.0.1:80
Keep the PuTTY session open. On the Windows host machine, open a web browser and navigate to:
http://localhost:8080
If configured correctly, the Linux Dash monitoring dashboard should appear.
| Task | Expected Result |
|---|---|
| SSH Port Forwarding | Host port 2222 forwards to guest port 22 |
| PuTTY Login | Successful remote login |
| Apache Running | systemctl status httpd shows active |
| MariaDB Running | systemctl status mariadb shows active |
| Linux Dash Installed | Files exist in /var/www/html |
| SSH Tunnel Working | http://localhost:8080 loads successfully |
sudo systemctl enable --now sshd sudo systemctl status sshd
sudo systemctl status httpd sudo firewall-cmd --list-all
The student should successfully access:
http://localhost:8080
and see the Linux Dash web application running from the CentOS 9 virtual machine through the PuTTY SSH tunnel.