VanDyke Software Forums

VanDyke Software Forums (https://forums.vandyke.com/index.php)
-   Scripting (https://forums.vandyke.com/forumdisplay.php?f=14)
-   -   Script for centrally managed sessions (https://forums.vandyke.com/showthread.php?t=13019)

ogun 02-14-2018 05:36 AM

Script for centrally managed sessions
 
3 Attachment(s)
Hello all.

Just figured I would share the script we're using to share a common set of sessions.

There are three parts, a client installation script that configures a securecrt client after installation, a client script that runs on each startup and a server script that exports the sessions to be used.

The server script fetches data in our case from the IPAM and generates a json file with the the shared sessions to use. This file is places on a windows file server and on a webserver for windows and linux clients respectively. I will not share the server script but I will share an example data file, the format is trivial in any case.

The client installer script will fetch and install the shared session script, set up a bastion session with dynamic port forwarding, configure a firewall for that port and then finally modify the default session to use that firewall. It also sets up the bastion connection as an autoconnection and the session script as a login script to update the sessions.

Finally the shared session script fetches the json file created by the server script and parses it into sessions. It does delta diffs and will only create/remove sessions as needed. Before deleting any session it will show how many would be deleted. It creates sessions by copying the default session.

The code is somewhat commented but should be fairly straight forward to read in any case.


All times are GMT -6. The time now is 11:57 AM.