The answer you are looking for is to first enable Internet Connection Sharing on the Windows guest and then selectively route certain packets to the Windows host for routing.
FROM WINDOWS:
- Control Panel\Network and Internet\Network Connections
- Right Click the adapter (might be a NIC or a VPN)
- Sharing Tab
- Select the Allow Other Network Users to Connect through This Computer’s Internet Connection check box
- In the “Home networking connection” drop-down list, select the network adapter which connects to the host
FROM MAC
Now you have to choose the subnets that you want to send to the Windows PC for routing.
Here is the command to add a route:
/sbin/route add <SUBNET> -interface <INTERFACE>
Where SUBNET is declared in CIDR format to match the subnet of your corporate network. (EXAMPLE 192.168.0.0/16)
Where INTERFACE is the interface that leads to the Windows Guest.
IMPORTANT:
Your home, corp, and VM subnets must all be different! You need to maintain your paths for your mac to get to the internet so that the tunnel can route from Windows through the VPN. You also don't want local traffic on your LAN to go through the tunnel. You really only want corporate traffic to go to the corporate network, in this case.
PEDANTIC ANSWER:
You specified ALL traffic which would include the connection to the internet and the tunnel itself. I would refer to this as "pulling the rug out from under your own feet". Imagine that these computers are physical with a cable connected between each machine; From Windows, through Mac, to the internet. Then you unplug the cable from the mac to the internet and plug it in to Windows. Now you have a loop. Two interfaces connected between the same two computers with no path to the outside world.
This doesn't explain how packets get from the MAC to a VPN tunnel coming out of a Windows VM. Is the Windows PC the VMNAT router in your scenario or is the VMNAT router pointing to the Windows PC for routing? If you make the default gateway for the MAC point to the VMNAT router how do packets get to the internet? – HackSlash – 2017-07-21T17:31:18.580
https://en.wikipedia.org/wiki/Routing_loop_problem – HackSlash – 2017-07-21T19:43:11.487