[Gllug] Right way to route some traffic to a VPN connection

Stephen Harker steve at pauken.co.uk
Thu May 19 10:57:24 UTC 2005


John Winters wrote:
> I have a LAN which has a permanent connection to the 'net, plus a VPN
> connection to another LAN.  IP addresses on the local LAN are allocated
> by DHCP.  What is the correct way to tell the machines on the LAN to use
> one machine as their default gateway and another (the one which handles
> the VPN connection) for packets for one particular range of IP
> addresses?
> 
> Method 1 - include information for both in the DHCP server (and if so,
> how?)
> 
> Method 2 - just set up the default route by DHCP, then have the default
> gateway issue redirects to client boxes as the need arises.  (and if so,
> does the gateway need any particular setting up?)

Easiest way I would have thought is to just set the client machines 
default route with DHCP to the net gateway and then set the routing up 
on that gateway to also forward packets for the VPN'd network to the VPN 
gateway machine.

So on the gateway machine (Linux?) do a

route add 'vpnnetwork address' netmask 'vpnnetwork_netmask' gw 'ip of 
VPN gateway'

or something like that and it should forward packets from the client PCs 
to the VPN gateway.

Steve
Steve
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list