Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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!

share|improve this question
    
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 '10 at 14:59
add comment

3 Answers

up vote 1 down vote accepted

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!

share|improve this answer
add comment

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

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.