# 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. |


---

# 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.cloudeka.ai/cloudeka-api-list/command-reference/cldkctl-vpn/create-ipsec.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.
