Changes with LCOS 7.6:
- "Failure" as a condition for a change in status of the WAN connection
- "Establish failure" as a condition for a change in status of the WAN connection
- GnuDIP protocol support
With the action table you can define actions that are executed when the status of a WAN connection changes.
LANconfig: Communication / General / Action table
WEBconfig: Setup / WAN / Action table
- Index The index gives the position of the entry in the table, and thus it must be unique. Entries in the action table are executed consecutively as soon as there is a corresponding change in status of the WAN connection. The entry in the field "Check for" can be used to skip lines depending on the result of the action. The index sets the position of the entries in the table (in ascending order) and thus significantly influences the behavior of actions when the option "Check for" is used. The index can also be used to actuate an entry in the action table via a cron job, for example to activate or deactivate an entry at certain times.
- Active Activates or deactivates this entry.
- Host name Action name. This name can be referenced in the fields "Action" and "Check for" with the place holder %h (host name).
- Remote site A change in status of this remote site triggers the action defined in this entry.
- Lock time (max. 10 characters) Prevents this action from being repeated within the period defined here in seconds.
- Condition
The action is triggered when the change in WAN-connection status set
here occurs.
Possible values:
- Establish – The action is triggered when the connection has been established successfully.
- Disconnect – The action is triggered when the device itself terminates the connection (e.g. by manual disconnection or when the hold time expires).
- End – The action is triggered on disconnection (whatever the reason for this).
- Failure – This action is triggered on disconnects that were not initiated or expected by the device.
- Establish failure – This action is triggered when a connection establishment was started but not successfully concluded.
- Action (max. 250 characters)
Here you describe the action that should be executed when there is a
change in the status of the WAN connection. Only one action can be triggered
per entry.
Possible values for the actions (max. 250 characters):
- exec: – This prefix initiates any command as it would be entered at the Telnet console. For example, the action “exec:do /o/m/d” terminates all current connections.
- dnscheck: – This prefix initiates a DSN name resolution. For example, the action “dnscheck:myserver.dyndns.org” requests the IP address of the indicated server.
- http: – This prefix initiates an HTTP-get request. For example, you can use the following action to execute a DynDNS update at dyndns.org: http://username:password@members.dyndns.org/nic/update?system=dyndns&hostname=%h&myip=%a The meaning of the place holders %h and %a is described below.
- https: – Like “http:”, except that the connection is encrypted.
- gnudip: – This prefix initiates a request to the corresponding DynDNS server via the GnuDIP protocol. For example, you can use the following action to use the the GnuDIP protocol to execute a DynDNS update at a DynDNS provider: gnudip://gnudipsrv?method=tcp&user=myserver&domn=mydomain.org &pass=password&reqc=0&addr=%a The line-break is for legibility only and is not to be entered into the action. The meaning of the place holder %a is described below.
- repeat: – This prefix together with a time in seconds repeats all actions with the condition "Establish" as soon as the connection has been established. For example, the action "repeat:300" causes all of the establish actions to be repeated every 5 minutes.
- mailto: – This prefix causes an e-mail to be sent. For example, you can use the following action to send an e-mail to the system administrator when a connection is terminated: mailto:admin@mycompany.de?subject=VPN connection broken at %t?body=VPN connection to Branch Office 1 was terminated.
- %a – WAN IP address of the WAN connection relating to the action.
- %H – Host name of the WAN connection relating to the action.
- %h – Like %H, except the hostname is in small letters
- %c – Connection name of the WAN connection relating to the action.
- %n – Device name
- %s – Device serial number
- %m – Device MAC address (as in Sysinfo)
- %t – Time and date in the format YYYY-MM-DD hh:mm:ss
- %e – Description of the error that was reported when connection establishment failed.
- Blank
- Check for
The result of the action can be evaluated here to determine the number
of lines to be skipped in the processing of the action table.
Possible values for the actions (max. 50 characters):
- contains= – This prefix checks if the result of the action contains the defined string.
- isequal= – This prefix checks if the result of the action is exactly equal to the defined string.
- ?skipiftrue= – This suffix skips the defined number of lines in the list of actions if the result of the "contains" or "isequal" query is TRUE.
- ?skipiffalse= – This suffix skips the defined number of lines in the list of actions if the result of the "contains" or "isequal" query is FALSE.
- As with the definition of the action.
- A DNS check queries the IP address of an address in the form "myserver.dyndns.org". The check “contains=%a?skipiftrue=2” allows the two following entries in the action table to be skipped if the IP address found by the DNS check agrees with the current IP address (%a) of the device.
- Owner Owner of the action. The exec actions are executed with the rights of the owner. If the owner does not have the necessary rights (e.g. administrators with write access) then the action will not be carried out.