I want to connect to a ipsec vpn server, and it allows me to connect to different ips (not a ip range), lets say y.y.y.1, y.y.y.2, y.y.y.3, y.y.y.4.
I have the following config:
conn toing-to-toing
type=tunnel
authby=secret
auto=start
left=%defaultroute
leftid=a.b.c.d
leftsubnets={f.f.f.f/32,}
rightsubnets={y.y.y.1/32, y.y.y.2/32, y.y.y.3/32, y.y.y.4/32,}
leftnexthop=%defaultroute
right=s.s.s.s
rightnexthop=%defaultroute
keyexchange=ike
ike=aes256-sha1;dh18
pfs=yes
esp=aes256-sha1;dh18
ikelifetime=28800s
salifetime=3600s
This configuration works only with the first IP.
If I use only rightsubnet , each IP works perfectly. But I need to connect to all the IPs at the same time.
The VPN connection only works using IKEV1, and according to the libreswan documentation and strongswan documentation I might have to specify each connection separately in the following format:
conn toing-to-toing
type=tunnel
authby=secret
auto=start
left=%defaultroute
leftid=a.b.c.d
leftsubnets={f.f.f.f/32,}
leftnexthop=%defaultroute
right=s.s.s.s
rightsubnet={y.y.y.1/32}
rightnexthop=%defaultroute
keyexchange=ike
ike=aes256-sha1;dh18
pfs=yes
esp=aes256-sha1;dh18
ikelifetime=28800s
salifetime=3600s
conn-toing-to-toing2
also=toing-to-toing
rightsubnet={y.y.y.2/32}
conn-toing-to-toing3
also=toing-to-toing
rightsubnet={y.y.y.3/32}
conn-toing-to-toing4
also=toing-to-toing
rightsubnet={y.y.y.4/32}
Again, this only works ofor the first IP. I have, by now probably read nearly all the related documentation on the world wide web, but I cannot get the VPN to work for all the subnets at once. What am I doing wrong?