I rented one dedicated server (Win Server 2012) with one adapter/static IP address. I want to install Hyper-V and guest OS (Win also), that can expose some of its services to the internet. For example, guest OS will have IIS and one web site that should be available from outsite on some specific port. IIS from host OS is on port 80, and I would like to access IIS on guest OS on for example, port 8080.
How do I configure hyper-v and its external/internal virtual switch?
It is important not to change host OS IP and loose RDP, because that's only way for connecting to it (there's another way but I have to pay for it). Hosting provider is Hetzner.


According to this guide, the major steps boil down to:

  1. Configure Internal Switch
    • With Virtual Ethernet Adapter
  2. Install the Routing and RAS role: Custom Configuration
    • NAT
    • WAN: Physical Network
    • LAN: Virtual Network
    • "I will set up name and address services later"
  3. Enable NAT on physical network interface
  4. Set up DHCP

Then, somehow configure port forwarding. This should be accomplished by doing this:

netsh interface portproxy add v4tov4 listenport=8080 connectaddress=192.168.0.100 connectport=8080 protocol=tcp

Further information on this command is available here.