将我的本地地址重定向到我的虚拟机 [英] Redirecting my local address to my virtual machine

查看:178
本文介绍了将我的本地地址重定向到我的虚拟机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开展一个学术项目(没有专业人员),并想知道我是否可以设置一个允许我将本地IP地址重定向到我的虚拟机地址的规则,虚拟机是一个HTTP服务器,所以我需要从同一网络上的其他计算机上检查我的网站,在其他计算机上,我将写入我的服务器计算机的IP(包含一个虚拟机),然后该IP将被转换为我的虚拟机IP。

i'm working on an academic project (nothing professional) and wonder if i can set a rule that will permit me to redirect my local ip address to my virtual machine address, the virtual machine is an HTTP server, so i need to check my website from other computers on the same network, in other computers i will write the IP of my server computer(containing a vm) and then that IP will be translated to my vm IP.

推荐答案

两个选项:

1)使用桥接网卡。假设DHCP处于活动状态,VM将在与主机相同的子网中具有IP地址。这是最简单的。

1) Use a bridged NIC. The VM will have an IP address in the same subnet as the host machine, assuming DHCP is active. That's the simplest.

2)如果是VMware Workstation,请将VM连接到NAT交换机。在网络配置中,您可以进行端口转发,这样当主机IP在端口X上接收流量时,它可以将该流量转发到NAT客户端IP端口X(或Y)。我不记得VMware Player是否有NAT端口转发。

2) If VMware Workstation, attach the VM to the NAT switch. In Network Configuration you can then port forward so when your host IP receives traffic on port X it can forward that traffic to NAT client IP port X (or Y). I can't remember if VMware Player has NAT port forwarding.

这篇关于将我的本地地址重定向到我的虚拟机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆