I've got an IPsec tunnel to a VM running StrongSwan. When I bring the tunnel up, everything works as expected for about 1 hour, after which the tunnel seems to stop working as it show's as Down on the Fortigate side. If I restart the ipsec tunnel on the strongswan side, it works again for about 1 hour.
I followed this guide to set this up originally https://community.fortinet.com/t5/FortiGate/Technical-Tip-FortiGate-Site-to-Site-VPN-with-Strongswan...
Output of "ipsec statusall"
My ipsec.conf
On the fortigate side of things I got the following as my tunnel settings
I've omitted the firewall rules and routes as these are working fine as far as I can tell.
Any idea what could be causing this and how to fix it? Would appreciate any pointers!
Solved! Go to Solution.
Nominating a forum post submits a request to create a new Knowledge Article based on the forum post topic. Please ensure your nomination includes a solution within the reply.
Hi @Fluppy
Seems the phase2 negotiation failed after rekey 3600 expired.
Could you please try to turn off your PFS [Phase 2 setting]on fortigate side. Based on screenshot
i believe it was not enable on Strong Swan .
Regards
Alwis
When you say tunnel down on FG side you mean phase2 down, right?
Anyway, try start the following debug command before the failure in order to see what's happening when it fails. Use the timestamp to locate the related portion of logs.
diagnose debug console timestamp enable
diagnose debug application ike -1
diagnose debug enable
Also share the following output once it fails:
diagnose vpn ike gateway list
Since you said it remains about an hour, can you change the key lifetime (phase 2 SA) on both ends from 3600 to something else (like 600) then see the behavior?
Hi @Fluppy
Seems the phase2 negotiation failed after rekey 3600 expired.
Could you please try to turn off your PFS [Phase 2 setting]on fortigate side. Based on screenshot
i believe it was not enable on Strong Swan .
Regards
Alwis
Yep, after making this post I went over the log messages and saw that it was keeping the phase 1 up but failing phase 2 at renegotiation. Turning off PFS does indeed "fix" it.
Strongswan docs say the following "PFS is enabled by appending a DH group to the ESP or AH cipher proposal"
Not sure which DH group I need to add though...
Select Forum Responses to become Knowledge Articles!
Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.
User | Count |
---|---|
1669 | |
1082 | |
752 | |
446 | |
225 |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2024 Fortinet, Inc. All Rights Reserved.