Can these tunnels connect to the servers on the same subnet?

I have docker running my servers but I made a vm to host the tunnel. The two ip’s are different but on the same subnet. Can the tunnel still work? I set it up quick but maybe I’m doing something wrong.