1

I have read a few questions and answers on this subject, but none seemed to relate to my setup. I would like to know if it is possible for my Hyper-V guest VMs to have internet connectivity in the following scenario without having to use public IP addresses for them.

I have Hyper-V running on Win 2012R2, it has a public IP address which is configured on the vEthernet connection and the host has internet connectivity, no problem there.

I would like the Hyper-V guest VMs to have internet connectivity without having to assign them all separate public IP addresses and instead, share the hosts internet connection (in a similar way that VirtualBox allows). I only have 1 public IP address, getting additional (public) IP addresses is not currently possible and there is no (physical) switch that will provide any internal IP addresses.

I do not need to externally access the guest VMs, just require them to have internet connectivity.

My first question is, is this possible? I guess the second question is, how can I achieve this?

I have looked at some similar questions that suggest setting up Virtual Switches, sharing the internet connection, etc... Which I have tried, but have not been able to get this working.

Thank you.

2

You can use the New-NetNat powershell command to create a NAT connection for the VMs to connect to the Internet using the host IP address. That's how I achieved this in the past without having to assign external IP addresses (in the same network of the host) to the VMs. Check this technet article One question: You say that your Windows Server has a public IP address, are you really using one?

| improve this answer | |
  • Hi Humberto, many thanks for your reply. I've taken a quick look at that, I'm not great with PowerShell so will try and understand it. Yes, The Windows (Host) Server has a public IP address configured. Thanks. – omega1 Oct 16 '18 at 22:17
  • 1
    If powershell is kind of new/difficult to you I found this post that could be useful. I haven't tried before but you can give it a try and see if it works. It states it's for Windows 8 but should work for Server 2012 as you might guess. Come back and post any updates! – Humberto Castellon Oct 16 '18 at 22:45
  • Thanks Humberto, that guide worked perfectly for me, much appreciated. – omega1 Oct 17 '18 at 11:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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