How to map a VPN (tun0) network adapter on host Ubuntu to a VirtualBox guest Windows?
I met the same problem, and googled around but found no answer. at last I found my solution:
- in windows, open the VPN connection using VPN GUI.
- in VM configuration, add a new Network: Internal network.
- restart VM.
then I can access the resource in VM.
Setting /etc/sysctl.conf
:
sysctl net.ipv4.ip_forward=1
Then running:
sudo sysctl -p
(Should not be necessary but) I rebooted after that.