How to config Windows firewall so VM Host-only can ping Windows 7
Solution 1:
I ran into this issue recently when I started doing Linux development on a Windows laptop where the source code was on the host and it was shared over CIFS* to compile on a CentOS VM.
- Open Windows Firewall and click on Advanced Settings:
- In the overview panel, click on Windows Firewall Properties
- Click on Public Profile Tab, Protected network connections, and unselect Virtual Host-Only Network
That's it! You can disable the adapter from Domain and Private Profile as well but you should not have to. The root cause of the problem seems to be that the host-only adapter is set to public instead of private, but I never did manage to find a solution to change that setting for the host-only adapter.
My solution assumes that you trust the communication between the host and the guest while keeping the firewall active for other adapters. If you want to be more narrow in what you let through between the host and guest VM, you can also edit the individual inbound and outbound rules to allow certain traffic through.
This solution also works when you take your laptop and connect to your work Wi-Fi or tunnel in through VPN which may change your local subnet.
** I found that using VirtualBox's shared folder performance is abysmal (5x slower for my project) - hence the CIFS.*
.