I have a Hyper-V Server 2012 R2 installed (because it's free). I have 2 virtual machines on this server, an Ubuntu Server (vLS) and a Windows Server (vWS).
I only have 1 external IP address for the host machine, so the virtual machines are on an internal 192.168.110.0/24 subnet with the host machine (192.168.110.1), (I created the virtual switch in a connected Hyper-V manager).
I want to set up a basic NAT, where I want to bind the external port 80 to port 80 on vWS, so the server acts as a web server (in time I will want to allow access to both virtual machines on various ports, so port 80 is only an example).
The problem is that Hyper-V Server does not allow the RRAS role to be installed, neither ICS is available.
Some other questions pointed to using New-NetNat
but since it's not Server 2016 yet, the InternalIPInterfaceAddressPrefix
is not available. This is the last version of Hyper-V server that runs without SLAT so upgrading to 2016 is not an option.
I have tried to use it with the ExternalIPInterfaceAddress
and InternalRoutingDomainId
parameters, but I was not able to figure out what a valid Internal Routing Domain ID is, and how can I figure mine out (it seems to be some sort of GUID). I have tried it with a bunch of zeroes, but to no avail.
I have looked at NAT32 but it seemed to hang on startup on the server, GUI never popping up. I will experiment with it further, but I'm hoping for native functionality on the server without installing anything 3rd party (that being said I would gladly settle for a 3rd party solution if I could get it work).
Is there a way to set up NAT in Hyper-V Server 2012 R2 and bind some ports of the virtual machines to the external IP? If yes how can I do it?