# [solved]how to use VPN tunnel at host system from guest

## toralf

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 hereLast edited by toralf on Thu Aug 04, 2011 11:02 am; edited 1 time in total

----------

## Hu

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.

----------

## toralf

yep - iptables was missing a MASQ rule for tun0 (the interface of the VPN)

----------

