> For the complete documentation index, see [llms.txt](https://docs.cloudeka.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cloudeka.ai/cloudeka-api-list/command-reference/cldkctl-vpn/create-ipsec.md).

# create-ipsec

The vpn create-ipsec-phase command allows you to create a new IPSec Phase 2 configuration for an existing VPN IPSec connection. This command defines the subnet network peer and additional parameters for the Phase 2 setup.

## Usage

```
cldkctl vpn create-ipsec-phase [flags]
```

## Steps

Follow the steps below to run and view the result of this command:

1. Run the following command in your terminal:

```
cldkctl vpn create-ipsec-phase
```

2. Enter your project name in the **Project Name** field. Refer to **project list** to verify or retrieve the correct project name.
3. Enter your VPN instance name in the **VPN Name** field. Refer to **vpn list** to obtain or confirm your VPN instance name.
4. Enter your VPN’s public IP address in the **IP Public** field. The IP address can also be obtained from **vpn list.**
5. Enter the remote network address in the **Remote Network** field. This field defines the peer network range that will connect through IPSec.
6. Enter the local subnet network in the **Subnet Network** field.
7. Enter the PreShared-Key in the **PreShared-Key** field. The PSK value can be obtained from the **vpn psk** section.
8. Enter a label or note in the Description IPSec field to describe the IPSec configuration.
9. Enter a label in the Description Phase 2 field. This value is optional and can be customized by the user to identify the IPSec Phase 2 description.
10. Confirm the process by pressing y for Confirm or n for Cancel.

<figure><img src="/files/85Jl2V76kn9veEhI9cGs" alt=""><figcaption></figcaption></figure>

11. Once successful, the terminal displays **"✓ IPSec on process create in 20 seconds".**

<figure><img src="/files/8zx4SHPOVd5MASl7cOuw" alt=""><figcaption></figcaption></figure>

## Flags

{% hint style="info" %}
This command supports [global flags](/cloudeka-api-list/global-flags.md). Refer to the Global Flags section for details
{% endhint %}

| Flag       | Description                    |
| ---------- | ------------------------------ |
| -h, --help | Help for create ipsec command. |
