I'm using Windows 8.1 Pro with HyperV. I have several VMs for development, all of them connected with host via Internal adapter using network addresses:


is my host's Hyper-V internal NIC address.

When I'm not in my office I use 3G usb dongle an dialup VPN connection. I would like to route traffic from all existing and future VMs through the VPN. In best scenario traffic would be routed only partially to the local company network addresses 

I don't want to use sharing because I'm switching between WiFi, USB 3G dongle and VPN. Moving to other virtualization is also not an option for me.

1 Answer 1


You must enable IPv4 forwarding on the host, which is OS-specific. Just Google it.

You also need to determine whether your hosts have a routing rule providing a default route through your host. It should exist, in which case you are all set. If it does not exist, you will have to do it by hand, and this too is OS-specific. But you can Google change default gateway in Windows/Mac OS/Linux/FreeBSD/whatever easily.


In order to enable IPv4 forwarding on your Windows host machine do the following:

1) Start Registry Editor (Regedit.exe).

2) In Registry Editor, locate the following registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

3) Set the following registry value:

 Value Name: IPEnableRouter
 Value type: REG_DWORD
 Value Data: 1

A value of 1 enables TCP/IP forwarding for all network connections that are installed and used by this computer.

4) Quit Registry Editor.

Now try pinging any IP address (, for instance) from your guests, it should work.

  • Can you be more specific please?
    – Random
    Nov 10, 2013 at 8:51
  • @Random Edited my answer, it should work right away, if it doesn't write back. Nov 10, 2013 at 9:03
  • I've enabled IP routing some time ago but it still doesn't work.
    – Random
    Nov 11, 2013 at 6:35
  • 1
    +1 for the reference to IP Forwarding. Another way to enable is start the "Routing and Remote Access" Windows Service.
    – Joshua
    Dec 10, 2013 at 22:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .