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
Selfhosted
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
Rules:
-
Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.
-
No spam posting.
-
Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.
-
Don't duplicate the full text of your blog or github here. Just post the link for folks to click.
-
Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
-
No trolling.
-
No low-effort posts. This is subjective and will largely be determined by the community member reports.
Resources:
- selfh.st Newsletter and index of selfhosted software and apps
- awesome-selfhosted software
- awesome-sysadmin resources
- Self-Hosted Podcast from Jupiter Broadcasting
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
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.
That looks like it should work. Just a couple of thoughts: The default gateway is irrelevant. That's only where the OS sends packets that don't match the netmask. Since these addresses all lie within the same /24 range, the default gateway will never be used. It wouldn't hurt to check the ARP tables of each OS to see whether the VM MACs ever show up on the remote host or VM. Are the two hosts connected with a cable, or via WiFi? If the latter, VirtualBox has to do some software trickery to make bridging work, and I can imagine that perhaps some WiFi devices wouldn't play nice.
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.
I've re-read the docs around VirtualBox bridging, and the only thing that I think could possibly cause this (though it shouldn't since ping is a direct address to a specific IP/mac) is to enable Promiscuous mode (as cappucino mentioned).
This shouldn't fix it in my opinion, but it may, since ICMP could be considered undirected traffic (I don't, but I didn't code VirtualBox).
I've sometimes found using trace instead of ping can sometimes work where pings would be blocked, plus trace shows exactly where it dies along the path.
@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
I'll give it a try tomorrow, thanks.
Although I'd still prefer to know why the VMs won't talk over simple Ethernet.
@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.
Try this setup.

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.
Try this setup.

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