Page 1 of 1
private virtual network: how define gateway to corp network?
Posted: 12. Jun 2015, 13:07
by Muug
Hi,
I'm trying to build a private network on my laptop. I've got an internal network with three guests : one server and two pc's. The server has a static ip and has the DHCP role configured, so the other two guests get an automatically assigned ip address. This works like it should be.
Now I would like this guest server to act as a gateway for my guest pcs because I want them to be able to contact our corporate wsus-server and other network shares. Therefore I added a second adapter to the virtual server and I made this a NAT-adapter. And yes the server recognizes the corporate network and I've got internet and I can ping my host. So far, so funky.

But now I'm a bit stuck.

I need to tell my guest pc's that they can connect to the corporate network through a gateway. Now I could add a second NAT-adapter to each guest, but I don't want to do this. I want my guest pc's to use the server as a gateway/proxy...
Any idea how I can configure this?
Thanks !
Paul
Re: private virtual network: how define gateway to corp netw
Posted: 12. Jun 2015, 16:55
by noteirak
This is all a matter of configuration in the guest OS directly. On Windows, finding out you're in a specific network is defined with workgroup/domain name, proper DNS configuration and proper gateway configuration.
For linux, it's a matter of parameters in the networking configuration files - which are different depending on the distro...
Nothing to do with VirtualBox I am afraid...
I'm willing to give you further advise if you tell me what are the guests OS you're talking about exactly.
Re: private virtual network: how define gateway to corp netw
Posted: 12. Jun 2015, 22:38
by Muug
I'm sorry, all the machines have windows.
The guest server is Server 2012 R2, the guest workstations are Windows 7 Enterprise x64
My host pc is Windows 7 Enterprise x64.
I know I've got to use option 3 in DHCP to define the gateway and that works. When I do ipconfig /all on a guest I can see that the gateway is configured.
So what must happen is that the server needs to be able to route traffic coming from the guests to the corporate network, because I want my guests to be able to surf, to access corporate network shares and download updates from the WSUS server.
My basic problem is that I don't know what kind of network adapters I need to configure on the guest server. I've read the manual over and over but I just don't grasp it.
Re: private virtual network: how define gateway to corp netw
Posted: 12. Jun 2015, 22:41
by noteirak
I assume your VMs need to be invisble to the corporate network, except for the 2012 VM right?
Re: private virtual network: how define gateway to corp netw
Posted: 16. Jun 2015, 08:57
by Muug
noteirak wrote:I assume your VMs need to be invisble to the corporate network, except for the 2012 VM right?
No, they need to be invisible

It has to be a hidden test network. But the hidden test network needs to be able to access network shares.
But I think you could be right about configuring routing on the guest server. As I said it has two adapters : one internal network and one NAT. My guess is I'll have to configure a route between the NAT-adapter and the internal network adapter. Some manual "route add" commando.
Re: private virtual network: how define gateway to corp netw
Posted: 16. Jun 2015, 18:29
by noteirak
So what you need to do is:
- Configure your 2012 VM with 2 adapters: one NAT and one internal
- Configure your other VMs with internal adapter only
- Configure your 2012 to become a gateway and provide NAT translation for your other VMs, as well as a DNS server. That means some windows config + static IP on the internal adapter
- Configure your other VMs to use the 2012 as gateway & DNS server.
No guarantee the network shares will work out of the box with double NATing (2012 NAT + VBox NAT)
Re: private virtual network: how define gateway to corp netw
Posted: 18. Jun 2015, 10:44
by Muug
noteirak wrote: provide NAT translation for your other VMs, as well as a DNS server
okay, I did most things, so I was getting close.
Thanks for helping me out !