Page 1 of 1

Host as server - guest as client?

Posted: 27. Jun 2020, 23:31
by Markie
I'm coding a little game that shall later on be played between users from all over the world over the web.
While developping this I want to setup a test environment, where my own Win10 host shall run the server.exe while the guests shall run the client software that connect to the server and just to make it fun I've setup several VMs with different versions of Windows, from WinXP to Win10.

On the web as well as here in the forum I read "bridged networking" should do just fine to get the guests connected to the web as well as connected to my home network.
When I check ipconfig on all machines, I can see they are all getting their IP from my router, meaning they are all in the same subnet
192.168.1.65
192.168.1.66
192.168.1.67
192.168.1.68

So far so good, yet I'm not getting connection, the computers do not see each other in Windows Explorer under Network, nor do my clients get connection to the server.exe on the host.

I will admit I do not have much of a clue about Windows networking, I'm guessing there's either a firewall to deactivate or a port to forward or something, I just don't even know where to look.
Would someone in here have mercy and help me figure this out?

Re: Host as server - guest as client?

Posted: 28. Jun 2020, 00:48
by scottgus1
First, confirm that you can ping your host PC from your guests. Windows defaults to not allowing ping (ICMP Echo Request) in the Firewall, so you need to turn that on in each Windows OS to allow ping back and forth. Additionally, you probably need to open the port that your game server listens on in the host's Windows Firewall.
Markie wrote:the computers do not see each other in Windows Explorer under Network
Windows defaults to not looking for other computers on the network. "Network Sharing and Discovery", or "File and Printer Sharing", depending on the OS, needs to be turned on. (I think those are the names.) XP uses version one of "File & Printer sharing (SMB1) which was the channel through which WannaCry traveled, so later Windows OS's (probably 8, definitely 10) don't use SMB1 though you can turn it on if you want.

Bridged puts your guests in the same LAN as your host, as you've discovered. Note that this is not the network setup your gamers will use in the future: they won't all be on your LAN, rather they will be coming through routers over the internet. Using 'NAT' for each guest will put a "router" between each guest and your host, simulating the "internet" in a fashion. See Virtualbox Networks: In Pictures

Re: Host as server - guest as client?

Posted: 28. Jun 2020, 01:10
by Markie
Thanks for the answer.
Meanwhile I got partial success, meaning I got the connection to work between my Win10 host and a Win10 guest.
In fact I had to add a new rule to the Windows Defender Firewall opening the port where the server.exe is listening.

That leaves me with the problem of my XP guest still not getting connection where I'm guessing that might be because of what you said about SMB1.

About what my gamers will use, there isn't much of a difference, the server.exe listens on a specific port and the client.exe connects to the servers IP at that port, so all I have to do when this game is ready is exchange the servers IP in the source code of the client.exe.

Edit: Figured it out myself, found the solution in a German Blog of how to get the network between Win10 and XP to work.

Thanks again for your help, I'm back to work.

Re: Host as server - guest as client?

Posted: 28. Jun 2020, 14:54
by scottgus1
Glad you're up and running!