core icon indicating copy to clipboard operation
core copied to clipboard

IPSec Tunnel between Sophos UTM and OPNSense does not reconnect after Sophos Reboot

Open sourcenux opened this issue 5 years ago • 6 comments

Important notices

Before you add a new report, we ask you kindly to acknowledge the following:

  • [ x ] I have read the contributing guide lines at https://github.com/opnsense/core/blob/master/CONTRIBUTING.md
  • [ x ] I am convinced that my issue is new after having checked both open and closed issues at https://github.com/opnsense/core/issues?q=is%3Aissue

Describe the bug

We are using an opnsense Firewall (21.1.5) at one of our customers sites. The Firewall connects to our main Sophos-Firewall UTM 9.705-7 via IPSec VPN. When Updating or Rebooting the Sophos Firewall it seems to send an CLEAR command to the OPNSense Firewall. (as stated here: https://github.com/opnsense/core/issues/3291#issuecomment-503085413 ). After the reboot of the sophos firewall has finished, the OPNSense does not try to reconnect the ipsec tunnel unless we manually restart the ipsec service on the OPNSense firewall. Our quick and dirty solution is to use a cronjob that restarts the ipsec daemon once a day on the OPNSense firewall. The OPNsense is configured to use the "default" Connection mode. The Sophos is configured to only Receive Connections.

To Reproduce

Steps to reproduce the behavior:

Establish an IPSec IKEv1 Tunnel between the Sophos and OPNsense firewall. Tunnel is up and working fine. Reboot Sophos Firewall See, that the ipsec tunnel does not reconnect.

Expected behavior

The Tunnel should be restarted if the peer reboots or sends an CLEAR, if the DPD Action is "restart".

Describe alternatives you considered

Create a cronjob that periodically restarts the ipsec daemon

Environment

Software version used and hardware type if relevant, e.g.:

OPNsense 21.1.5 (amd64, OpenSSL). VM on ESXi Epyc 7302

sourcenux avatar Jun 04 '21 15:06 sourcenux

I had bad experience with "start immediately" on OPNsense, everytime there is an interruption or reboot, the tunnel does not get reestablished automaticly, i had to press the "start" button in the status window to get it reestablished. For tunnel where only outgoing connections happen i enabled start on traffic, always works but does not help if the other side may initiate traffic over the tunnel.

sjansen1 avatar Jun 07 '21 14:06 sjansen1

Do you know if this is more likely to be an opnsense issue but an strongswan issue?

sourcenux avatar Jun 07 '21 17:06 sourcenux

You know the strongswan version of Sophos has a git tag of 2010!?

mimugmail avatar Jun 07 '21 19:06 mimugmail

It's worth noting that auto=start (connection method "start immediate") will not re-establish the tunnel if it is shut down. Use auto=route (connection method "start on traffic") to ensure that the tunnel will be re-established.

glasid avatar Aug 29 '21 11:08 glasid

@glasid Thanks. That seems to have solved our problem for now.

sourcenux avatar Sep 03 '21 20:09 sourcenux

This issue has been automatically timed-out (after 180 days of inactivity).

For more information about the policies for this repository, please read https://github.com/opnsense/core/blob/master/CONTRIBUTING.md for further details.

If someone wants to step up and work on this issue, just let us know, so we can reopen the issue and assign an owner to it.

OPNsense-bot avatar Dec 01 '21 15:12 OPNsense-bot