端口转发 虚拟机_如何将端口转发到虚拟机并将其用作服务器

端口转发 虚拟机

端口转发 虚拟机

image

VirtualBox and VMware both create virtual machines with the NAT network type by default. If you want to run server software inside a virtual machine, you’ll need to change its network type or forward ports through the virtual NAT.

默认情况下,VirtualBox和VMware都使用NAT网络类型创建虚拟机。 如果要在虚拟机中运行服务器软件,则需要更改其网络类型或通过虚拟NAT转发端口。

Virtual machines don’t normally need to be reachable from outside the virtual machine, so the default is fine for most people. It actually provides some security, as it isolates the virtual machine from incoming connections.

通常不需要从虚拟机外部访问虚拟机,因此对于大多数人而言,默认设置是合适的。 它实际上提供了一定的安全性,因为它将虚拟机与传入的连接隔离开来。

选择桥接网络 (Selecting Bridged Networking)

With the NAT network type, your host operating system performs network address translation. The virtual machine shares your host computer’s IP address and won’t receive any incoming traffic. You can use bridged networking mode instead — in bridged mode, the virtual machine will appear as a separate device on your network and have its own IP address.

使用NAT网络类型,您的主机操作系统将执行网络地址转换。 虚拟机共享您的主机的IP地址,并且不会收到任何传入流量。 您可以改用桥接网络模式-在桥接模式下,虚拟机将在网络上显示为单独的设备,并具有自己的IP地址。

To change a virtual machine’s network type in VirtualBox, right-click a virtual machine and select Settings. If you can’t click Settings, you’ll need to power off the virtual machine before maki

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值