Online Help > Entry Types > Common Settings > VPN

Post/Pre VPN Commands

Description

 

Post/Pre VPN Commands allows you to specify commands to be run after the VPN connection has been established and/or before the VPN connection is closed. You can specify custom commands or use the simple UI to define route command.

 

Settings

 

Enable

Enable the Post/Pre VPN Commands by selecting After execute wait - For IP on adapter. This specifies that RDM will wait until the given adapter has acquired a valid IP address.

 

VPN Advanced tab

VPN Advanced tab

 

RDM will wait for the adapter named <adapter name or blank>. In most cases leave this field blank. Blank specifies that RDM will use the VPN name as the adapter name, this will work with most VPNs (Microsoft for example) where the VPN is the adapter. In case of a SonicWALL VPN where the adapter is only created once the VPN has been enabled/connected. In this case enter (part of) the adapter name, you can use the command line "route print" to quickly find the adapter name. Example: SonicWall Virtual

 

Route Print Output - Interface List

Route Print Output - Interface List

 

The "max -1 sec" specifies the time out in seconds that RDM has to wait for the adapter. -1 is wait forever, if ever you have specified the wrong adapter name, the -1 option may hang the system.

 

Define Custom Command

With custom commands you can execute any command after the VPN connect or/and before VPN disconnect, the possibilities are endless. Below is an example of a message specifying that the gateway is up and specifies the IP address. Simple but effective.

 

Custom Command

Custom Command

 

Define Route Command

Define a route to be added/remove along with this VPN connection. The option to use or not the VPN's IP as the gateway allows you to direct a route away from the gateway to any IP. If you don't specify the Use VPN IP; check the box and then manually specify the gateway.

 

Route Command

Route Command

 

Command Management

You can add, edit or delete your commands and specify the order of the command execution.

 

Command Management

Command Management

 

The order of commands are reversed for the Before disconnect step. Example:

connect

execute command A before action

execute command B before action

use vpn

execute command B after action

execute command A after action

disconnect