Buscar este blog

domingo, 26 de mayo de 2019

Virtual Box Guest connect to Windows Host

You have a Windows Host running Virtual Box, and a CentOS 7 Guest as virtual machine.
Guest needs to connect to some service in Host. As an example, Host has an Apache web server running in port 80.


First, you have to determine the gateway used by the Guest.

enp0s3 is my "host only" network interface in VirtualBox.
In my case, it's 192.168.56.1. This is the IP the Guest knows as Host so, if you call for port 80, you should get Apache home page.

As you see Guest is not able to connecto to Host. In order to allow that, you need to configure Host firewall, in my case, Windows 10.
You can disable firewall for private networks as follow, but this is not a good solition due security concerns.



The proper solution is to configure a firewall rule for this port in the private network.