Creating Ubuntu Live Server 22.0 in Virtual Box and interacting with Ubuntu 22.0 Client

Creating Ubuntu Live Server 22.0 in Virtual Box and interacting with Ubuntu 22.0 Client

Following setting as neccessary in virtual box to work:

In NAT -> Port Forwarding:

Rule 1:

Name=Apache, Protocol=TCP, Host IP=192.168.1.x, Host Port=8080, Guest IP=10.0.2.x, Guest Port=80

Rule 2:

Name=ssh, Protocol=TCP, Host IP=192.168.1.x, Host Port=2222, Guest IP=10.0.2.x, Guest Port=22

In server. following firewall settings needs to be enabled:

sudo ufw app list

Your output will be a list of the application profiles:

OutputAvailable applications:
  Apache
  Apache Full
  Apache Secure
  OpenSSH

sudo ufw allow 'Apache'

sudo ufw status

Check your webserver:

sudo systemctl status apache2

Check in Client Machine

http://192.168.1.x:8080/

Links used as reference to setup :

https://www.digitalocean.com/community/tutorials/how-to-install-the-apache-web-server-on-ubuntu-22-04

https://superuser.com/questions/1147554/how-to-access-apache-server-running-in-virtualbox-from-host

Logging into the Server using ssh:

ssh -p 2222 arun@192.168.1.x

To upload the file to Server using scp:

scp -P 2222 index.html arun@192.168.1.x:/home/arun

Useful Links:

https://www.makeuseof.com/how-to-ssh-into-virtualbox-ubuntu/

https://sandilands.info/sgordon/accessing-virtualbox-guests-using-ssh-winscp-tunnelling