• Host OS: Windows 7
  • Guest OS: Ret Hat Linux (RHEL 6) and Windows 7

I want to connect to both guest OSes. I tried to ping both guests, but it is not working. Both guests can ping my Windows 7 host though.

  • 2
    Hi Kuldeep. While I understand you might not be proficient in English please at least use a spell checker and properly capitalize. Also, you might want to edit your question and tell us more about how you set up networking in VirtualBox, what the IP addresses of your systems are, et cetera.
    – slhck
    Dec 18, 2012 at 15:18
  • Hi @kuldeep, if you found any answer helpful please choose it as the correct answer. Thanks May 29, 2016 at 15:49

11 Answers 11


I was surprised to find the answer that finally worked for me in an ubuntu forum:

Depending on the version of Windows you used in your VirtualBox, in order to be able to get a reply to your pings you probably need to create at least one folder share on the Windows machine. In Windows XP for example, once you have at least one share set up, the machine will respond to pings. But if no shares are set, no pings will be returned.

(Have a look at the full answer, here: http://ubuntuforums.org/showthread.php?t=2028309)

So basically what I did was:

  • Use Bridged Mode instead of NAT for the VM in the host VirtualBox GUI
  • Shutdown the firewall in the windows host
  • Setup some foo shared folder in the VM itself (c:\foo or similar)

EDIT: to clarify, my setup is Windows7 Host & Windows7 Guest.

That's that, hope it helps someone.

  • 3
    Adding the shared folder works as well when it is a Windows Server 2008 VM.
    – tyh
    Dec 10, 2014 at 15:51
  • 2
    this strange solution worked : I added a shared folder on Windows VM guest OS. Note that a window asking for switching on "private network" appears, so maybe the type of network was not good .. ("public" ?)
    – Donatello
    Apr 26, 2015 at 12:03
  • This is probably the strangest thing I ever read. I too can confirm that this worked with my Win10 guest and bridged mode and without deactivating the firewall. How could anyone find out this himself / herself? Thank you very much!
    – StanE
    May 25, 2016 at 19:44
  • Having the same problem but it only happens when I introduce a VNIC in the virtual machine. It was working fine earlier but as soon as I create a VNIC, I am unable to ping the Virtual Machine from my other OS. Any ideas what might be happening?
    – Alchemist
    Aug 26, 2016 at 12:22
  • 1
    worked for me. Host = Windows 10 and Guest Windows XP
    – Souza
    Sep 21, 2018 at 19:47
  1. If you want your VM to be accessible on network like a standalone machine (I guess that is what you trying to do), check following

    • In VirtualBox GUI interface, under network setting of each VM, select bridge mode, not NAT.

    • Within each VM, either setup static IP or dhcp.

  2. For firewall blocking issue, Check out my answer for another question here

    On hosting machine, in file explorer, go to

    Control Panel\All Control Panel Items\Windows Firewall\Allowed apps

    The above path is for windows 8, other windows version may differ slightly.

    Look for application name (eg. Virtual Box is "Oracle VM VirtualBox"). There are 3 check boxes for the application, check mark them all, restart your app and it should work.


Tested on two Ubuntu 16.06 guest boxes

you will need to use "ifconfig -a" to list all available network interfaces - at first you run just an "ifconfig" (without the -a flag), memorize network interfaces that it shows you and then run it again with the -a flag, and find that extra interface. In my case by running just a "ifconfig" I got two interfaces - “enp0s3”, “lo” and when running with “-a” flag I got an extra interface - “enp0s8”. After we got a name of that extra interface name you edit /etc/network/interfaces file and append these two lines there:

auto enp0s8 iface enp0s8 inet dhcp

After that change you reboot the machine and now when running “ifconfig” should get a host-only adapter’s IP that you can use to connect from you host machine.

Both of the guest os have different ips. I am able to ping host from both guests, guest to guest and guests to host.

Source: answer by sergeil


If Mick's settings don't work for you,this may. I followed Mick's settings, but was unable to ping back to the VM Guest in the end. I made one change, and that was to enable the firewall and set to "WORK", instead of disabled. I edited the firewall via "Allow Programs to communicate through windows firewall", and selected "File and Print Sharing" under Home/Work (Private) profile. I was immediately able to ping my VM Guest from another pc in the LAN. I'm pasting Mick's settings below for clarity and single post help. Thanks Mick!!

0-Use Bridged Mode instead of NAT for the VM in the host VirtualBox GUI 0-Shutdown the firewall in the windows host 0-Setup some foo shared folder in the VM itself (c:\foo or similar) 0-EDIT: to clarify, my setup is Ubuntu 16.04 running Oracle Virtual Box 5.0.24 Host & Windows7 Guest.


I searched 3 days for a solution why I couldn't ping between my windows server 2016 guests on my Virtual Box internal network ... it appears that the firewall is blocking the traffic!

either find the firewall rule needed to allow or disable using the following command get-NetFirewallProfile | set-NetFirewallProfile -enabled false


Turn on network discovery!

I went to network. Turn on network discovery on the guest machine (Windows Server 2012 R2). I think it will work for other guest OS.

Also check from other answers. 1) Host OS (Windows) - Firewall add Oracle Virtual Box into allowed programs 2) Guest OS - use bridge network adapter


I set the network adapter from NAT to Host-Only and it automatically addressed a new ip to my guest machine. It was 10.0.x.xx and now 192.168..xx.xxx. Then i pinged it from the host and it responded. Hope it helpes someone!

  • Make sure the host firewall should allow ICMP echo packages
  • Allow ICMP echo package for IP v4 or IP v6 as needed for your purposes like this:

    netsh advfirewall firewall add rule name="ICMP Allow incoming V4 echo request" protocol=icmpv4:8,any dir=in action=allow profile=private,domain
    netsh advfirewall firewall add rule name="ICMP Allow incoming V6 echo request" protocol=icmpv6:8,any dir=in action=allow profile=private,domain

Be sure to choose the apropriate profile: You can restrict the rule to the domain, a private network or a public network or any.

Credit goes to HowToGeek

The other solutions are leading to a firewall entry, which allows ICMP echo packages to pass the firewall too, but I think it should be kept simple.

  • As I hope you understand, the article you linked to is about letting ping requests into a Windows box (and letting ping responses get out). But this question is about sending ping requests out of a Windows host and letting ping responses get in. Why do you believe that this is the same problem? Also, did you notice that the Windows 7 guest can ping the Windows 7 host? Nov 1, 2018 at 7:11

This comment is for a Windows XP host which allowed me to ping a Windows XP guest from a Windows 7 host:

  • In the Windows XP guest, Control Panel > Network Connections
  • Local Area Connection > Properties > Advanced > Windows Firewall > Settings
  • Advanced > ICMP > Settings
  • Tick "Allow incoming echo request"
  • Close all boxes

I was able so solve the problem of not being able to ping the Guest VM from the Host by following these steps:

In Guest VM:

  • go to "Network & Ethernet" section in Windows Settings app
  • go to "Network and Sharing Centre"
  • go to "Change advanced sharing settings"
  • select "Turn on file and printer sharing"
  • Save changes

My setup:

  • Host = OSX (10.13.6)
  • Guest = Windows 10 (OS Build 19041.450)
  • Hypervisor: VirtualBox

Instead of doing any hack, just do these steps as they might be the real issue than any issue in the industry standard products. Assuming you have ubuntu guest (adap the idea and apply to other vm).

  • Step 1: Ensure that in the VirtualBox, the vm has interface as bridged (and not NAT or NAT Internal etc.). Now in guest vm, assign a suitable IP in the subnet where the host is having (check IP of host, and try pinging IP next to it to find available ip)

  • Step 2: Lets assume that host has ip Ping 68, 69 .. and see which one is not in use. Or just start from end, try Assign this ip to the interface of vm:

sudo ifconfig enp0s3

(Your router may assign some other IP. Note it) From host, ping the IP or do SSH etc.

  • Step 3: If step 2 does not work but IP is assigned, it is still a good sign. Check ufw or iptable rules and see if firewall is stopping anything.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.