[Openswan Users] ip route and openswan
Andy Gay
andy at andynet.net
Thu Aug 3 05:04:58 EDT 2006
On Thu, 2006-08-03 at 09:15 +0100, ipsec wrote:
> When I start openswan the following ip route is created
>
> 10.3.0.0/24 via xxx.www.yyy.zzz dev eth0
>
> This routes perfectly between the two networks, however it will not route
> between the two hosts over the same tunnel, to do this I have to delete the
> above route and then use the following command
>
> ip route add 10.3.0.0/24 via 80.229.92.113 dev eth0 src 10.0.0.1
>
> To get a final ip route of
>
> 10.3.0.0/24 via xxx.www.yyy.zzz dev eth0 src 10.0.0.1
>
> is there a way to get openswan to add the src 10.0.0.1 (gateway local ip) to
> the above line automatically, even if I have to enter 10.0.0.1 in a
> configuration file somewhere as there could be multiple interfaces/ips on
> the machine.
Yes. Add 'leftsourceip=10.0.0.1' to your conn entry.
>
> I know I can route between the two host by creating extra tunnels in my
> configuration, however I do not wish to have more than one tunnel, or have
> an ipsec connection between the external ip addresses, and everything I need
> can be achieved over one tunnel if only the ip route line is correct.
>
> Thanks in advance
> _______________________________________________
> Users at openswan.org
> http://lists.openswan.org/mailman/listinfo/users
> Building and Integrating Virtual Private Networks with Openswan:
> http://www.amazon.com/gp/product/1904811256/104-3099591-2946327?n=283155
>
More information about the Users
mailing list