Page 1 of 1

guest using host vpn

Posted: 5. Dec 2008, 23:39
by duncs
Hope someone can help with this...

I have an openvpn connection set up and working on my host (ubuntu 7.10 Gutsy) . I have a NAT'ed guest (debian etch) that I would like to share the vpn with (set up on tun0 automatically by openvpn).

I have seen this work via kvm and other vm software, but it doesnt seem to work with VB.

I have enabled tcp ipv4 forwarding in the kernel but still no joy.

Any ideas what might prevent the guest using the vpn? I can only guess the guest is using the network at a point after the vpn in the network so wont see the tunnel (directly onto the network interface perhaps?). This is virtualbox 2.0.6.39765.

Thanks

Posted: 11. Dec 2008, 02:54
by TerryE
Welcome to our forum. You might want to take this opportunity to browse the Forum Posting Guide. This contains some useful tips on how to search for VBox knowledge and how to frame Qs.

Have a search on this one. Many VPNs use IP protocols other than and as well as TCP and UDP. However VBox only tunnels TCP and UDP, so for these protocols you need to bridge with a host IF.

Posted: 15. Jan 2009, 18:33
by duncs
TerryE wrote:Have a search on this one. Many VPNs use IP protocols other than and as well as TCP and UDP. However VBox only tunnels TCP and UDP, so for these protocols you need to bridge with a host IF.
Unfortunately I had already set up a bridge and it didnt work, hence me posting here :(

I have a work around though - add in two network interfaces to the host via the GUI (one NAT the other attached to eth0), then in the host set up dhcp on the NAT interface and a static IP on the eth0 interface and ensure you dont have a static route set up on it (so by default everything goes via the NAT interface).

"Works for me" :D

Duncs