[Openswan Users] Routing

Darek M darek at nyi.net
Fri May 19 13:25:27 CEST 2006


Hello list,

I have successfully configured a tunnel to a Cisco 3000 concentrator and 
have hit a roadblock with routing.

The tunnel is set up for a client machine that has a public IP address 
from a /25 network.  The IP of my OpenSWAN gateway is from a separate 
/30 network.

The client is attempting to have traffic routed to a specific host on 
the other site od the tunnel via my gateway, all other traffic going out 
through the default gateway.

Client IP: 4.4.4.33
Default gateway: 4.4.4.1
OpenSWAN: 5.5.5.242
Remote host: 6.6.7.7

I tried to set a route in on the client Windows machine with "route add 
6.6.6.6 mask 255.255.255.255 5.5.5.242" but Windows said:

"The route addition failed: Either the interface index is wrong or the 
gateway does not lie on the same network as the interface. Check the IP 
Address Table for the machine."

What is the proper way to set up the routing table to allow traffic?

The SWAN gateway is on a separate /30 network.  Would moving it within 
the customer's /25 network make routing easier?  For example, giving 
SWAN 4.4.4.34, and set up /etc/ipsec.conf as

conn remote
        left=4.4.4.34
        leftnexthop=4.4.4.1
        leftsubnet=4.4.4.33/32
        right=6.6.6.6
        rightsubnet=6.6.7.7/32

Another words, moving OpenSWAN under the same subnet so that Windows 
would allow the route entry.

Thank you for any hints.

- Darek







More information about the Users mailing list