I would like to connect my VirtualBox VM running Ubuntu 10.04.4 to a VPN or share the host's VPN connection. The VM is connected to the internet and issued an IP from my wireless router but it is not sharing the VPN connection that the host has established. Is there a way to do this. The host OS is Mac OSX 10.8.5.
Asked
Active
Viewed 2,873 times
1
amphibient
- 2,183
- 9
- 31
- 43
-
Is there a reason you have to get this working from the host? Why not connect from Ubuntu? – rtf Feb 20 '14 at 20:39
-
either, as long as the VM is connected to the VPN (connected locally or sharing the host's) – amphibient Feb 20 '14 at 20:49
1 Answers
3
You could change the networking mode of the VM to use NAT instead of Bridged. Using NAT should make the VM use the host computer's internet connection, and in turn use the VPN to connect to the internet.
heavyd
- 63,745
-
when i do that, my VM doesn't get an IP address, i.e. i can't SSH into it, which is another requirement. it only gets an IP if i use bridged... – amphibient Feb 20 '14 at 20:52
-
You'll need to setup port forwarding if you want to access any services while using NAT. – heavyd Feb 20 '14 at 20:53
-
-
That question has been answered too many times before to repeat it here: VirtualBox Docs, Super User: VirtualBox Host ssh to Guest – heavyd Feb 20 '14 at 21:12