really hoping this is right place to ask this question seeing that my host is a Windows 7 machine. I have 3 Ubuntu Server 12.04 VMs set up through VirtualBox 4.1.18, and envisage the following usage:
- LAMP - for Drupal, Moodle and other arbitrary PHP test applications (additionally a few of the Drupal installs need to communicate with some internet services)
- SSH - to SFTP to the
/var/wwwdirectory using FileZilla from Win7
- SMTP service - for Drupal and Moodle installs to send test emails out from them.
Before I continue, I must stress that I'm not deeply knowledgeable with regard to networking in general, but I did read up on a few things to not make a complete fool of myself here!
I only have a single machine on my physical network - a laptop which connects to my router via WiFi and which picks up:
- DHCP enabled = Yes
- IPv4 = 192.168.1.6
- Subnet Mask = 255.255.255.0
- IPv4 Default Gateway = 192.168.1.254
And currently under NAT, VirtualBox assigns an IP of
10.0.2.15 to my VM.
I started reading the following article (Host-Only Networking With VirtualBox) which was exactly what I wanted to accomplish, and got a good idea of how to setup NAT and Host-Only adapters for each desired VM. However I then got confused when I read this article (Networking between host and guest VMs in VirtualBox).
VirtualBox > File > Preferences > Network > Edit Host-only adapter, shows me an IPv4 address of
192.168.56.1 and Mask of
255.255.255.0. Would the following configuration for
/etc/network/interfaces be correct for static IP under the VM:
# The host-only network interface auto eth1 iface eth1 inet static address 192.168.56.101 netmask 255.255.255.0 network 192.168.56.0 broadcast 192.168.56.255
I am confused about the second referenced article mentioning that NAT will give
10.0.2.15 on eth0, but then Host-only eth1 should be static and set to
10.1.2.1*. From the article: "Each NAT adapters and Host-only adapter should not reside in same sub-network". What should my eth1 interface block above contain? I am hesitant to try various options in case I end up breaking something, which why I'm asking here first...basically, What is the right way to this?
Thank you having the patience to read my question. Sincerely hope you can help me. TIA.