I need help with networking for VirtualBox guests running on Windows hosts.
from rtxn@lemmy.world to selfhosted@lemmy.world on 18 Feb 21:25
https://lemmy.world/post/43303516

I know this isn’t “selfhosting” as most people imagine it, but it is about hosting services on own hardware, hence why I’m posting in this community.

I’m supposed to help a teacher set up a networking exercise where pairs of computers are connected directly on a crossover cable and can access services (echo, HTTP, SSH, FTP) on each other. Every computer is identical: Windows 10 host, one VirtualBox VM running Linux Mint with a bridged adapter in promiscuous mode. Each host and VM has its own static link-local IP address.

The problem is, the VMs can’t talk to each other, and I don’t know why.

From one VM, I can ping itself, its host, and the remote host, but not the remote VM. Each host can ping itself, the local VM, the remote host, but not the remote VM. I’ve tried connecting both hosts to a layer-2 switch, with the same result.

Can someone point me at the one thing that I’m obviously doing wrong?

(edit) I’ve also tried to set the default gateway to the host’s, remote host’s, and remote VM’s address, but nothing changed.


Running Linux on metal isn’t an option. In the past, the classroom computers used to dual boot Windows and Ubuntu, but the Windows install got so bloated (the software too, not just Windows) that it needs the full SSD.

#selfhosted

threaded - newest

db_geek@norden.social on 18 Feb 21:38 next collapse

@rtxn I'm no expert in networking with VirtualBox, but did you already had a look into the manual?
https://www.virtualbox.org/manual/ch06.html#network_udp_tunnel

rtxn@lemmy.world on 18 Feb 21:42 collapse

I’ll give it a try tomorrow, thanks.

Although I’d still prefer to know why the VMs won’t talk over simple Ethernet.

db_geek@norden.social on 18 Feb 21:48 collapse

@rtxn Maybe you find the reason in the chapter for Bridged Networking.
https://www.virtualbox.org/manual/ch06.html#network_bridged
```
With bridged networking, Oracle VM VirtualBox uses a device driver on your host system that filters data from your physical network adapter. This driver is therefore called a net filter driver. This enables Oracle VM VirtualBox to intercept data from the physical network and inject data into it, effectively creating a new network interface in software.
```

diecknet@discuss.tchncs.de on 18 Feb 21:45 next collapse

You mentioned that you can’t ping the remote VM. Have you checked if the remote VMs IP is reachable? Is it in the ARP table? Check with arp -a

rtxn@lemmy.world on 18 Feb 21:48 collapse

I checked ip neighbour (it also shows the ARP table, so I assume they’re identical), and it showed REACHABLE and STALE for addresses I could ping, but FAILED for the remote VM’s address. I will check arp -a when I get the chance, though.

zewm@lemmy.world on 18 Feb 22:06 next collapse

10.0.0.1 is usually the gateway IP. Have you checked that there are no IP collisions happening?

slazer2au@lemmy.world on 18 Feb 22:15 next collapse

This is going to sound stupid. Have you checked both the host and VM firewalls are allowing the traffic?

To assist in troubleshooting you can install Wireshark to see what traffic is hitting the NIC. If you see the the traffic in Wireshark then the sending is working but the host or VM is not receiving.

fizzle@quokk.au on 18 Feb 22:28 next collapse

I’m certainly not an expert on such things but I just didn’t think bridged networks in virtual box (or docker) were intended to work that way.

The behaviour you’re seeing is exactly what i would have expected.

In docker I think the solution would be to use the “host” network adapter on the guest VM.

[deleted] on 18 Feb 22:31 next collapse
.
capuccino@lemmy.world on 18 Feb 22:34 collapse

Try this setup.

<img alt="" src="https://lemmy.world/pictrs/image/1746dc6a-decb-490a-803c-0f8768729eff.png">