Retrieving A List Of Vpn Connection Names; Opening The Vpn Tunnel; Responding To Xauth Requests - Fortinet Version 4.0 MR1 Administration Manual

Forticlient endpoint security
Hide thumbs Also See for Version 4.0 MR1:
Table of Contents

Advertisement

Controlling a VPN

Retrieving a list of VPN connection names

Opening the VPN tunnel

Responding to XAuth requests

52
This creates VPN1 as the FortiClient object.
Depending on your development environment, you might also need a type library file. You
can find the file FCCOMIntDLL.tlb in the FortiClient .zip installation package.
If needed, you can obtain a list of the VPN connections configured in the FortiClient
application. The GetTunnelList function returns an array of the names.
tunnelList = VPN1.GetTunnelList
Typically, an application might put the tunnel names into a list from which the user
chooses the required tunnel name. In this example, the list control List1 is populated with
the tunnel names:
List1.Clear
For i = LBound(tunnelList) To UBound(tunnelList)
List1.AddItem (tunnelList(i))
Next
Use the Connect method to establish the tunnel. The only parameter is the tunnel name,
as configured in the FortiClient application. In this example, the tunnel name is "Office":
VPN1.Connect "Office"
If the VPN peer requires you to supply XAuth credentials, you can easily provide for this
by writing code that responds to the On XAuthRequest event. In this example, a small
window opens in which the user enters the user name and password.
Private Sub VPN1_OnXAuthRequest(ByVal bstrTunnelName As String)
Dialog.Show 1
outUserName = ""
outPassword = ""
outSavePassword = False
If Not Dialog.Cancelled Then
outUserName = Dialog.UserName
outPassword = Dialog.Password
outSavePassword = Dialog.SavePassword
End If
VPN1.SendXAuthResponse bstrTunnelName, outUserName,
outPassword, outSavePassword
End Sub
FortiClient Endpoint Security Version 4.0 MR1 Administration Guide
Using the FortiClient API
04-40001-99556-20090626
http://docs.fortinet.com/
Feedback

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Forticlient endpoint security 4.0 mr1

Table of Contents