---
title: 'Tutorial: Connect to Access Server with Linux'
canonical: https://openvpn.net/as-docs/tutorials/tutorial--connect-with-linux/
product: Access Server Docs
description: Follow this guide to install the OpenVPN client on Linux to connect to Access Server with a connection profile.
---

# Tutorial: Connect to Access Server with Linux

## Overview

This tutorial is for Linux users who want to connect to Access Server. You can follow the steps below to connect with one of three options:

1. The OpenVPN 3 Linux client (recommended for modern Linux distributions).
2. The OpenVPN open-source CLI program.
3. The Gnome NetworkManager GUI.

### Discussed in this tutorial:

- The OpenVPN 3 Linux client is the **openvpn3** package.
- The OpenVPN open-source CLI program is the **openvpn** package.
- The Gnome NetworkManager program uses the **NetworkManager-openvpn** VPN plugin.

> **Tip**
>
> If you also work with Access Server on the Linux server, that package is **openvpn-as**. It's not used for connecting as a client, but it's helpful to know the difference.

## Option 1: Connecting with the OpenVPN 3 Linux client (using openvpn3-as to download a profile)

Follow the steps in these sections to install the OpenVPN 3 Linux client, download a connection profile from Access Server, and connect to your server.

The OpenVPN 3 Linux client is built on top of the OpenVPN 3 Core Library, which is also used in OpenVPN Connect and OpenVPN for Android. It's built around a completely different architecture regarding usage, focusing more on allowing ordinary, unprivileged users on a system to start and manage their own VPN sessions. You can find more details in the [OpenVPN Community documentation](https://community.openvpn.net/openvpn/wiki/OpenVPN3Linux).

### Prerequisites

- User credentials for [Access Server](https://openvpn.net/access-server/).

  > **Tip**
  >
  > Contact your Access Server administrator if you don't have credentials.
- A [supported Linux distribution](https://community.openvpn.net/openvpn/wiki/OpenVPN3Linux).
- Root access to your Linux machine command-line interface (CLI).

### Step 1: Install the openvpn3 package

1. Open the [OpenVPN 3 for Linux webpage](https://openvpn.net/community-docs/openvpn-client-for-linux.md) in a browser.

   > **Tip**
   >
   > This page also includes details about advanced features.
2. Click **Install OpenVPN 3 Linux**.
3. Follow the steps to run the commands under the **Stable repository** section appropriate for your Linux distribution.

You should now have the `openvpn3` package installed.

### Step 2: Download and import a connection profile using openvpn3-as

After installing, you need a connection profile. Access Server generates this file for your specific user account. It includes the required certificates and connection settings for a VPN session.

1. Connect to the console with root privileges.
2. Download and import a connection profile (.ovpn file) directly from Access Server:

   ```
   openvpn3-as --name <MY_CONFIG_NAME> https://myserver.example.net/
   ```

   Enter your desired file name.

   Enter the Access Server domain name or IP address.
3. When prompted, enter your username and password.
   - The `openvpn3-as` tool imports the file into the OpenVPN3 Linux configuration manager using the file name defined.

   > **Tip**
   >
   > The \<MY\_CONFIG\_NAME\> is an "alias name" associated with your connection profile (.ovpn file).

### Step 3: Start a VPN session

You can now connect to Access Server.

- Start a VPN session with the connection profile:

  ```
  openvpn3 session-start --config <MY_CONFIG_NAME>
  ```
- Manage a running VPN session:

  ```
  openvpn3 sessions-list
  ```

Refer to the [OpenVPN 3 Linux community documentation](https://community.openvpn.net/openvpn/wiki/OpenVPN3Linux) for more.

## Option 2: OpenVPN open-source CLI program

You can connect to Access Server with the open-source client program, **openvpn**. Most Linux distributions have this package available. The **openvpn** client program supports the option to connect to multiple OpenVPN servers simultaneously, and it includes a server component that can automatically and silently start any auto-login profile in the **/etc/openvpn** directory even before a user signs in. You can set this service component to launch at startup with tools available in your Linux distribution. On Ubuntu and Debian, when you install the **openvpn** package, it's automatically configured to start at boot time.

This outlines the necessary steps to connect to Access Server using the OpenVPN open-source client, **openvpn**.

1. Install the **openvpn** package.
2. Download a connection profile from the Client Web UI.
3. Import the connection profile.
4. Start a VPN session.

### Install the **openvpn** package

Use the appropriate Linux install command to install the **openvpn** package. For example, use this command for Ubuntu:

```cmd
apt-get install openvpn
```

### Download a connection profile from the Client Web UI

After installing, you need a connection profile. Access Server generates this file for your specific user account.

\[empty\]

1. Open a web browser.
2. Enter the URL for your Client Web UI.
3. Sign in with your user credentials.
4. Select the user-locked or auto-login profile from the download options.
5. Save the **client.ovpn** file to your Linux operating system.

### Import the connection profile

Start a connection with an auto-login `profile` manually:

```bash
openvpn --config client.ovpn
```

Start a connection with a user-locked profile manually:

```bash
openvpn --config client.ovpn --auth-user-pass
```

Start a connection with the **auth-retry** parameter for multi-factor authentication:

```bash
openvpn --config client.ovpn --auth-user-pass --auth-retry interact
```

To start an auto-login connection via the service daemon, place **client.ovpn** in **/etc/openvpn/** and rename the file. The name must end with **.conf** as the file extension. Ensure the service daemon is enabled to run after a reboot, then reboot the system.

The auto-login type profile picks up automatically and the connection starts itself. You can verify this by checking the output of the **ifconfig** command where you should see a **tun0** network adapter in the list.

> **Note**
>
> The **openvpn** client doesn't automatically implement DNS servers pushed by the VPN server. To accomplish this, you must install a DNS management program such as **resolvconf** or **openresolv**, but those many clash with existing network management software in your OS.
>
> The main reason the **openvpn** client doesn't do this is that in Windows, macOS, Android, or iOS, there's a single method of handling DNS management, making it easy to create a software client for those operating systems to handle DNS. But Linux has so many variations and supports different programs and methods for DNS, so the **openvpn** client doesn't include built-in DNS support.
>
> Fortunately, on Ubuntu and Debian, the **/etc/openvpn/update-resolv-conf** script comes with the **openvpn** package that handles DNS implementation on those operating systems. Follow these optional steps to activate it.

## Option 3: NetworkManager

If you'd like to connect via a GUI, you can use the [Gnome NetworkManager VPN](https://wiki.gnome.org/Projects/NetworkManager/VPN) plugin, **NetworkManager-openvpn**. We don't provide the detailed steps here. Refer to the [NetworkManager project documentation](https://networkmanager.dev/docs/).

> **Caution**
>
> This requires a tricky setup. If you're setting up your business VPN server to route traffic for some internal resources, while allowing internet traffic to be sent outside the VPN tunnel, this split-tunnel setup isn't supported by the NetworkManager VPN plugin out of the box. You must ensure that internet traffic isn't sent over the VPN by default.
>
> Also, older versions might not understand the .ovpn file format, requiring you to create separate files for the embedded certificates.
>
> However, the advantage of using the GUI component is that you can start/stop the connection from the desktop environment on Linux.

---

Prev: [Client Connection Setup](https://openvpn.net/as-docs/tutorials/client-connection-setup.md)
Next: [Tutorial: Connect to Access Server on macOS with OpenVPN Connect](https://openvpn.net/as-docs/tutorials/tutorial--connect-with-macos.md)
Index: https://openvpn.net/as-docs/llms.txt
