How do access a web application on virtual box from the host machine?

0Shares

When we install an operating system like Windows in a VirtualBox VM, by default the network setting for the virtual box would be “NAT“. So, any web application or web URL which is in the VM to be accessed from the Host Machine, we need to change that setting to  “Bridged Adapter“.

Here is what you need to do:

Go to “Settings” in the VirtualBox and select “Network” tab. You should see the setting as below:

Figure 1 – Default Setting

Change the setting for “Attached to:” with the option “Bridged Adapter” as below:

Figure 2 – Bridged Adapter

Then restart your VM instance and then go to command prompt in the VM operating system and type “ipconfig“.

Under “Ethernet adapter Ethernet:” check for “IPv4 Address” and the corresponding IP address can be used to access the web endpoint from your host machine.

0Shares