Tutorial: An Intro to the sacli Command-line Utility
Learn about Access Server's command-line utility sacli. Use it to configure your VPN server and clients from the CLI.
Overview
Access Server provides you with an easy way to manage your VPN server and clients through the Admin Web UI, but you can also use the command-line interface (CLI) if you prefer. Access Server contains extensive command-line tools for working from the CLI. You can manage every aspect of the VPN server operation with these.
This tutorial introduces you to the most-used tool, sacli.
Tip
Access Server's command-line tools are in your server's scripts directory:
/usr/local/openvpn_as/scripts
What is sacli?
The OpenVPN tool, sacli is for the Access Server commercial product. You can use sacli to manage users and permissions, server configuration, and other tasks. It requires root access on the command-line interface (CLI).
The name is short for server agent command line interface, referring to the server agent, which is Access Server's main process handling data storage, VPN certificates, authentication, etc.
All of the configuration options in the Admin Web UI are available through sacli commands, and you can use it for advanced options that aren't included in the UI at this time.
Using the sacli tool requires that you're connected to your console. You execute commands with the tool and include options necessary for your desired output.
Important
The sacli tool is available for Access Server, OpenVPN's commercial VPN product. It is not available for OpenVPN Community Edition, the free, open-source OpenVPN software.
An installed Access Server.
The appropriate permissions to run the tool (discussed in the next section).
Familiarity working from the Linux CLI.
The sacli tool requires the appropriate permissions. In our documentation here, we provide commands based on a user on the console with root access:
Sign on to the Access Server console or start an SSH session.
Gain root privileges.
Run sacli from the scripts directory:
cd /usr/local/openvpn_as/scripts/
Sign on to the Access Server console and get root privileges.
Run this command to display options and documentation:
./sacli --help
The output details the available options for the sacli tools and documents those options.
Tip
Run sacli commands from the scripts directory: /usr/local/openvpn_as/scripts/.
Now that you're familiar with using the sacli tool, you can use it to manage Access Server from the CLI. You can run commands using options from the --help
output and commands we provide throughout our documentation.
Example sacli commands:
Generate a standard connection profile for a user:
./sacli --user <USER> GetUserlogin >client.ovpn
Show the number of users currently connected to the VPN:
./sacli VPNSummary
Show the status of the internal Access Server service:
./sacli status
The tutorials under See also below all use the sacli tool in their steps.