You can use the script in the zip file at the bottom of this page to detect if a user is on a VPN, and then block the backups in that ESE agent so they do not saturate the VPN tunnels.
To use the script:
1. Extract the contents of the zip file into ESE scripts subdirectory, default location C:\Program Files\Redstor Pro\Backup Client ESE\scripts.
2. Launch a PowerShell command window and navigate to the directory.
3. Run the script in setup mode using
Note: You may encounter a security warning about running the script downloaded from the internet. Please cancel and run
Unblock-File .\DetectVPN.ps1 to remove the warning.
4. You will be prompted to select the mode to use, and the relevant details. The script supports two modes: Microsoft VPN mode, and route matching mode.
- In Microsoft VPN mode, the script checks for connected VPNs - either matching the specified Server Address, or all.
- In route matching mode, the script checks the local routing table for specified routes that would be present when the VPN is connected. Exclusions are also supported to allow the backup to continue if an additional route is detected. This can match locally connected networks, and is intended to detect if the machine is on an office network.
Note: Routes should be entered in CIDR format.
5. When the setup script completes, configure it to run at the start of each backup as per Article 834. Make sure the checkbox Abort the backup if the exit code is not 0 is ticked.
When a backup runs, the script will execute first before sending backup data.
- If a VPN is detected (and the exclusion does not apply), the script will return exit code 1 and the backup will abort.
- If a VPN is not detected, the backup will proceed.