Created on 11-10-2020 03:15 AM Edited on 07-25-2023 11:19 PM By Jean-Philippe_P
Description
This article describes the feature auto running script when connected to VPN.
This feature supports auto running a user-defined script after the configured VPN tunnel is connected or disconnected.
The script are batch scripts in Windows and shell scripts in macOS.
There are defined as part of a VPN tunnel configuration on EMS’s XML format FortiClient profile.
The profile is pushed down to FortiClient from EMS.
When FortiClient VPN tunnel is connected, script is executed.
Solution
In FortiClient EMS, access to Endpoint Profiles -> Remote Access Profile and Select <endpoint profile>.
On the top right corner, select 'XML tab'.
Then 'Edit' button.
Once finished editing the XML it is possible to save the changes with the 'Save' Button.
Select 'Edit' and search for the following <on_connect> tag.
The following is an example of configuring FortiClient to execute batch files when the VPN is connected:
<on_connect>
<script>
<os>windows</os>
<script>
<![CDATA[\\WIN-ADMIN\\netlogon\\logon.bat]]>
</script>
</script>
</on_connect>
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2024 Fortinet, Inc. All Rights Reserved.