Software & AppsOperating SystemLinux

Connecting to Forticlient SSL-VPN via Terminal in Ubuntu 18.10

Ubuntu 9

In this article, we will be discussing how to connect to a Forticlient SSL-VPN via Terminal in Ubuntu 18.10. We will cover two methods: using openfortivpn and using the Fortigate SSLVPN CLI.

Quick Answer

To connect to a Forticlient SSL-VPN via Terminal in Ubuntu 18.10, you can use the openfortivpn client or the Fortigate SSLVPN CLI. Both methods require installation and configuration of the respective clients, but they provide a secure and efficient way to establish a VPN connection.


Before we start, ensure that you have the necessary credentials to connect to the VPN server. You will need the server address, port number, and your username and password.

Method 1: Using openfortivpn

openfortivpn is a client for PPP+SSL VPN tunnel services. It runs in userspace, unlike other similar clients that require more privileges.

Step 1: Install openfortivpn

To install openfortivpn, open Terminal and run the following command:

sudo apt install openfortivpn

This command uses sudo to run the command with root privileges, apt is the package handler for Ubuntu, and install tells it to install the package named openfortivpn.

Step 2: Edit the Configuration File

Next, we need to edit the default configuration file. Run the following command:

sudo nano /etc/openfortivpn/config

This command opens the configuration file in the nano text editor.

In the configuration file, set up your connection details as follows:

host = your.vpn.server
port = your_port_number
username = your_username
password = your_password

Replace your.vpn.server, your_port_number, your_username, and your_password with your actual VPN server details.

Step 3: Establish the VPN Connection

To establish the VPN connection, run:

sudo openfortivpn

If the connection is not trusted, you will see an error message. Follow the instructions in the error message to add the server as trusted and re-run the command.

Method 2: Using Fortigate SSLVPN CLI

The Fortigate SSLVPN CLI is another option for connecting to a Forticlient SSL-VPN.

Step 1: Download the Fortigate SSLVPN CLI

To download the Fortigate SSLVPN CLI, run the following command:


This command uses wget to download the file from the provided URL.

Step 2: Extract the Downloaded File

Next, extract the downloaded file using the following command:

tar -xzvf forticlientsslvpn_linux_4.4.2328.tar.gz

This command uses tar to extract the file. The -x option tells tar to extract, -z to uncompress, -v for verbose mode, and -f to specify the file.

Step 3: Install ppp

The ppp package is required for the Fortigate SSLVPN CLI. If it’s not already installed, you can install it with:

sudo apt-get install ppp

Step 4: Run the Setup File

Navigate to the installer setup directory and run the setup file with the following commands:

cd ./forticlientsslvpn/64bit/helper
sudo ./

The cd command changes the current directory, and sudo ./ runs the setup file with root privileges.

Step 5: Connect to the VPN Server

Finally, go to the Fortigate SSLVPN CLI directory and connect to the VPN server using the following commands:

cd forticlientsslvpn/64bit/
./forticlientsslvpn_cli --server serveraddress:port --vpnuser username

Replace serveraddress:port and username with your actual VPN server details.

Please note that downloading software from external sources may carry additional risks. Always ensure that the software is from a trusted source.


We have covered two methods for connecting to a Forticlient SSL-VPN via Terminal in Ubuntu 18.10. Both methods require some familiarity with the Terminal, but they offer a quick and efficient way to establish a VPN connection. Always remember to protect your credentials and only download software from trusted sources.

Can I use these methods to connect to a Forticlient SSL-VPN on other operating systems?

These methods are specifically for Ubuntu 18.10. However, openfortivpn is available for various operating systems, and the Fortigate SSLVPN CLI may have versions for other Linux distributions as well.

Can I connect to multiple VPN servers using these methods?

Yes, you can configure and connect to multiple VPN servers using both openfortivpn and the Fortigate SSLVPN CLI. Simply edit the configuration files and specify the details for each server.

Can I automate the VPN connection process?

Yes, you can automate the VPN connection process using scripts. You can create a script that runs the necessary commands to establish the VPN connection and then execute the script whenever you want to connect.

How can I disconnect from the VPN?

To disconnect from the VPN using openfortivpn, simply press Ctrl+C in the Terminal window where you started the openfortivpn command. For the Fortigate SSLVPN CLI, you can press Ctrl+C or use the exit command.

Can I save my VPN credentials in the configuration file?

It is not recommended to save your VPN credentials in the configuration file for security reasons. However, you can create a separate file to store your credentials and use it in your scripts or command line arguments to avoid entering them every time.

How can I troubleshoot connection issues?

If you encounter connection issues, you can check the error messages displayed in the Terminal for possible solutions. Additionally, you can refer to the documentation or community forums for openfortivpn or the Fortigate SSLVPN CLI for troubleshooting guides and common issues.

Can I use these methods to connect to other VPN protocols?

No, these methods are specifically for connecting to Forticlient SSL-VPN. If you need to connect to other VPN protocols, you may need to use different clients or methods specific to those protocols.

Are there any alternatives to `openfortivpn` and the Fortigate SSLVPN CLI?

Yes, there are other VPN clients available for Ubuntu and other operating systems. Some popular alternatives include OpenVPN, Cisco AnyConnect, and Pulse Secure. You can explore these options based on your specific VPN requirements.

Leave a Comment

Your email address will not be published. Required fields are marked *