I'm trying to set up a lab environment with VirtualBox made up of two virtual machines, both of them Ubuntu 18.04 Bionic Beaver.
- I want one of them to act like a server with Node.js and Express.
- The other machine is going to act like a client, mainly sending data to the server.
Currently, they are in the same NAT network, so they can ping each other succesfully. The thing is that, if I set up an Express server in one machine, it listens, let's say, in localhost:3000
. But, as expected, I can't access that address from the client machine.
I was thinking that maybe some way of port forwarding is needed, but I don't know where to start from. I understand the forwarding technique from host to guest but, even after research, I can't wonder what would be the technique from guest to guest, if that is possible.