Page 1 of 1

VMware-like networking setup

Posted: 4. Aug 2009, 14:34
by theooze
In VMware workstation I can define a NAT network type where my hosts can talk to each other on that network, and I'm able to run DHCP off of one of the guest systems on the network. The host system also runs a DNS proxy so I can point my guest systems at that.

I'd like to do this in VBox, but none of the network types seem to let me do this.

NAT doesn't seem to let me specify the network address range or disable DHCP, the guests can't talk to each other and the guest can't talk to the host.

The 'internal' or 'host-only' network types don't seem to allow any kind of NAT'd connection, or any kind of 'proxy dns' service to run on the host.

I've looked through the forums a little and I don't seem to find any posts that describe quite what I want to do.

Am I looking at the 'internal' type w/ some kind of iptables forwarding rules? Then what about the DNS proxy?

Re: VMware-like networking setup

Posted: 4. Aug 2009, 16:32
by vbox4me2
You have to use a combo of nat and internal networking.

Re: VMware-like networking setup

Posted: 4. Aug 2009, 22:33
by theooze
How? In what combination? Can you be more specific?

Re: VMware-like networking setup

Posted: 4. Aug 2009, 23:15
by vbox4me2
A combo will get you 2 lan connections for each Guest, but Bridge networking would be better, see the Manual.

Re: VMware-like networking setup

Posted: 4. Aug 2009, 23:29
by theooze
Yeah, that's not ideal, I want to have 1 nic in each guest.

So having multiple systems that can talk to each other on a defined network behind the same NAT isn't a common use case?

Re: VMware-like networking setup

Posted: 4. Aug 2009, 23:35
by vbox4me2
Not that common, usually you use a router VM, attach a bridge and internal network to it and let it handle firewall/routing issues for the Guests on the internal network.

Re: VMware-like networking setup

Posted: 5. Aug 2009, 17:15
by h1d
It does look inconvenient that guests can't talk to host/guest but only to outside. What's wrong having 2 virtual nics?

A router VM? You create one new VM just to route traffic around guest and host?

Re: VMware-like networking setup

Posted: 5. Aug 2009, 17:58
by vbox4me2
No, between Guests and the internet/extranet where you have much better control who can do what.

Re: VMware-like networking setup

Posted: 6. Aug 2009, 00:28
by theooze
I don't like putting 2 nics in the guests because in the real world you use vlans and routing and such, not multiple nics and I'd like to stick to that.

The router VM seems to be a good idea, but VMware workstation supports this scenario fairly well (it runs the NAT and proxy dns on the host/guest interface). However I'm sick of waiting for vmware to update their app to run w/ newer releases of fedora which is why I ended up here (er..and the cost). the other issue w/ the router vm is it's another vm to run = less memory for other guests.

so maybe this is a feature request for vbox, where's a good place to put that?

i'll try the router vm idea for now, that seems to be the best plan going forward. i was looking at endian or untangle, maybe vyatta.

Re: VMware-like networking setup

Posted: 6. Aug 2009, 08:21
by vbox4me2
Which one depends on your skills and preference, however this router thing should remean an external feature. VBox should provide no more then the vessel. A router as intended in this instance can have extreem deep control what happens on your VM lan, that type of control should not be inside a virtualization layer.

Re: VMware-like networking setup

Posted: 6. Aug 2009, 09:14
by SecretCode
theooze wrote:i'll try the router vm idea for now, that seems to be the best plan going forward. i was looking at endian or untangle, maybe vyatta.
I may be biased but SmoothWall is also a good option - runs nicely in a low-memory VM (as long as you aren't doing extensively logging and proxy caching, which aren't needed in this case), runs dhcp server, dns proxy and stuff.

Re: VMware-like networking setup

Posted: 14. Aug 2009, 00:31
by akutz
I too am baffled at everyone's resistance to having a shared NAT sub system for VirtualBox. It's the way ALL other hypervisors do it, so that is what we're used to. I am currently working on using a host-only adapter for VMs and then routing that on the host. I'm sorry, but suggesting that I dual-home a guest or have a VM that acts as a router is just silly. I don't want the overhead -- configuration or resource wise. I want a shared NAT network that I can put VMs safely behind while testing software. Period.

Re: VMware-like networking setup

Posted: 20. Aug 2009, 18:10
by akutz
I decided to create a proper NAT implementation for VirtualBox and documented my project at http://akutz.wordpress.com/2009/08/20/b ... irtualbox/.