Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved]how to use VPN tunnel at host system from guest
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3942
Location: Hamburg

PostPosted: Wed Aug 03, 2011 6:45 pm    Post subject: [solved]how to use VPN tunnel at host system from guest Reply with quote

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
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23073

PostPosted: Thu Aug 04, 2011 2:22 am    Post subject: Reply with quote

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
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3942
Location: Hamburg

PostPosted: Thu Aug 04, 2011 11:03 am    Post subject: Reply with quote

yep - iptables was missing a MASQ rule for tun0 (the interface of the VPN)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum