I am sure this is simple to do, but I have been unsuccessful so far.
I want to bind VirtualBox NAT to a specific NIC. In my case I am using a Linux host with 2 NICs configured for DHCP. I would like to configure my guest OSes so that their traffic is routed only one of the NICs, but not the other.
The VirtualBox manual states in 6.4. Network Address Translation Service (experimental)
It's possible to bind NAT service to specified interface:
VBoxManage setextradata global "NAT/win-nat-test-0/SourceIp4" 192.168.1.185
This appears to bind NAT to a specific interfaces' IP address, but not the adapter itself. I would like to find a way to bind NAT to the adapter, regardless of the IP address on the adapter, more as you can do with Bridged connections.
I appreciate any search hints that might have helped me find this info and/or any ideas on making this happen.
Bind NAT to Specific NIC (eth0, eth1)
-
BillG
- Volunteer
- Posts: 5106
- Joined: 19. Sep 2009, 04:44
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows 10,7 and earlier
- Location: Sydney, Australia
Re: Bind NAT to Specific NIC (eth0, eth1)
Is there a particular reason why you could not set one NIC to a static IP and always use that for your vm traffic? What is the particular benefit of DHCP in this instance?
Bill
Re: Bind NAT to Specific NIC (eth0, eth1)
Because there is no good reason to set a static on the host.
To be clear, I COULD set a static on the host, but I do not want to, and can find no logical reason for it to be required.
To be clear, I COULD set a static on the host, but I do not want to, and can find no logical reason for it to be required.
-
BillG
- Volunteer
- Posts: 5106
- Joined: 19. Sep 2009, 04:44
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows 10,7 and earlier
- Location: Sydney, Australia
Re: Bind NAT to Specific NIC (eth0, eth1)
Fair enough, but I doubt that you can do what you want to do without a static IP.
Bill