Skip to main content

Tutorial: Create OpenVPN Connect Bundled Installers

Abstract

You can manually create installers for a bundled OpenVPN Connect app that includes a user's connection

Overview

It is possible to create OpenVPN Connect v3 setup files for macOS and Windows from Access Server's CLI that come preconfigured with a connection profile. You can deploy such an installer on a computer, and after installation completes, it will have the necessary connection profile already loaded. Access Server already creates such preconfigured installers of OpenVPN Connect for your users. These are available for users to download from the Client Web UI.

Access Server creates these preconfigured with connection profiles — server-locked, user-locked, or auto-login. If you don’t use the Client Web UI to allow users to download and install OpenVPN Connect independently, you can create and distribute these setup files to your users.

Select the option based on your Access Server version.

  • An installed Access Server.

  • Configured users.

  • Console access with root privileges.

  1. Sign in to the console with root privileges.

  2. Switch to the scripts directory:

    cd /user/local/openvpn_as/scripts/
  3. Run the command to create the desired OpenVPN Connect installer:

    • Create Windows OpenVPN Connect v3 .msi setup file with server-locked profile:

      ./sacli --dest_dir=<DESTINATION DIRECTORY> --itype=win_v3 --profile_type=server-locked GenerateInstaller
    • Create macOS OpenVPN Connect v3 .dmg setup file with server-locked profile:

      ./sacli --dest_dir=<DESTINATION DIRECTORY> --itype=mac_v3 --profile_type=server-locked GenerateInstaller
    • Create Windows OpenVPN Connect v3 .msi setup file with user-locked profile:

      ./sacli --dest_dir=<DESTINATION DIRECTORY> --itype=win_v3 --user=<USERNAME> --profile_type=user-locked GenerateInstaller
    • Create macOS OpenVPN Connect v3 .dmg setup file with user-locked profile:

      ./sacli --dest_dir=<DESTINATION DIRECTORY> --itype=mac_v3 --user=<USERNAME> --profile_type=user-locked GenerateInstaller
    • Create Windows OpenVPN Connect v3 .msi setup file with auto-login profile:

      ./sacli --dest_dir=<DESTINATION DIRECTORY> --itype=win_v3 --user=<USERNAME> --profile_type=autologin GenerateInstaller
    • Create macOS OpenVPN Connect v3 .dmg setup file with auto-login profile:

      ./sacli --dest_dir=<DESTINATION DIRECTORY> --itype=mac_v3 --user=<USERNAME> --profile_type=autologin GenerateInstaller

You can use the following options with the command GenerateInstaller:

  • --dest_dir — Provide the directory for saving the generated installer.

  • --exp — Set the number of days before the client certificate bundled to the installer expires.

  • --itype — Choose the type of installer: win_v3, msi_v3, mac_v3, dmg_v3.

    • mac_v3 or dmg_v3 — generates an OpenVPN Connect v3 client .dmg setup file.

    • win_v3 or msi_v3 — generates an OpenVPN Connect v3 client .msi setup file.

  • --user — Enter the profile username.

    Tip

    We recommend enclosing usernames in double quotes ("), particularly when they contain spaces.

  • --profile_type — Set the profile type: user-locked, server-locked, or autologin. (The default is user-locked).

    Important

    Autologin profiles require that the user has autologin permission, whether granted directly or inherited. By default, autologin permission is denied.

  1. Sign in to the console with root privileges.

  2. Switch to the scripts directory:

    cd /usr/local/openvpn_as/scripts/
  3. Run the command to create the desired OpenVPN Connect installer:

    • Create Windows OpenVPN Connect v3 .msi setup file with server-locked profile:

      ./sacli --itype win_v3 -o ./ GetGenericInstaller
    • Create macOS OpenVPN Connect v3 .dmg setup file with server-locked profile:

      ./sacli --itype mac_v3 -o ./ GetGenericInstaller
    • Create Windows OpenVPN Connect v3 .msi setup file with user-locked profile:

      ./sacli -o ./ --user <USER_NAME> --itype win_v3 GetInstallerEx
    • Create macOS OpenVPN Connect v3 .dmg setup file with user-locked profile:

      ./sacli -o ./ --user <USER_NAME> --itype mac_v3 GetInstallerEx
    • Create Windows OpenVPN Connect v3 .msi setup file with auto-login profile:

      ./sacli -o ./ --user <USER_NAME> --itype win_v3 --autologin GetInstallerEx
    • Create macOS OpenVPN Connect v3 .dmg setup file with auto-login profile:

      ./sacli -o ./ --user <USER_NAME> --itype mac_v3 --autologin GetInstallerEx

    Tip

    For GetGenericInstaller and GetInstallerEx, the output directory can be specified with the -o parameter (./ is the current directory).