0

I've installed Debian inside Virtualbox on Mac OS 10.5. Everything's working great, yay.

I want to set up networking so I can (a) reach the outside internet from inside Debian (Virtualbox), and (b) reach the virtual Debian from my Mac. (I don't need to be able to reach the virtual Debian from anywhere but the Mac.)

I can't seem to figure it out. If I set the Virtualbox networking to "NAT", I can reach the outside world from Debian, but I can't reach Debian from Mac OS. If I set the Virtualbox to "Host Link Adapter", I can reach Debian from Mac OS, but I can't reach the internet from Debian.

I'm sure I've set up the way I want before, and I don't remember doing anything special for that, so I must be missing something simple today.

Thanks!

1
  • A non-solution: I did try "Bridged networking" (I think it was called -- I'm not running VB in English here), and it kind of works. The guest has its own IP address. The downside is that it needs to be bound at (vm) boot-time to an interface, so if you ever switch between wifi and ethernet, it won't work.
    – Ken
    Aug 4, 2010 at 14:59

3 Answers 3

1

I ended up using NAT, and VBoxManage --natpf1 to map the 2 ports I need access to. Even simpler than setting up 2 network interfaces.

Thanks for the suggestion, though!

0

For what you want, the easiest thing by far is to set up both a NAT adapter and a host link adapter.

0

I've been able to achieve something similar in the past, that is

(a) to network the host and guest os's

and

(b) to connect the guest os to the internet

without needing to be connected to a router for (a) to work. Unfortunately my guest os was ubuntu server inside an ubuntu desktop host os so I'm afraid my experience might not be a great help. However for what it's worth I found the following pages helpful:

http://www.callum-macdonald.com/2009/10/28/virtualbox-host-to-guest-networking/ http://www.virtualbox.org/wiki/Advanced_Networking_Linux

It might be possible to use a similar set up on mac, I hope! :)

I would also agree with Gilles, two adapters is the way to go.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .