I have one scenario where wireguard wont connect until i disable\enable peer on host.
On all my other setups if i setup script to disable\enable peer on client then works great, i set that up here too but about once a week or so that vpn looses connection then i login to host mikrotik disable\enable peer then go to client mikrotik and disable\enable peer then it works great.
So my fix for this was to setup a script that would watch for long handshake on host and if found then disable\enable peer then i would use my existing script on client and it would disable\enable peer and then it should work.
My scripting skills are non existent but here is my start:
Code: Select all
:if (/interface/wireguard/peers print detail where last-handshake > [:totime "10m"] ) do={
}
Code: Select all
/interface/wireguard/peers/disable [find endpoint-address=$endpointip];