practice server(s) with clients

Discussions related to using VirtualBox on Windows hosts.
Post Reply
mattig89ch
Posts: 39
Joined: 18. Feb 2015, 22:29
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Windows7x64, Win 98SE, Android, WinXP
Location: Burlington NC

practice server(s) with clients

Post by mattig89ch »

Hidy ho all,

I'm experimenting with a virtual server on an I3 machine with 8 gigs of ddr3 ram and a 1TB hard drive. Not a bad machine by any standards.

Right now, I have a trial copy of Windows Server 2012 R2, and a win 7 x64 vm all running at the same time. I'm only doing this for practice, its been a while since I played around with Windows server in a domain environment.

My goal is to join that win 7 client, to the servers domain. And have that server be a bridge to get out to the interweb.

First and foremost, can this even be done?

Second, if so, how?
mattig89ch
Posts: 39
Joined: 18. Feb 2015, 22:29
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Windows7x64, Win 98SE, Android, WinXP
Location: Burlington NC

Re: practice server(s) with clients

Post by mattig89ch »

hokay, so I figured out that there is a setting in the network adapter telling it if the NIC is connected to an internal network or just use the NAT settings. there are a whole mess of other settings, but those are the two I'm working with.

I'm trying to tell the server to use my custom assigned IP address, but I need a default gateway. Does virtual box have a default gateway I can just tell the NIC to use?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: practice server(s) with clients

Post by Perryg »

Internal will not have a gateway to the outside world.

The best approach to use for a domain testing environment is to us a separate guest as your router. pFsense is my preferred guest as it is small and easy to configure without a lot of resources being used. Then all guests should be on the same internal network and the router will have one NIC using NAT
mattig89ch
Posts: 39
Joined: 18. Feb 2015, 22:29
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Windows7x64, Win 98SE, Android, WinXP
Location: Burlington NC

Re: practice server(s) with clients

Post by mattig89ch »

Interesting, I never knew something like pfsense existed. Thanks for that.

Are there other guests like pfsense?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: practice server(s) with clients

Post by Perryg »

Well Xp works by Internet Connection Sharing but since it has been deprecated you run a real risk of contamination.
mattig89ch
Posts: 39
Joined: 18. Feb 2015, 22:29
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Windows7x64, Win 98SE, Android, WinXP
Location: Burlington NC

Re: practice server(s) with clients

Post by mattig89ch »

Ok, I'm not sure if I should start a new topic or keep going with this one.

I was wondering if anyone knew the best way to go about creating a virtual environment like the one I'm trying to create.

I have a windows client, a windows server (with 2 NICs), and a virtual firewall (with 2 NICs).

My goal is to get the client to talk to one of the two nics on the server. Then have the servers second NIC talk to the firewall. Finally, have firewall let people out to the interweb through the host machine.

I'm trying to simulate a working environment as cloesly as I can. if it was possible, I'd set up a virtual switch between the connections, and a router just after the firewall. Sadly, GNS3 doesn't give away basic routing IOS's, so I'm left with this.

Is there a best way to get the nics talking only to their respective partners?
BillG
Volunteer
Posts: 5102
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: practice server(s) with clients

Post by BillG »

Of course there is, but it would be better to run the firewall/router in a vm rather than in the host (if your host is on a LAN).

The "public " NIC of the firewall vm connects to the physical network using a bridged network connection. The "private" NIC of the firewall connects to the internal virtual network where the other vms are. Your private (virtual) LAN does not have a direct connection to the host or to the physical network. (This assumes that the host is itself on a physical LAN, not directly connected to the Internet. Bridged mode is not available otherwise.)

Apart from the network settings, all configuration is exactly the same as it would be on a physical setup doing the same job.

There are heaps of router/firewall programs available - some are free (like pfsense). Check that it has routing ability as well as firewall ability like pfsense - some are designed purely for a single user client OS. There is really no point in having separate firewall and router machines in a simple setup like this.

Having said that, I would point out that it is not a good idea to run the router/firewall on the same machine as the DC. I would run the DC in a separate vm (with one NIC). This has nothing to do with VirtualBox - it is a Windows thing. There are also a few oddities with DNS if you run a Windows domain in a setup like this (again, nothing to do with VirtualBox).
Bill
mattig89ch
Posts: 39
Joined: 18. Feb 2015, 22:29
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Windows7x64, Win 98SE, Android, WinXP
Location: Burlington NC

Re: practice server(s) with clients

Post by mattig89ch »

Thanks for the help. So, I have PF sense installed on a separate vm. And my system can run a windows client, the server, and the firewall all at once. So theres that (i3, with 8 gigs of DDR3 ram, and 1 TB HD).

Now I need to get virtal box to stop automatically handing out IP addresses, to make sure my server is the one giving out IP's. How do I get virtual box to stop with the automatic IP addressing?
BillG
Volunteer
Posts: 5102
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: practice server(s) with clients

Post by BillG »

Are you sure that it is VirtualBox doing that? I would think that it is pfsense.
Bill
mattig89ch
Posts: 39
Joined: 18. Feb 2015, 22:29
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Windows7x64, Win 98SE, Android, WinXP
Location: Burlington NC

Re: practice server(s) with clients

Post by mattig89ch »

no, its getting an ip without the server running. And the NIC is connected to an internal network.

The client is set to automatically get an ip.

Edit: also, is it possible to give the virtual NIC's names? I ask, so I can differentiate between them easier.

Edit: ok, just verified that virtual box is giving my client an ip address.

the clients first (and only) NIC is set to the internal network "Pratice Domain". The firewalls first NIC is set to "Practice Domain", and external NIC is set to NAT (i'll be changing that to a bridged connection shortly).

pfSense EM0 is set to be the internal NIC, and has an IP of 172.16.1.1 /24. pfSense is also set to have DHCP start at 172.16.1.3 /24 to 172.16.1.254 /24.

The client is set to automatically receive Ip addresses, but after disabling and enabling the nic and /release & /renew the NIC wasn't getting an on the same subnet. its getting 192.168.1.100 (arounnd there, sometimes 105, sometimes 99) I had to manutally set it to the correct IP just to be able to ping the firewall.

Is there any way to get virtual box to stop giving out ips? Either to these specific clients, or in general. Either way would work in this case.
mattig89ch
Posts: 39
Joined: 18. Feb 2015, 22:29
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: Windows7x64, Win 98SE, Android, WinXP
Location: Burlington NC

Re: practice server(s) with clients

Post by mattig89ch »

I hope I don't get yelled at for double posting.

But I got everything running! I had to manually assign ip's, but the client is on the domain, the firewall is on the domain, and everything has internet connectivity! I'm actually quite pleased with this outcome so far.

I think I'm going to get my linux distro to join this domian. If anyone could tell me how to turn off virtual box's dhcp, that would be great. But, i've got a practice domian with a client, and a router/firewall. woo!
Post Reply