A
A
Anton18632021-09-08 12:24:55
linux
Anton1863, 2021-09-08 12:24:55

How to display a virtual machine web server (particularly on VMWare) from under Linux via localost on Windows Server 2012 r2?

The task is to raise the virtual machine web server (VMWare) from under Linux on the host Windows Server 2012 r2. The virtual machine is connected through virtual NAT and its web server is displayed in the browser of the host machine by ip from the NAT network. The c bridge option is not suitable, because there are still machines on the host OS.
I previously disabled the iis-server service, which occupied the 80th port and opened its page on localhost by default.
I thought that to match with localhost, it would be enough to change the default ip (127.0.0.1) in the "hosts" file of the host machine to the ip of the machine, but nothing happened after the change, the web server is not visible on localhost. Just in case, I forwarded ports through virtual NAT, although this should not affect the display of localhost on the host machine, but the result is the same.
What can be done in this situation, who knows?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim Grishin, 2021-09-08
@Anton1863

Open from the IP address of the host machine, especially since the ports have been forwarded. localhost won't work, it uses a different connection method. Those. if your host has IP 10.0.1.2, the virtual machine is behind NAT 192.168.10.10 and you forwarded port 80 to 192.168.10.10:80, then you can get to its web server from the host's local network through 10.0.1.2:80.

A
Aelliari, 2021-09-08
@Aelliari

If you have already dropped from the VM to the host level, and you can reach the host system, you can also redirect

netsh interface portproxy add v4tov4 listenport=<локальный порт на котором ожидается соединение> listenaddress=<локальный адрес на котором ожидается соединение, или 0.0.0.0 для всех адресов> connectport=<порт назначения, на котором болтается твой сервер> connectaddress=<адрес назначения, на котором болтается твой сервер>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question