2
3
Here's what I have:
Mac OS X 10.10 - running VirtualBox and acting as an OpenVPN client. This works just fine on the VPN and is intended to be my host machine. There is also a WiFi connection on this machine that acts as my gateway to the outside world. This Mac is set up with NAT to connect to the WiFi router.
Windows 7 Pro - this is a virtual instance to be running through VirtualBox on the Mac.
My OpenVPN Server is running on CentOS but I don't think that matters for the purposes of my question.
How can I make sure that my Windows machine only makes connections through the VPN and never via the WiFi?
When I first started, I thought that the OpenVPN client would act as a new network adapter and I could expose only that adapter in the VirtualBox settings. But that doesn't seem to be the case, VirtualBox just takes it as a NAT adapter.
To be clear, the desired use case would be the following:
The OpenVPN client is running fine on the Mac host machine which means that it runs fine on the Windows machine.
The OpenVPN goes down on the Mac client but the Mac keeps running via the Wifi connection. The Windows machine now no longer has access to any internet resources since there is no connection.
How can I achieve this?
1@Arjan yes, thank you. The reference to CentOS is for my OpenVPN server. So I think that bit of info shouldn't have an impact on the answers since my question is basically client-side only. – Unknown Coder – 2015-08-14T16:08:33.837
The question How can I make VirtualBox guests share the host's VPN connection? on AskUbuntu covers this topic in detail.
– Breakthrough – 2015-08-18T16:20:28.523