Docker Swarm overlay network can't communicate accross hosts

Hello everyone,

I am trying to setup a docker swarm network, which spans my Desktop PC and an Ubuntu VM (also on my Desktop). The VM is my swarm manager. I have also opened all required ports on Windows and Linux.
I have created an overlay network for my containers to communicate accross the hosts, which doesn’t work too well. When I create two containers on the same host and attach them to the overlay network, they can communicate. But when one of the containers is on the other host, they can’t communicate anymore.

Do you know how to solve this problem? I would like to avoid diving into kubernetes for this project.