Created a Network using VirtualBox

Apple Virtual Box NAT

So, recently I wanted to do some client/server testing on my laptop. I am using Oracle’s VirtualBox to allow me to run Windows on my Apple. Anyway, when I attempted to network my Windows 7 VM to my Windows 2008 Server, nothing happened. Specifically, they could each ping the gateway and the Internet, but they could not see each other. After digging around the network adapter settings, I figured out that the problem was that I had setup the adapters as “NAT” when they needed to be “NAT Network” instead. But, when I tried to alter my settings, I received the unhelpful error message, “No NAT network name is currently specified”. Why does this mean, and how can it be resolved?

  1. Add a NAT Network name:
    • Run VirtualBox
    • From the VirtualBox menu | Preferences… menu item
    • Goto the Network tab
    • Press the plus (+) button on the right-most side of the dialog
    • Click the OK button
  2. Change the Network of the Win7 machine:
    • Highlight the virtual workstation
    • Click the Settings button
    • Goto the Network tab
    • Highlight the ethernet adapter (generally Adapter 1)
    • Check the “Enable…” checkbox
    • Select “NAT Network” from the “Attached to” dropdown list
    • Select “NatNetwork” from the “Name” dropdown list
      (Note: I am assuming you left the default name in step one above)
    • Press the OK button
  3. Change the Network of the Server machine:
    • Highlight the virtual workstation
    • Click the Settings button
    • Goto the Network tab
    • Highlight the ethernet adapter (generally Adapter 1)
    • Check the “Enable…” checkbox
    • Select “NAT Network” from the “Attached to” dropdown list
    • Select “NatNetwork” from the “Name” dropdown list
      (Note: I am assuming you left the default name in step one above)
    • Press the OK button
  4. Start the machines and test:
    • Within VirtualBox, highlight the Win7 machine and press the Start button
    • Within VirtualBox, highlight the Server machine and press the Start button
    • Login to each virtual machine
    • Open a DOS command prompt (Run | CMD) on each machine
    • Check the IP address of each machine (ipconfig)
    • Validate connectivity (ping <ip address>)

Notice that if you have any trouble pinging between the Windows machines, you probably have the default Windows firewall blocking pings. You can either open Control Panel and disable the firewall or you can follow the steps in this other blog post to allow pings to pass through an enabled firewall. For details, see the following:
https://www.orionscache.com/2012/06/enable-pings…