大网数据广告活动
服务器运维问答

Opening a Hyper-V VM to the Outside World

· 52CE 我爱测

I created a Windows Server 2016 virtual server using Hyper-V Manager on the host. I have several virtual machines. The host computer has 2 network connections to our main switch: a dual bonded 10G connection and a dual bonded 1G …

问题原文

原帖链接 · Sarah Weinberger · CC BY-SA 4.0

I created a Windows Server 2016 virtual server using Hyper-V Manager on the host. I have several virtual machines. The host computer has 2 network connections to our main switch: a dual bonded 10G connection and a dual bonded 1G connection. Between the switch and the outside world is our firewall and the router. Our internal network should not be open or accessible, out host server, or any other virtual computer running on the host. We have a static IP and only need one port open to our VM.

I saw this SF question.

I installed RRAS on the host, however the accepted answer was a bit confusing about what to do next. Yes, I know that I need to configure one of the interfaces as a NAT in RRAS, which I did (1 GB). I also need to open up the appropriate port.

  1. I only see the 10 GB connection in the drop down list, not the 1G.

  2. The IP address of the VM client is the same as the host. How do I assign a unique IP? Furthermore, I presume that I should place the VM on a separate sub-net.

  3. As we are talking about a VM off of the host, what changes need to be made on the switch and on the firewall?

  4. Anything else?

Here is the RRAS, not that I really configured anything yet.

UPDATE

I am leaving the original question for a paper trail of sorts. The question thanks to joeqwerty should have been phrased as such:

What changes do I need to do, if any, on the VM or the host to get HTTP/HTTPS REST communication flowing based on that port to that VM?

I guess that I do not need any unique IP or anything special. I just need port 9000 traffic to flow (route) to the VM and only to the VM. As such, what changes need to be made and where?

已采纳解答

原帖链接 · joeqwerty · CC BY-SA 4.0

I only see the 10 GB connection in the drop down list, not the 1G.

Did you create a Hyper-V Virtual Switch with the 1GB NIC? If not, that's why you don't see it. You need to create a Hyper-V Virtual Switch with the 1GB NIC.

The IP address of the VM client is the same as the host. How do I assign a unique IP? Furthermore, I presume that I should place the VM on a separate sub-net.

You need to assign the VM a unique ip address. You do that in the OS of the VM. You do this the same way you do in a physical machine. Additionally, you probably don't need to place the VM in a different subnet, but only you know how your network is configured so we can't answer that for you.

As we are talking about a VM off of the host, what changes need to be made on the switch and on the firewall?

You probably don't need to make any changes on your switch, but again, we don't know your network so only you can answer that. As for the firewall, you'll need a NAT statement and a firewall rule for the VM and for the traffic you want to "forward" to the VM from the outside.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2018-07-31)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。