[vpnc-devel] Installing vpnc on a gateway
hilse at web.de
Sun Aug 28 15:55:39 CEST 2005
On Sun, 28 Aug 2005, Sebastian Kaps wrote:
> I want to access my university's network through a VPN. I installed vpnc
> on my home gateway (running Linux 2.6) and everything worked fine.
> But I can only access the university network from that gateway. When I'm
> working from a machine located behind the gateway, I can't reach any of
> the university's machines (as long as the tunnel is established).
> My network at home looks like this:
> [ LAN ] - [ gateway ] - [ DSL-Router ] - [ ... ]
> The DSL router also does NAT.
> My guess is that I need to do some kind of NAT for the tun0 device on
> the gateway, but I tried that and it didn't make a difference.
Yep. It's like
... (check the routes afterwards!)
$ echo 1 > /proc/sys/net/ipv4/conf/tun0/forwarding
$ iptables -A POSTROUTING -d tun0 -j MASQUERADE
And of course, you'd need to enter the gateway's IP as the other clients'
configured default gateway (or at least as the gateway to those IP ranges
you want to run over the VPN).
More information about the vpnc-devel