> For the complete documentation index, see [llms.txt](https://docs.monogoto.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.monogoto.io/advanced-console/platform/vpn-setup-examples/vpn-setup-with-ubiquiti.md).

# VPN Setup with Ubiquiti

1\.      Login to the Monogoto portal and go to ***Network.***

2\.      Edit your **“vpneu.mono”** network (EU zone) or **"vpnus.mono"** network (US zone).

![](/files/oJOzSlrwoLwMP6h8bftk)

3\.      Go to the **VPN** section and select ***Add New.***

![](/files/W4pQSOsrhbk4NI0Fmn69)

![](/files/aCV6WWEjjlQ1qnZ310KV)

* Enter a **VPN Name** of your choice.
* For **Destination IP Address**, enter the **external IP address** of your Ubiquiti gateway.
* For **Destination Network**, enter your LAN’s IPv4 CIDR block.
* For **Pool Name**, select your **Monogoto IP address pool**.

When you are done, click **Save & Close**, and **Apply Settings**.

4\.      Now we need to add a **route** to the VPN in the Monogoto portal.\
Go to the **Routes** select ***Add New***.

![](/files/65WL7SxvZfuzfKafA0Y5)

* For **Destination**, enter you **LAN CIDR block**.
* For **Gateway**, select the default Monogoto gateway.

Click **Save & Close**, and **Apply Settings.**

5\.      Go back to **Routes** and copy Gateway IP.

![](/files/jKgDfRzfinCup6QEcN3k)

6\.      Go back to the **VPN** section and press the **Download VPN Config** button. Copy the **“Pre-Shared Key”** from the downloaded config file.

![](/files/gDfX4X7TNXYgwqxPCRYH)

7\.      On the Ubiquiti web UI, click **“settings” -> “Networks” -> “Add new network”.**

![](/files/YBRAtqqMj8qnFFUIGYT4)

![](/files/ajuOHe6Mf4dThlPQkb7Y)

8\.      Name your new network, expand the **Virtual Private Network** dropdown, select **“Advanced”** and make sure **“Site-to-Site”** and **“Manual IPsec”** are selected.

9\.      Paste the **Pre-Shared Key** we copied from the **VPN Config** into the **Pre-shared Secret Key** field.

* For **Public IP Address**, select the gateway’s external IP address you used when creating the Monogoto VPN.
* For **Remote Gateway/Subnets**, enter the **Monogoto IP Address Pool** **CIDR block** and click “create”. For **Remote IP Address**, enter the **Monogoto Gateway IP** we copied earlier.

![](/files/YBGKmaHWa2WjiK9Oia6h)

10\.      Under **Advanced**, leave everything as-is, but make sure **both DH groups** are set to **2.**

11\.       Click **Add Network**.

12\.      Make sure no firewall rules are blocking VPN traffic.

That’s all – the VPN tunnel should now be connected.
