[Openswan Users] Routing through tunnel question

Peter McGill petermcgill at goco.net
Mon Jan 30 09:13:20 CET 2006


> remote subnet 10.0.0.0/255.255.255.0
> local subnet 10.1.0.0/255.255.255.0

> route add -net 1.1.1.1 netmask 255.255.255.255 gw 10.0.0.2

You should have a connection for the route, this is the preferred,
and tested method:

Add a second conn same as the first, but change the name,
and the subnets:
use remote subnet 1.1.1.1/32 (or 1.1.1.1/255.255.255.255 if you prefer)
use local subnet 10.1.0.0/24 (or 10.0.0.0/8 or 0.0.0.0/0 if you also want
to route traffic from other subnets through this one.)
Add the reverse conn on the remote gateway as well :)

Then if 10.0.0.2 is not the private ip of the remote gateway, then you
will also need a route on the remote gateway:
route add -net 1.1.1.1 netmask 255.255.255.255 gw 10.0.0.2

It is perfectly acceptable to have multiple conn's between gateways.


Peter McGill
Software Developer / Network Administrator
Gra Ham Energy Limited


More information about the Users mailing list