I'm trying to use Openswan (version 2.6.37) to connect an IPsec VPN from my local network to a remote site. Everything works fine when I just want to connect to a single subnet on the remote site. However, the remote site also has an extra subnet that I want to access.
This is my configuration:
conn myConn
type=tunnel
left=192.168.139.14
leftsubnet=192.168.139.0/24
leftxauthclient=yes
right=X.X.X.X
rightsubnet=172.16.1.0/24
keyexchange=ike
auth=esp
authby=secret
phase2alg=3des-sha1
pfs=yes
When I replace rightsubnet with rightsubnets, like so:
rightsubnets={172.16.1.0/24 192.168.3.0/24}
...then the connection is created successfully but only the last subnet in the list is available. Any attempts to ping anything on the 172.16.1.0 subnet fails. If I swap the order of the subnets around then I can ping 172.16.1.X but can't ping anything on the other subnet. It's as if Openswan is only using the last subnet in the list to create a connection.
Am I doing something wrong here?
A little bit of extra information that I neglected to mention (although I'm not sure it's relevant): My Openswan client is behind a router using NAT and I have nat_traversal=yes in my ipsec.conf file.