I have got multiple Windows VBoxes running on a linux machine. The linux machine has got 20 static real IP addresses set, all on eth0. The VBoxes are configured to use NAT, which uses the default gateway IP address set on the linux machine to access the Internet. Herein lies the problem.
I want to each VBox to use a different IP for accessing Internet from the pool of 20 IPs (be it random or assigned) and not the default gateway set on the Linux box.
Any idea on how to do it?
What I have tried and doesn't work is use VBoxManage to take care of this thing as per VBox documentation...
VBoxManage VBoxInternal/Devices/pcnet/0/LUN#0/Config/http/BindIP "184.108.40.206"
That doesn't work.
I guess I might have to use iptables command on the linux box to configure it so that ip routing chain uses a random IP for all outgoing traffic, or multiple default gateways or something like that.
Update 1: Because this is a rented server I don't have access to the router. The DHCP that Windows VBoxes use is installed and managed by VirtualBox application running on linux which works only for the VBoxes.
Update 3: raerek provided the solution to use bridge instead of NAT. I found out that setting bridged network is not as simple as "just set it from a droplist". I probably need to install or configure drivers on the Linux machine. While I am still checking it, any solution that keeps the NAT (which works) and still being able to use an IP from the pool will be welcome.