Wednesday, October 23, 2013

Virtualbox: use host VPN

Configuration: Windows 7 host, Fedora guest
Configure a new NAT adapter in Virtualbox network settings.
Start the VPN on Windows.
Start the VM.
> cd /etc/sysconfig/network-scripts
> sudo vi ifcfg-eth1
DEVICE=eth1
NM_CONTROLLED=no
ONBOOT=yes
BOOTPROTO=dhcp
DNS1=8.8.8.8
DNS2=8.8.4.4
TYPE=Ethernet
USERCTL=no
PEERDNS=yes
IPV6INIT=no
> sudo ifup eth1
Test connection to remote machine only available through the VPN
> ping engine1