monit + restart ipsec

Started by MaDe, October 20, 2023, 04:25:27 PM

Previous topic - Next topic
Good day,
I tried to restart my VPN tunnel with Monit when tunnel endpoint is not reachable.
VPN setup is the new one --> CONNECTIONS [NEW].
I setup the monitor like descried in https://docs.opnsense.org/manual/monit.html#example-2.
Monit recognized the that the tunnel is down but ended up with an error.

2023-10-20T15:17:20 Error monit 'Restart_IPSEC' ping test failed
2023-10-20T15:17:20 Error monit Ping response for 10.56.255.44 4/4 timed out -- no response within 5 s
2023-10-20T15:17:15 Warning monit Ping response for 10.56.255.44 3/4 timed out -- no response within 5 s
2023-10-20T15:17:10 Warning monit Ping response for 10.56.255.44 2/4 timed out -- no response within 5 s
2023-10-20T15:17:05 Warning monit Ping response for 10.56.255.44 1/4 timed out -- no response within 5 s


I also tried it via CLI with this command:

# ipsec down b02cf2ec-96fd-4386-afb1-1c8b97918a9d


This working and shuts down the tunnel.
Did I miss something? Or will it be because I am using the 'new' setup for the VPNs?

Thanks,
MaDe