# Installing and Configuring OpenVPN (Ubuntu)

To access **vSphere/NSX-T**, you must install the OpenVPN client software on your local computer and establish a VPN connection.

This article explains how to install and configure the OpenVPN client software on a local computer running the **Ubuntu 18.04 or 20.04** distributions to establish a VPN connection to your Private Cloud.

## Installing OpenVPN

{% hint style="info" %}
**Prerequisites:**

* You have administrator rights.
* You have logged in on your local PC.
  {% endhint %}

{% hint style="warning" %}
**Important:**

To use OpenVPN, you must enable the following ports in your router and firewall:

Alternatively, OpenVPN can be used with port 1194 TCP. In this case, this port should also be opened.
{% endhint %}

| **Port** | **Protocol** |
| -------- | ------------ |
| 1194     | UDP          |
| 443      | TCP          |

1. Open the terminal.
2. To install OpenVPN, enter the following command:

```bash
root@localhost ~# apt-get update && apt-get install openvpn
```

3. You will then see the following message:

```
Is this ok [y/N]:
```

4. Type `y` and press the **Enter** key.

The OpenVPN client software is installed.

## Downloading the Configuration File

To configure the OpenVPN client software, you need a specific `*.ovpn` file. To download it, proceed as follows:

1. Log in to your [<mark style="color:blue;">IONOS CLOUD account</mark>](https://dcd.ionos.com).
2. In the [<mark style="color:blue;">**Data Center Designer (DCD)**</mark>](https://docs.ionos.com/cloud/support/general-information/glossary-of-terms#data-center-designer-dcd), go to **Menu** > **Private Cloud** > **Login**.
3. Log in to the [<mark style="color:blue;">Cloud Panel</mark>](https://cloudpanel.ionos.de/login) with your credentials.
4. Click on the **Server & Cloud** tile. If necessary, select the appropriate Server & Cloud contract.
5. The Cloud Panel opens.
6. To download the configuration file, click on **VPN** in the **Private Cloud** section.
7. The configuration file is downloaded.

## Configuring OpenVPN

{% hint style="info" %}
**Prerequisites:** You have installed the unzip program on your computer. You can install the unzip program by entering the following command:

```bash
root@localhost ~# apt-get install unzip
```

{% endhint %}

### Configuration Steps

1. Copy the OpenVPN configuration file (for example, `vpn1234B_1.ovpn`) to the installation directory. Example:

```bash
root@localhost ~# cp -i /home/vpn123456789.zip /etc/openvpn/
```

2. Change to the destination directory:

```bash
root@localhost ~# cd /etc/openvpn/
```

3. Verify that the file has been copied to the destination directory:

```bash
root@localhost:~# etc/openvpn/ ls
```

4. Extract the zip file. Example:

```bash
root@localhost ~# unzip vpn123456789.zip
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ionos.com/cloud/private-cloud/ionos-private-cloud/getting-started/install-and-configure-openvpn/installing-and-configuring-openvpn-ubuntu.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
