Sorry for duplicating the question from stackoverflow (http://stackoverflow.com/questions/17366252/cant-connect-from-local-network-to-ubuntu-12-04-installed-on-virtualbox-4-2-14), but it seems that the question is more relevant to serverfault.
I hardly understand what I'm doing when it comes to networks, so I will be really thankful for exact steps that I need to perform to allow connections from local network to Ubuntu 12.04 installed on VirtualBox 4.2.14 on another PC. After reading several tutorials I set VM Network adapter 1 to NAT and Adapter 2 to Host-only Adapter, so now I am able to
ping 192.168.56.101 (VM ip) from the PC, at which VM is installed. However I can't ping it from other PCs in my local network. I get the following reply:
Reply from 188.8.131.52: Destination net unreachable (ip in the reply is different from the one I pinged if it matters). Firewall is switched off. My main system is Windows 7, so VirtualBox runs on Windows 7.
etc/network/interfaces looks like this:
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet dhcp auto eth1 iface eth1 inet static address 192.168.56.101 netmask 255.255.255.0
Here https://forums.virtualbox.org/viewtopic.php?f=1&t=42385 I found a recommendation to add a third Bridged Adapter and add the following lines to etc/network/interfaces to be able to access VM from other PCs in the workgroup via 192.168.1.10.
auto eth2 iface eth2 inet static address 192.168.1.10 netmask 255.255.255.0
But for some reason I can't add the third adapter, as Adapter 3 and Adapter 4 tabs in VM settings are disabled (screenshot at http://i.stack.imgur.com/BmrwG.png). Ideally the VM with Ubuntu would look like a separate machine in the local network, so I can access it from any other PC and also can access local SQL Server from VM.