Commands and functions
P.
246 of 349
Openvpnuser
Closevpnuser
Definition
●
Function
openvpnuser
(
username
)
Arguments
●
username
is a c1400 Type ($$)
Effect
●
Opens a user's VPN access. The access becomes active only, if a
startvpn
() is already
executed .
●
After a reboot the VPN access itself remains enabled, but the VPN service has to be
started with
startvpn
() separately.
●
With the Info-Button in EibStudio can be read whether the VPN service is running and
which users are enabled.
Data type result (Return)
●
none
Definition
●
Function
closevpnuser
(
username
)
Arguments
●
username
is a c1400 Type ($$)
Effect
●
Closes a user's VPN access. The access becomes inactive independently whether the
VPN Service is running or not.
●
After a reboot the VPN is still open, but the VPN service has to be started with
startvpn
().
●
With the Info-Button in EibStudio can be read whether the VPN service is running and
which users are enabled.
Data type result (Return)
●
none
Remark
closevpnuser
does not effect an already open VPN user access. The access will denied, if the user
is logged out and will try to re-login or the VPN Service is completely stopped and started again.
Example:
The access of
User1
should be opened, once there is an ON Signal (1b01) sent at
groupaddress 1/1/1. If there is an OFF signal (0b1) the user shall be closed. A second user
shall be opened with address 1/1/2.
The VPN Service should be started 500ms after systemstart and closed with an ON, if 1/1/3 is
receiving a signal.
[EibPC]
if after(systemstart(),500u64) then startvpn() endif
if "OpenUser1-1/1/1"==ON then openvpnuser($User1$) else closevpnuser($User1$) endif
if "OpenUser2-1/1/2"==ON then openvpnuser($User2$) else closevpnuser($User2$) endif
if "StopVPN-1/1/3"==ON then stopvpn() endif
HandbuchEibPC_USA-30.odt, 2017-05-11
Enertex
®
Bayern GmbH - Erlachstraße 13 - 91301 Forchheim - [email protected]