Virtualbox networking (different subnet)

limer

Member
May 19, 2006
180
0
0
Host Machine: Windows 7 64-bit
Router: WRT54G v3 (DD-WRT)

I'd like to learn more about Windows Server 2003. I currently have two Virtualbox VMs created:

Windows Server 2003 R2 Enterprise x64
Windows XP Professional

I'd like to have it so that both VMs have access to the internet but are also isolated from my current private ip address range (192.168.2.x). I guess I'm looking to emulate a lab environment to one degree or another. If the VMs fall apart, no big deal. Either a reinstall or back to the last snapshot.

Using NAT, all simultaneous VMs are assigned 10.0.2.15 - This doesn't change regardless of how or when the VMs are booted.

In Bridged mode, the machines have what I want, but are also in the same subnet as the rest of the network.

In Internal Mode, I have isolation since I can assign a static ip but I know of no way to also have access to the internet (for Server 2003).

Host Only Mode also gives me a different range (192.168.56.x), but doesn't have internet connectivity.

IIRC, VMWare Workstation had something that made this possible (team mode?) but I'd rather not spend the money if it isn't necessary.
 

xSauronx

Lifer
Jul 14, 2000
19,582
4
81
you just have the 2 machines, it wont hurt anything to just bridge the machines and use your current network. if you can, use 2k8 instead since 2k3 is already several years old. if you want to play with services, you dont have to use your host with any of the 2k3 hosted services, so really, it wont hurt anything.

just let the vms play together as you see fit
 

limer

Member
May 19, 2006
180
0
0
you just have the 2 machines, it wont hurt anything to just bridge the machines and use your current network. if you can, use 2k8 instead since 2k3 is already several years old. if you want to play with services, you dont have to use your host with any of the 2k3 hosted services, so really, it wont hurt anything.

just let the vms play together as you see fit

I'd rather not have the rest of the network seeing a domain controller, especially since it will probably end up doing DNS and DHCP as well.

Although 2K3 is years old, so far as I can tell, many businesses are still looking for the MCSE based on 2K3.

2K8 requires 4 GB minimum ram and the host machine has 3.
 

RebateMonger

Elite Member
Dec 24, 2005
11,586
0
0
I know zilch about Virtualbox, but a common way to do this with a virtualized DC is to set up two virtualized NICs on the server: One virtual NIC with NAT and another virtual NIC on a private network. This allows you to isolate that server and its virtualized clients from the rest of your network but allow all your virtual computers to reach the Internet and to talk to each other. Other PCs not in the private network won't be able to "see" the DC because NAT networking is one-way.

Typically, you'd set up DHCP and DNS on the "private" NIC on the DC and all its virtual clients would get their networking services from it. You'd also set up routing between the two NICs on the DC.

Or, you could put a second physical router (NAT) in between the rest of your network and the private network. You might have to do this if your DC's OS won't allow two NICs (SBS 2008).
 
Last edited:

limer

Member
May 19, 2006
180
0
0
I know zilch about Virtualbox, but a common way to do this with a virtualized DC is to set up two virtualized NICs on the server: One virtual NIC with NAT and another virtual NIC on a private network. This allows you to isolate that server and its virtualized clients from the rest of your network but allow all your virtual computers to reach the Internet and to talk to each other. Other PCs not in the private network won't be able to "see" the DC because NAT networking is one-way.

Typically, you'd set up DHCP and DNS on the "private" NIC on the DC and all its virtual clients would get their networking services from it. You'd also set up routing between the two NICs on the DC.

Or, you could put a second physical router (NAT) in between the rest of your network and the private network. You might have to do this if your DC's OS won't allow two NICs (SBS 2008).

Thanks for the advice RebateMonger. I am now using three VMs:

* Windows Server 2003 R2 x64
* Windows XP Professional
* pfSense (FreeBSD based router OS)

This is probably just an extension to your advice, although I finally have everything working. For others having this or similar issues:

Virtualbox --

Windows Server 2003: Internal network
Windows XP Professional: Internal network

pfSense: ***USE ONLY Intel based virtual NICs. I used the Intel Pro T Server NICs. I found this out from a post from someone else having issues with the default PCNet based virtual NICs.

1st NIC: NAT
2nd NIC: Internal network

Configure pfSense so that the LAN interface is em1. WAN will be em0. This could be the other way around, but I find it easier remembering the first NIC as the WAN. By default, the LAN subnet will be 192.168.1.x, you may decide to change this through the pfSense menu options. That's it. You should now be able to access the internet and be in a separate private network.

em0: 10.0.2.15
em1: 192.168.1.1

Use menu option 99 if you'd like to install. I used a 2 GB virtual disk.
 
Last edited:

RebateMonger

Elite Member
Dec 24, 2005
11,586
0
0
Glad you got it working. Yeah, you are using pfSense as the NAT router instead of using Windows Server 2003. I was actually going to do something similar with MS' ISA Server 2006 as a firewall/router and SBS 2008, since SBS 2008 won't allow dual NICs.