I'm running virtualbox
locally and I've used port forwarding like this
0.0.0.0:7000 -> 0.0.0.0:7000
so that I can do
curl http://localhost:7000
from host to vm and be able to communicate with the application running in the vm and listening to port 7000
.
Is it possible to make the reverse? I want to set a port forward to be able to
curl http://localhost:6000
from my vm and be able to communicate with the app that runs on host and listens on port 6000
.
I'm using NAT
.
I already know about bridged network and about using the network IP of my host. I can't use those. All I'm interested in is the above.
Exclaimer:
The reason of the limitations above is because I'm using dinghy
with docker
and docker-machine
. If I change the network to something else than NAT
the setup will break. Moreover I can't use something else than localhost
since these are the defaults that the apps have and I need them to communicate as if they were running both on host.