Page 1 of 1
Setup 1 NAT per NIC
Posted: 21. Jul 2009, 22:48
by VBnoob
I have a machine with multiple nics. Each nic is on a different subnet (Corporate LAN & Sandbox vlan for example). Is it possible to setup Multiple NAT and Bridge scopes in VB, so that I can have one VM nated/bridged to one nic, and a different VM connected to the other NIC?
Re: Setup 1 NAT per NIC
Posted: 21. Jul 2009, 22:59
by Sasquatch
No, that's currently not possible. If you have multiple NICs with each their own gateway, accessing an IP address from either network will work with NAT. If you really want to have separate configs, you have to use Bridged. This can be a problem though, as managed switches can block their ports when they detect more than one MAC address on it (they have to be configured for it, which is default on campus like environments).
There is something else you can try, which involves something similar to NAT, only you create a NAT yourself. Creating multiple Host-Only adapters, adding each to it's own VM and setting some routes on the Host using routing software can do the job. It involves some knowledge about networking and routing, but if you're into computers, then Google (or your favourite search engine) can help you on your way to accomplish this.
Re: Setup 1 NAT per NIC
Posted: 21. Jul 2009, 23:00
by vbox4me2
Yes.
Re: Setup 1 NAT per NIC
Posted: 21. Jul 2009, 23:10
by Sasquatch
vbox4me2 wrote:Yes.
Care to explain this? I've never seen an option to limit VB NAT to a defined network. Only to change the IP range it sets for the NAT network inside the VM.
Re: Setup 1 NAT per NIC
Posted: 21. Jul 2009, 23:16
by vbox4me2
You gave the answer yourself already, there are several ways including a natted vm. VBox nat can be duplicated by changing its scope per vm, how far this stretches I don't know, only experimented with 2 nats and that works fine (vb 2.08).
Re: Setup 1 NAT per NIC
Posted: 21. Jul 2009, 23:26
by Sasquatch
vbox4me2 wrote:You gave the answer yourself already, there are several ways including a natted vm. VBox nat can be duplicated by changing its scope per vm, how far this stretches I don't know, only experimented with 2 nats and that works fine (vb 2.08).
It only changes the network address inside the VM, it doesn't change the networks you can access on the outside. If you use the default NAT, you can still access a 192.168.0.0/24 subnet and 172.16.0.0/16 one. Changing the NAT range to 192.168.1.0/24, you can still access both subnets. The TS is asking if it's possible to split the subnet access with NAT. AFAIK, that can't be done with the VB NAT implementation.