Saturday, 22 April 2017

Virtual Box Host-Guest Machine connectivity Error

Virtual Box networking issue scenario:


  • Both Host and Guest can access Internet
  • Host can ping Guest but Guest is not able to ping Host

The host is running Windows 10 64-bit and the guest is running CentOS 6.4 64bit.

Solution:
  1. Setup the virtualbox to use 2 adapters:
    • The first adapter is set to Bridged Adapter (that will give you the internet connection).

    • The second adapter is set to host only.

  1. Start the virtual machine and assign a static IP for the second adapter in CentOS instance.
  2. Now, to make the connection available both ways (accessing the windows host from the CentOS guest) there's still one more step to be performed. Windows will automatically add the virtualbox host-only network to the list of public networks and that cannot be changed. This entails that the firewall will prevent proper access.
  3. To overcome this and not make any security breaches in your setup:
    • go to the windows firewall section, in control panel,
    • click on advanced settings. In the page that pops up,
    • click on inbound rules (left column), then on new rule (right column). Chose custom rule, set the rule to allow all programs, and any protocol. Click next, select allow the connection, next, check all profiles, next, give it a name and save.

No comments:

Post a Comment