Page 1 of 1

Using several networking modes at the same time

Posted: 4. May 2010, 11:04
by emmanuelito
Hi,

I use VirtualBox under Mac (and Linux) to host a Debian Linux guest.

Is it possible to use sevral networking modes at the same time ?

I explain. I'd like:
1- a Host-only interface for communicating between host and guest.
2- a NAT interface, in order to access the Internet from the guest (eg to apply software updates from time to time)

Guest is providing a service to host, but external internet communication is not permanent (eg, think of a roaming laptop).
So the NAT connection would be useful only when teh host is connected to Inernet, without disturbing the service provided by the "host-only" network (on fixed IP addresses).

What would be the best solution ?

Thanks for your help.
Emmanuel

Re: Using several networking modes at the same time

Posted: 4. May 2010, 14:54
by Perryg
Yes it works and is the suggested way of doing this.
See Chapter 6. Virtual networking in your VirtualBox users guide.

Re: Using several networking modes at the same time

Posted: 4. May 2010, 15:47
by emmanuelito
Thank you for your answer.
I have read the chapter 6, and found no explanation: how to set up 2 interfaces on the guest (let's say eth0 bridged and eth0:1, or eth1, NATed) ? Can you be more specific in your reference ?

Re: Using several networking modes at the same time

Posted: 4. May 2010, 16:00
by Perryg
IN the guest settings (with the guest shut down) go to the network section and add another adapter.
Set one to host-only and the other one to NAT. Then setup eth0 and eth1 in the guest.

Re: Using several networking modes at the same time

Posted: 4. May 2010, 16:29
by emmanuelito
Too simple !
Fantastic, I love VirtualBox !

Thank you very much.