Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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:

192.168.10.0/24

Where:

192.168.10.1 

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

10.1.1.0/24 

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.

share|improve this question

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.

EDIT:

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 (8.8.8.8, for instance) from your guests, it should work.

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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