From 2a4e27673a061ad15026e9cd1e18a8bf8e8aa56f Mon Sep 17 00:00:00 2001 From: Nicole Rappe Date: Thu, 12 Sep 2024 19:49:06 -0600 Subject: [PATCH] Update Networking/Sophos/Site-to-Site VPNs/IPSec/Automatic Tunnel Resetting.md --- .../IPSec/Automatic Tunnel Resetting.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Networking/Sophos/Site-to-Site VPNs/IPSec/Automatic Tunnel Resetting.md b/Networking/Sophos/Site-to-Site VPNs/IPSec/Automatic Tunnel Resetting.md index 3426c65..4dffd51 100644 --- a/Networking/Sophos/Site-to-Site VPNs/IPSec/Automatic Tunnel Resetting.md +++ b/Networking/Sophos/Site-to-Site VPNs/IPSec/Automatic Tunnel Resetting.md @@ -68,8 +68,18 @@ You need a place to put the script (and if on Windows, `curl.exe`). Follow the !!! note "Optional Reporting" You may find that you want some extra logging enabled so you can track the script doing its job to ensure its working. You can add the following to the script above to add that functionality. + Add the following to the bottom of each server in the `Check-VPN-Tunnel` function, directly below the `Reset-VPN-Tunnel` function. + ``` powershell - PLACEHOLDER + Add-Content -Path "C:\Scripts\VPN_Tunnel_Checker\Tunnel.log" -Value "$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss') PLACEHOLDER Connection Down" + ``` + + Lastly, change the very end of the script under where the `Check-IHS-Tunnel` function is being called to look like this if you want to log heartbeats and not just when a VPN tunnel is down. The purpose of this is to show the script is actually running. I recommend only temporarily implementing it during initial deployment. + + ``` powershell + CD "C:\Scripts" + Check-IHS-Tunnel + Add-Content -Path "C:\Scripts\VPN_Tunnel_Checker\Tunnel.log" -Value "$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss') Heartbeat" ``` === "Linux"