virtualization - Oracle VirtualBox networking - Can I make a network that doesn't use any of the host computers?

07
2014-07
  • user322631

    I'm planning to test viruses, and I don't want it getting to my other computers on my network, so nobody else will be mad. Is there a way to make a network like that? I've been watching danooct1 and rogueamp.

  • Answers
  • user55325

    Yes. You can set the networking mode to Internal networking. Create a new internal network, set each VM to use that network, and either enable the Virtualbox DHCP server or set up the IP addresses manually.

    Network settings page

    Once you do this, the VMs will be attached to their own internal network, provided by a virtual switch managed by the VirtualBox driver. The guests will be able to see each other, but the host machine and any network it's attached to will be inaccessible to the guests.


  • Related Question

    ubuntu - Connect to virtual host computer from within virtualbox
  • Nicky De Maeyer

    I'm currently developing on an Ubuntu Karmic. For this I've installed lampp with a virtual host on apache so http://myproject/ is mapped to my project's root directory.

    Now to test the website in IE I've installed an XP machine on a virtualBox OSE. I've managed to get the virtual host working on the XP machine by adding it to the hostfile, like this:

    255.255.255.255 myproject
    

    where 255.255.255.255 is the ip adress of the host computer (my ubuntu).

    Now every day when I come to work and plug in my computer to the network, my IP has changed. so When I boot the XP I have to change the IP in the hostfile to my new IP. Is there any way where I can set the ip to somthing the XP will recognise as the host machine?

    I've tried replacing the IP in the hostfile by the host computer name, but that does not seem to work...

    This would make my life a bit easier :)


  • Related Answers
  • Greg Bray

    I assume that you are currently using Bridged networking in virtualbox, in which case your virtual machine is getting it's IP address from the DHCP server on your local network. If you were using a Windows host instead of Ubuntu you could use the computer's name instead of it's IP address to connect. Installing Samba may activate NetBios for Ubuntu, but I've never done that before.

    Since your local IP address changes you may want to use NAT networking instead of Bridged. This will mean that your virtual machine is not accessible except from your local machine or other VMs, but the local machine will be assigned a private address such as 10.0.2.2 which shouldn't change as frequent as your network ip address. You could also use Host only networking, which is a private network between your virtual machine and host machine that does not allow the virtual machines to have access to your local network (ie: no Internet access).

    Here is more information on how to setup networking in virtualbox.

  • Nate Koppenhaver

    You could assign your VM a static IP address in bridged connection mode (typically x.x.x.256 onwards), this range usually isn't assigned by DHCP. You could also check with your network administrator to check what the defined DHCP IP range is and use an IP outside of that range as your VM's static IP address.

  • Neal

    I think you should look at the type of network that Virtualbox is using for your virtual machine.

    My preferred method of networking using Virtualbox is to use Bridged networking mode. Here, your virtual machine will appear on the same network as the host - it is just like having another physical machine plugged into the same router as the host machine.

    Otherwise you could look at using host-only networking, which appears to me to offer what you want, but I've never used it.