0

I am running a vm with ip 192.168.122.69 and I want to run a server that must run from host ip 10.0.2.2. The server is running on port 8081 and I can connect to it at 192.168.122.69:8081 from the host.

The exact application is in developing a react app and sharing a react app server instance. However, I am mainly asking this as for educational purposes.. i.e. how do I make it so that connecting to 10.0.2.2:8081 is exactly the same as connecting to 192.168.122.69:8081 on the host or 127.0.0.1:8081 on the guest. I really just can not grasp how the routing, bridges, dns, whatever works so a thorough explanation would be very much appreciated.

I have done countless hours of research into this and while I'm sure I've gone over the answer several times, I haven't been able to grasp it.

1
  • More information is required about the host configuration. Commented May 31, 2021 at 9:16

1 Answer 1

0

As far as making it so that, on the guestVM, connecting to 192.168.122.69:8081 is the same as connecting to 127.0.0.1:8001 just depends on the Web Server config. In the web server config files, publish the page on all IP addresses.

As far as port forwarding the address form host to guest, it really depends on your setup; most importantly what hypervisor you are using and what the host OS is.

Is it VMware? Then this article answers your question.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.