0

How would I go about setting up VirtualBox for this kind of environment?

pic

Just like real-life servers work. Have one server that receives the outside internet connection, has all the DNS, DHCP, AD... stuff and all the client PCs connect to it. I am unable to get the server (Windows 2012) and client (Windows 7) PC connected internally.

How should I set up the adapters?

Linger
  • 3,274
  • 10
  • 35
  • 47
McCloud94
  • 3
  • 1
  • possible duplicate of [How to do networking between virtual machines in VirtualBox?](http://superuser.com/questions/119732/how-to-do-networking-between-virtual-machines-in-virtualbox) – agtoever Aug 07 '14 at 11:59
  • I'd add, the image is MUCH too small to read. – Journeyman Geek Aug 07 '14 at 12:04
  • @agtoever thanks for that topic. Pretty much everything mentioned there I've tried. And some links to the guides are dead. I tried doing ping tests to see if there is any connection between the machines, but it failed.. – McCloud94 Aug 07 '14 at 13:02

1 Answers1

1

In the Network settings for both VM's you can select the 'Internal Network' option. Mkae sure the name matches for both VM's. For the server you obviously would need two network interfaces, one connected with NAT or bridge, and the other with the 'Internal Network' setting.

If you match the internal network names, you should only have to assign IP addresses (or make your server a DHCP server) and you're good to go.

-- Turned out the asker didn't disable the firewall. After disabling the firewall, connectivity was fine.

mtak
  • 16,513
  • 2
  • 52
  • 64
  • that doesn't work for me. That was the first option I tried. Right now I have the server VM's adapters like this: 1st - internal, 2nd - NAT. And the Win 7 VM 1st - internal. I don't know why I can't seem to get a connection between them. – McCloud94 Aug 07 '14 at 13:03
  • Also, here's a screen of the settings. I don't get why the NAT adapter receives a 10.0.3.2 as the default gateway, when Virtualbox's DHCP is set to 10.0.2.0. http://s10.postimg.org/vpdsgs2cp/Untitled.jpg – McCloud94 Aug 07 '14 at 13:08
  • That would be good info to mention in the question, so I didn't have to type up a useless answer ;) Are you sure there isn't a connection or perhaps Windows Firewall is giving you troubles? Did you configure the network interfaces correctly? And how do you determine that it "doesn't work"? – mtak Aug 07 '14 at 13:09
  • Ye, sorry. My mistake.. I am still getting familiar with stackexchange. Can't seem to post a general comment, only for individual people's comments. I am not sure about the firewall, I can check that. I tried to ping the machines from each other, but it failed. – McCloud94 Aug 07 '14 at 13:14
  • Haah, I am so stupid :) I completely disabled firewall on both the machines and now it seems to ping correctly. I'd never have thought that the firewall would be blocking 'internal' connections on a VM. I am going to check it once again and will let you know how it went. But thanks for now :) – McCloud94 Aug 07 '14 at 13:18
  • @McCloud94 you can always edit your own question to include the info. – mtak Aug 07 '14 at 14:17
  • one more question.. what port should I open to let the connection through? I want to avoid having the firewall completely disabled. – McCloud94 Aug 07 '14 at 18:37
  • It totally depends on your application. For DNS you need TCP+UDP 53, DHCP UDP 67/68. But between those machines I wouldn't worry about a firewall, it's completely isolated from the internet. Also I've updated my answer, could you mark it as an answer (green checkmark left of the question)? – mtak Aug 08 '14 at 07:30
  • ok, thanks. I just wanted to know the protocols used, so I can open them in firewall. I know it's completely useless in this setting, but if I was doing this with real server I'd need firewall for sure. – McCloud94 Aug 08 '14 at 13:00
  • I got one more issue.. I have two NICs on the server. One NAT for WAN and other internal for communication with the other VMs. Since it will be a domain server, I set up the NAT to use static IP. But I guess I need the internal card to static too, right? And when I enter an IP from the same range (my server is 10.0.3.15 so I went 10.0.3.20 for this one) it doesn't work right. Also it complains about the same default gateway... what would be your take on this? – McCloud94 Aug 08 '14 at 17:51
  • Use a different subnet between the two VM's ( so 10.0.2.0/24 -> 10.0.2.1 and 10.0.2.2 with subnet mask 255.255.255.0 and on the client set gateway to 10.0.2.1 and on the server to none), but this is a differerent question. – mtak Aug 09 '14 at 10:07