Hawaiideveloper / Infastructure-as-Code-Sample_Env

Take your infrastructure mobile and restore on bare metal, or into your favorite borrowed hardware aka cloud
1 stars 3 forks source link

VirtualBox Networking (Getting internet and accessing your VMs via SSH) #60

Open Hawaiideveloper opened 3 years ago

Hawaiideveloper commented 3 years ago

When trying to access my VM via SSH I was unable to.

Bridge Mode

I think it has to do with the Library not providing an IP address until the machine accepts the terms and conditions. However the machine does not have a physical wifi adapter and thereby it does not make a direct connection to the wifi router to start the captive portal.

By not starting the captive portal, it can not be assigned an IP.

Therefore bridge connection is not possible.

Hawaiideveloper commented 3 years ago

Nat mode

To enable:

VBoxManage modifyvm Put_your_virtual_machine_name_here --nic1 nat

Screen Shot 2021-07-21 at 2 02 39 PM

This will allow two VMs to talk to each other, but it does not solve how to allow public internet access to a Virtual Machine.

Hawaiideveloper commented 3 years ago

Create 3 Nics on the Virtual Machine:

VM as a bastion host by means of it operating one machine through another.

Screen Shot 2021-07-21 at 3 34 33 PM