I'm currently looking into moving from a bunch of VPS to a dedicated server where I'll create my own VMs using Hyper-V.

The provider assigned me multiple IP addresses.

  • x.x.x.10 (my management IP address - solely used for connecting to the server directly)
  • x.x.x.28 (want to use for VM01)
  • x.x.x.106 (want to use for VM02)

The VMs should send all outgoing traffic through their public IP address, and should receive all incoming traffic to their IP address.

I have already played around with NAT (Routing and RAS feature), haven't managed to get it working yet.

I'm using Windows Server 2016 Datacenter.

Thanks in advance!


NAT is not necessary. The IP addresses you are assigned, I am assuming, are all available over the same Ethernet cable from your provider. Usually, part of a block of contiguous addresses on the same network.

Simply create an “external” virtual switch that is connected to your physical network adapter.


For each VM, connect the virtual NIC to your external network switch and simply assign the public IP info to the TCP/IP settings on the network adapter in the VM.

Each machine will be “physically” connected to the wire and using a public IP, so each VM should have a firewall enabled.

| improve this answer | |

Don’t use NAT.

Dedicated a NIC to each VM, or assign a special VLAN to those VM, and tag the VLAN in the VM.

For the VLAN you can simply create all VLAN in your switch, plug the cable modem or internet gear there and use another port with the same VLAN tagged for your hyperv vm.

Usually you can have 3 public per modem, thus you need to plan your setup.

| improve this answer | |
  • 1
    Does Hyper-V really require such a complicated setup? If it does a simpler solution would be to replace Hyper-V with a virtualization platform that can bridge the virtual network interfaces such that VMs and host can all be on the same IP segment. – kasperd Feb 11 '18 at 17:56

Not the answer you're looking for? Browse other questions tagged or ask your own question.