当前位置:首页 > 虚拟机 > 正文

虚拟机客户机访问服务器(虚拟机连接远程服务器)

How to connect when the virtual machine runs a stand-alone game server and the local computer runs the client
For VM virtual machine
If you need to access the virtual machine server from the "local host", use Host-Only directly Connect to the Internet,
and then check the IP of the virtual machine, such as 192.168.53.128.
The virtual machine is equipped with a web server, which can be accessed by directly entering https://192.168.53.128/ in the host browser.
As for other ftp, ssh, proxy, etc., they can also be used directly without any other settings.
------------------------------------------------- ----
If you need to access the server of the virtual machine from the "external network", you usually use NAT to connect to the network.
Then select "Advanced Settings" in the virtual machine network and fill in the port mapping list.
------------------------------------------------- ---
Of course, in both cases above, you can directly use Bridge to connect to the Internet, but the solution is too troublesome.
Due to its own network environment, such as metropolitan adsl, community broadband, campus network, static IP, as well as port restrictions, multiple network card restrictions, etc.
These may cause the virtual machine networking to be abnormal, or some services not to be used properly.
Therefore, the first two methods are generally used in network experiments.
Thank you for your acceptance

Virtual machine configuration server, how to access the host
By default, virtualbox only uses one nat connection method.
This method can connect the virtual machine to the Internet, but cannot communicate with the intranet.
So you need to add a Bridged
adapter connection method,
In the virtual machine settings, set up the network, select Network Connection 2/Enable Network Connection,
Select the connection method
Bridged
adapter, after starting the virtual machine, there will be an extra network card in the system.
Set the IP of this network card and the physical machine's network card to the same network segment, and you can access it from the intranet.