Strongswan IPsec - how to automatically set routes?
Hi there,
We have an IPsec Fortinet VPN IKEV1. The official Forticlient connects and set routes successfully on both Windows and macOS.
I'm trying to match the same setup using strongswan with Amazon Linux 2.
I'm able to login, but the routes can't be set up automatically. I have to manually add the network using a new 'conn' and 'also'.
So, how can I configure strongswan to configure routes as Forticlient does?
Bests,
conn connection01 type = tunnel dpdaction = restart keyexchange = ikev1 ikelifetime = 86400 keyingtries=%forever ike = aes256-sha256-modp1536 esp = aes256-sha256-modp1536 aggressive = yes right = forticlient.fqdn rightsubnet = 10.0.0.0/24 rightfirewall = yes rightid = %any rightauth = psk left = %defaultroute leftsubnet=%dynamic,10.1.1.0/24 leftsourceip = %config4 leftdns = %config4 leftauth = psk leftauth2 = xauth xauth_identity = "<username>" auto = start compress = yes modeconfig = pull installpolicy = yes fragmentation=yes reauth = yes forceencaps = no mobike = no dpdaction = restart dpddelay = 10s dpdtimeout = 60s authby = secret conn sandbox also = connection01 rightsubnet = 10.20.16.0/20
