Linux

Overview

This article will demonstrate how to secure your Ubuntu system with an Acreto Secured Connection. To create an additional layer of security, we’ll use the OpenVPN application.

Before proceeding to the installation, make sure that you’ve added at least one Thing to your Ecosystem - if not, check how to do it.

Solution 1: Script-based Installation

Acreto Wedge offers a ready-to-use script that will install and configure the Acreto client on your Ubuntu system:

  1. Log in to your account on Acreto Wedge.
  2. Select the Ecosystem where your device is configured.
  3. Click on the Objects item from the left side menu.
  4. Find your Ubuntu device on the list and click the i button to show the details panel.
  5. Within the details panel, you’ll see a Configuration Options section with a list of ready-to-use configurations. Find Acreto Connect Client for Ubuntu 18.04 LTS on this list and click the download icon.
  6. Run this downloaded script – acreto-connect.sh.
sudo ./acreto-connect.sh

Once the script finishes downloading your device should be connected to Acreto.

The script:

  1. Checks the type and version of the Operating System
  2. Installs OpenVPN and all other required dependencies
  3. Pulls the TLS-client configuration via API call using the device token
  4. Creates a service enabled at boot
  5. Starts the service and connects the client to the Acreto platform

In case the TLS client is already installed, the user is presented with a menu to update/remove it.

Solution 2: Manual Installation

Don’t want to manage the VPN setup automatically?

How to connect to OpenVPN manually using the terminal:

  1. Open the Terminal (keyboard shortcut: ctrl + alt + t).
  2. Install OpenVPN client by entering:
    sudo apt-get install openvpn
    (if asked for a password, enter the password used when creating your Linux account).
  3. Navigate to the OpenVPN configuration directory with this command:
    cd /etc/openvpn
  4. Download OpenVPN configuration files – in the terminal, type command:
    curl -k --silent --request POST -H 'Accept: text/plain' \
    https://api-is-rock-solid.acreto.net/v2/tlsvpn/config?_token=SECRET
    In case you get an ERROR, the certificate is not trusted. Please install the ca-certificates package with the command:
    sudo apt-get install ca-certificates
  5. Start OpenVPN with a chosen configuration by entering:
    sudo openvpn [file name]
    For example:
    sudo openvpn acreto.ovpn
  6. You have successfully connected to the VPN!
  7. To disconnect, open the terminal window it’s running in and press ctrl + c.