#!/usr/local/bin/bashtest=`ipsec status | grep "con1" | grep -A1 "INSTALLED, TUNNEL"`if [ -z "$test" ]then ipsec up con1fi
@LHBL2003 ist das Thema erledigt?Ich habe in meiner täglichen Praxis mit OPNsense ab und zu das Problem, dass IPsec Tunnel nicht wieder gestartet werden.Daher habe ich mir einen Cronjob erstellt, der den Tunnel überprüft und ggf neu startet.Dazu habe ich für jede IPsec Verbindung ein Script wie folgt angelegt:Code: [Select]#!/usr/local/bin/bashtest=`ipsec status | grep "con1" | grep -A1 "INSTALLED, TUNNEL"`if [ -z "$test" ]then ipsec up con1fiDer Cronjob läuft jede Minute. Kann man sicher auch eleganter lösen.
DPD deaktivieren könnte helfen. Wenn ein Host down ist versucht DPD 5 mal neu zu starten, kommt dann nix wird der Tunnel auf hold gesetzt. Eventuell bringts was ...
Tunnel Settings : Phase1 : Start immediate
Quote from: Gauss23 on October 28, 2020, 08:55:01 pm@LHBL2003 ist das Thema erledigt?Ich habe in meiner täglichen Praxis mit OPNsense ab und zu das Problem, dass IPsec Tunnel nicht wieder gestartet werden.Daher habe ich mir einen Cronjob erstellt, der den Tunnel überprüft und ggf neu startet.Dazu habe ich für jede IPsec Verbindung ein Script wie folgt angelegt:Code: [Select]#!/usr/local/bin/bashtest=`ipsec status | grep "con1" | grep -A1 "INSTALLED, TUNNEL"`if [ -z "$test" ]then ipsec up con1fiDer Cronjob läuft jede Minute. Kann man sicher auch eleganter lösen.DPD deaktivieren könnte helfen. Wenn ein Host down ist versucht DPD 5 mal neu zu starten, kommt dann nix wird der Tunnel auf hold gesetzt. Eventuell bringts was ...
2021-02-11T09:47:29 charon: 12[CFG] trap not found, unable to acquire reqid 02021-02-11T09:47:29 charon: 06[KNL] creating acquire job for policy 222.222.222.222/32 === 111.111.111.111/32 with reqid {0}2021-02-11T09:47:29 charon: 06[KNL] received an SADB_ACQUIRE with policy id 9661 but no matching policy found2021-02-11T09:47:26 charon: 06[CFG] trap not found, unable to acquire reqid 02021-02-11T09:47:26 charon: 12[KNL] creating acquire job for policy 222.222.222.222/32 === 111.111.111.111/32 with reqid {0}2021-02-11T09:47:26 charon: 12[KNL] received an SADB_ACQUIRE with policy id 9661 but no matching policy found2021-02-11T09:47:13 charon: 12[CFG] trap not found, unable to acquire reqid 02021-02-11T09:47:13 charon: 06[KNL] creating acquire job for policy 222.222.222.222/32 === 111.111.111.111/32 with reqid {0}2021-02-11T09:47:13 charon: 06[KNL] received an SADB_ACQUIRE with policy id 9663 but no matching policy found2021-02-11T09:47:08 charon: 12[CFG] trap not found, unable to acquire reqid 02021-02-11T09:47:08 charon: 12[KNL] creating acquire job for policy 222.222.222.222/32 === 111.111.111.111/32 with reqid {0}2021-02-11T09:47:08 charon: 12[KNL] received an SADB_ACQUIRE with policy id 9661 but no matching policy found2021-02-11T09:47:05 charon: 12[CFG] trap not found, unable to acquire reqid 02021-02-11T09:47:05 charon: 06[KNL] creating acquire job for policy 222.222.222.222/32 === 111.111.111.111/32 with reqid {0}2021-02-11T09:47:05 charon: 06[KNL] received an SADB_ACQUIRE with policy id 9661 but no matching policy found2021-02-11T09:47:03 charon: 06[KNL] <con1|35> unable to delete SAD entry with SPI cda60877: No such process (3)2021-02-11T09:47:03 charon: 06[IKE] <con1|35> giving up after 5 retransmits2021-02-11T09:46:48 charon: 06[IKE] <con1|35> sending keep alive to 111.111.111.111[4500]2021-02-11T09:46:28 charon: 06[IKE] <con1|35> sending keep alive to 111.111.111.111[4500]2021-02-11T09:46:08 charon: 06[IKE] <con1|35> sending keep alive to 111.111.111.111[4500]2021-02-11T09:46:02 charon: 06[KNL] creating rekey job for CHILD_SA ESP/0xb6ab0e2a/111.111.111.1112021-02-11T09:45:48 charon: 06[NET] <con1|35> sending packet: from 222.222.222.222[4500] to 111.111.111.111[4500] (336 bytes)2021-02-11T09:45:48 charon: 06[IKE] <con1|35> retransmit 5 of request with message ID 122021-02-11T09:45:46 charon: 06[IKE] <con1|35> sending keep alive to 111.111.111.111[4500]2021-02-11T09:45:26 charon: 06[IKE] <con1|35> sending keep alive to 111.111.111.111[4500]2021-02-11T09:45:06 charon: 09[NET] <con1|35> sending packet: from 222.222.222.222[4500] to 111.111.111.111[4500] (336 bytes)2021-02-11T09:45:06 charon: 09[IKE] <con1|35> retransmit 4 of request with message ID 122021-02-11T09:45:03 charon: 09[IKE] <con1|35> sending keep alive to 111.111.111.111[4500]2021-02-11T09:44:42 charon: 09[NET] <con1|35> sending packet: from 222.222.222.222[4500] to 111.111.111.111[4500] (336 bytes)2021-02-11T09:44:42 charon: 09[IKE] <con1|35> retransmit 3 of request with message ID 122021-02-11T09:44:29 charon: 09[NET] <con1|35> sending packet: from 222.222.222.222[4500] to 111.111.111.111[4500] (336 bytes)2021-02-11T09:44:29 charon: 09[IKE] <con1|35> retransmit 2 of request with message ID 122021-02-11T09:44:22 charon: 09[NET] <con1|35> sending packet: from 222.222.222.222[4500] to 111.111.111.111[4500] (336 bytes)2021-02-11T09:44:22 charon: 09[IKE] <con1|35> retransmit 1 of request with message ID 122021-02-11T09:44:18 charon: 09[NET] <con1|35> sending packet: from 222.222.222.222[4500] to 111.111.111.111[4500] (336 bytes)2021-02-11T09:44:18 charon: 09[ENC] <con1|35> generating CREATE_CHILD_SA request 12 [ N(REKEY_SA) N(ESP_TFC_PAD_N) SA No KE TSi TSr ]2021-02-11T09:44:18 charon: 09[IKE] <con1|35> establishing CHILD_SA con1{237} reqid 222021-02-11T09:44:18 charon: 06[KNL] creating rekey job for CHILD_SA ESP/0xc9ae9fa6/222.222.222.2222021-02-11T09:44:12 charon: 06[IKE] <con1|35> sending keep alive to 111.111.111.111[4500]2021-02-11T09:43:52 charon: 06[IKE] <con1|35> sending keep alive to 111.111.111.111[4500]2021-02-11T09:43:32 charon: 06[IKE] <con1|35> sending keep alive to 111.111.111.111[4500]2021-02-11T09:43:12 charon: 06[IKE] <con1|35> sending keep alive to 111.111.111.111[4500]2021-02-11T09:42:52 charon: 06[IKE] <con1|35> sending keep alive to 111.111.111.111[4500]2021-02-11T09:42:32 charon: 06[IKE] <con1|35> sending keep alive to 111.111.111.111[4500]2021-02-11T09:42:11 charon: 11[IKE] <con1|35> sending keep alive to 111.111.111.111[4500]2021-02-11T09:41:51 charon: 11[IKE] <con1|35> sending keep alive to 111.111.111.111[4500]2021-02-11T09:41:31 charon: 11[IKE] <con1|35> sending keep alive to 111.111.111.111[4500]2021-02-11T09:41:11 charon: 11[IKE] <con1|35> sending keep alive to 111.111.111.111[4500]2021-02-11T09:40:51 charon: 11[IKE] <con1|35> sending keep alive to 111.111.111.111[4500]2021-02-11T09:40:31 charon: 11[IKE] <con1|35> sending keep alive to 111.111.111.111[4500]2021-02-11T09:40:11 charon: 11[IKE] <con1|35> sending keep alive to 111.111.111.111[4500]