> For the complete documentation index, see [llms.txt](https://docs.ionos.com/cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ionos.com/cloud/~/revisions/AMiYziCllTKB2y2lmONY/network-services/vpn-gateway/dcd-how-tos/create-vpn-gateway.md).

# Create VPN Gateway

A VPN Gateway provides a secure way to access your data center, protecting your network and sensitive information.

To create a VPN Gateway, follow these steps:

1\. In the **DCD**, go to **Menu** > **Network** > **VPN Gateway** under **Connectivity**.

2\. Click **Create New VPN Gateway** from the **VPN Gateways** page.

3\. Configure the following details for a VPN Gateway:

* Enter a **Name** and a **Description**.
* Select **Location**.
* Select the **IP Address** created in the chosen location.

{% hint style="info" %}
**Note:** Ensure you reserve IP Addresses in advance, and make sure the IP Addresses and Data Centers are in the same location.
{% endhint %}

## Define VPN Gateway Protocol

{% hint style="info" %}
**Prerequisite:** You can create VPN Gateways using either the IPSec or WireGuard protocol. Each protocol offers different features and requires distinct configuration steps.
{% endhint %}

Select Protocol you want to use:

Select Protocol you want to use, you can choose **WIREGUARD** or **IPSEC**.

{% tabs %}
{% tab title="WireGuard protocol" %}
In **WIREGUARD**, you should input the following properties:

* **Private Key:** Private Key.
* **Interface IPv4 IP:** Mandatory if IPv6 is not provided.
* **Interface IPv6 IP:** Mandatory if IPv4 is not provided.
* **Listen Port:** Specifies the UDP port on which a WireGuard interface will listen for incoming encrypted VPN packets.
  {% endtab %}

{% tab title="IPSec protocol" %}
In **IPSEC**, you have the following options:

* **Version:** Option to select IPSec version.
  {% endtab %}
  {% endtabs %}

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

* IPSec requires Tunnels before they can be used.
* WireGuard requires Peers.
  {% endhint %}

To create Tunnel or Peer, you can choose **IPSec Tunnel** or **WireGuard Peer**.

{% tabs %}
{% tab title="Tunnels" %}
In **Create IPSec Tunnel**, you should enter the following properties:

* **Tunnel name**
* **Description**
* **Remote host:** Public IPv4 address or FQDN.

### Authentication

**Pre-shared key (PSK)**

### Initial Exchange (IKE\_SA\_INIT) Settings

Choose the desired option from the available list.

* **Diffie-Hellman Group**
* **Encryption Alghoritm**
* **Integrity Alghoritm**
* **Lifetime:** Min 3600 sec. / max. 604800 sec.

### Child SA/IPSec SA Settings (ESP)

Choose the desired option from the available list.

* **Diffie-Hellman Group**
* **Encryption Alghoritm**
* **Integrity Alghoritm**
* **Lifetime:** Min 600 sec. / max. 86400 sec.

### Network CIDRs

Enter the following properties:

* **Cloud Network CIDRs:** Up to 20 IPv4 or IPv6 addresses, Comma Separation.
* **Peer Network CIDRs:** Up to 20 IPv4 or IPv6 addresses, Comma Separation.
  {% endtab %}

{% tab title="Peers" %}
In **PEER**, you have the following options:

* **Peer name**
* **Description**

### Peer Configuration

* **Endpoint host:** Public IPv4 address or FQDN.
* **Endpoint port:** Specifies the UDP port on which a WireGuard interface will listen for incoming encrypted VPN packets.
* **Allowed IPs:** Up to 20 IPv4 or IPv6 addresses, Comma Separation.
* **Public Key**
  {% endtab %}
  {% endtabs %}

## Define Lan Connections

{% hint style="info" %}
**Note:** These are the LANs you want to access. You can add new ones, delete, or edit existing ones.
{% endhint %}

1\. Select **Datacenter** for the selected location.

2\. Click **+ Add LAN Connections** to add LAN Connections you want to access.

{% hint style="info" %}
**Result:** You have successfully created the VPN gateway.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.ionos.com/cloud/~/revisions/AMiYziCllTKB2y2lmONY/network-services/vpn-gateway/dcd-how-tos/create-vpn-gateway.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
