root@OPNsense:/tmp # cat /usr/local/etc/ipsec.conf# This file is automatically generated. Do not editconfig setup uniqueids = yesconn pass right=127.0.0.1 # so this connection does not get used for other purposes leftsubnet=10.30.0.0/16 rightsubnet=10.30.0.0/16 type=passthrough auto=routeconn con1 aggressive = no fragmentation = yes keyexchange = ikev2 mobike = yes reauth = yes rekey = yes forceencaps = no installpolicy = yes type = tunnel dpdaction = restart dpddelay = 2s dpdtimeout = 12s
dpdaction = none | clear | hold | restartcontrols the use of the Dead Peer Detection protocol (DPD, RFC 3706) where R_U_THERE notification messages(IKEv1) or empty INFORMATIONAL messages (IKEv2) are periodically sent in order to check the liveliness of theIPsec peer. The values clear, hold, and restart all activate DPD and determine the action to perform on a timeout.With clear the connection is closed with no further actions taken. hold installs a trap policy, which will catchmatching traffic and tries to re-negotiate the connection on demand. restart will immediately trigger an attemptto re-negotiate the connection. The default is none which disables the active sending of DPD messages.dpddelay = 30s | <time>defines the period time interval with which R_U_THERE messages/INFORMATIONAL exchanges are sent to the peer.These are only sent if no other traffic is received. In IKEv2, a value of 0 sends no additional INFORMATIONALmessages and uses only standard messages (such as those to rekey) to detect dead peers.dpdtimeout = 150s | <time>defines the timeout interval, after which all connections to a peer are deleted in case of inactivity.This only applies to IKEv1, in IKEv2 the default retransmission timeout applies, as every exchange is used todetect dead peers.
retransmit_tries Integer 5 Number of retransmissions to send before giving upretransmit_timeout Double 4.0 Timeout in secondsretransmit_base Double 1.8 Base of exponential backoff Using the default values, packets are retransmitted as follows:Retransmission Formula Relative timeout Absolute timeout1 4 * 1.8 ^ 0 4s 4s2 4 * 1.8 ^ 1 7s 11s3 4 * 1.8 ^ 2 13s 24s4 4 * 1.8 ^ 3 23s 47s5 4 * 1.8 ^ 4 42s 89sgiving up 4 * 1.8 ^ 5 76s 165s
root@OPNsense:/tmp # cat /usr/local/etc/ipsec.conf# This file is automatically generated. Do not edit
root@opnsense01:~ # cat /usr/local/etc/strongswan.opnsense.d/strongswan.ikev2.confcharon {# See https://wiki.strongswan.org/issues/1216 make_before_break = yes# See https://github.com/opnsense/core/issues/3291 retransmit_tries = 10 retransmit_timeout = 2 retransmit_base = 1}root@opnsense01:~ #