View previous topic :: View next topic |
Author |
Message |
toralf Developer
Joined: 01 Feb 2004 Posts: 3942 Location: Hamburg
|
Posted: Wed Aug 03, 2011 6:45 pm Post subject: [solved]how to use VPN tunnel at host system from guest |
|
|
At home I'm using VPN which opens a tun0 device. How can connect a virtual machine (I've an UML image and KVM) to that VPN too ? The gust is connected via a tap device to the host system there I defined a bridge as described here
Last edited by toralf on Thu Aug 04, 2011 11:02 am; edited 1 time in total |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 23071
|
Posted: Thu Aug 04, 2011 2:22 am Post subject: |
|
|
There is nothing special about guests versus other LAN machines. You need to set the routing tables on the host and guest so that the guest sends to the host and the host sends to the VPN server. You may also need to enable IP forwarding and add a NAT rule so that the VPN server sees the connection originate with the host. |
|
Back to top |
|
|
toralf Developer
Joined: 01 Feb 2004 Posts: 3942 Location: Hamburg
|
Posted: Thu Aug 04, 2011 11:03 am Post subject: |
|
|
yep - iptables was missing a MASQ rule for tun0 (the interface of the VPN) |
|
Back to top |
|
|
|