Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
AAguilo
New Contributor II

Run a Powershell script on Forticlient vpn connection

Hi,

In my company we are using IP ranges that may conflict to the ones the client user is using while teleworking from home (192.168...)

 

The users are connecting to VPN using Forticlient. I would like to identify the connection/disconnection event so when the user connects to the vpn it runs a script to update his local routing tables to avoid conflicts, and when it disconnects, it restore them back. 

 

Is there a way to automate this script running from Fortigate/Forticlient itself? If not, Is there any event log or some way to trigger the scripts.

 

Thanks,

Albert

-- Do it or not, there is no try....in production environments. --
-- Do it or not, there is no try....in production environments. --
1 Solution
Debbie_FTNT

Hey AAguilo,

that option only exists with EMS server, not on FortiGate itself.

Debbie_FTNT_0-1650614503523.png

+++ Divide by Cucumber Error. Please Reinstall Universe and Reboot +++

View solution in original post

4 REPLIES 4
Forticlient_Guru
New Contributor

Hi 

I believe you can do by editing  in VPN profile >> with on connect script (you can use batch script to call your powershell etc) 

Forticlient_Guru_0-1650379997430.png

 




AAguilo

Hi,

Thanks for your reply. Where can I find this VPN profile menu? I have Fortigate 40F v6.4.8. I've checked everywhere and i can't seem to find it.

-- Do it or not, there is no try....in production environments. --
-- Do it or not, there is no try....in production environments. --
Debbie_FTNT

Hey AAguilo,

that option only exists with EMS server, not on FortiGate itself.

Debbie_FTNT_0-1650614503523.png

+++ Divide by Cucumber Error. Please Reinstall Universe and Reboot +++
AAguilo
New Contributor II

I see. Unfortunately, we don't have that service so i'm afraid we would have to find another solution. Thank you for your support!

-- Do it or not, there is no try....in production environments. --
-- Do it or not, there is no try....in production environments. --
Labels
Top Kudoed Authors