---
title: Disabling VPN-only access
slug: hosty/disabling-vpn-only-access
createdAt: 2026-11-08T11:27:49.007Z
---

This page shows how to open the Kubernetes API of a cluster to the internet again. It's the reverse of [Enabling VPN-only access](https://wiki.systemseed.com/hosty/enabling-vpn-only-access).

You usually need it only before [deleting a cluster](https://wiki.systemseed.com/hosty/deleting-a-cluster): the VPN is deleted together with the cluster, and OpenTofu would lose the connection to the cluster halfway. Open the API only for as long as you need it.

## With OpenTofu

In `terraform/main.tf`, find the block of the cluster, `module "cluster_<cluster>"`, and change the access settings to:

```hcl
module "cluster_<cluster>" {
  # ...
  #cluster_endpoint_public_access      = false
  cluster_endpoint_public_access       = true
  cluster_endpoint_public_access_cidrs = ["0.0.0.0/0"]
  # ...
}
```

Instead of `0.0.0.0/0`, you can list only the IP ranges you trust.

Stay connected to the VPN, and apply:

```bash
cd /src/terraform
tofu apply
```

EKS takes a few minutes to apply the change. After that, you can work with the cluster without the VPN.

## In the AWS Console

If the VPN doesn't work, `tofu apply` can't reach the cluster either. Open the API in the AWS Console instead:

1. Open **EKS** > **Clusters** > your cluster, in the region of the cluster.
2. On the **Networking** tab, click **Manage endpoint access**.
3. Choose **Public and private**, and save.

The next `tofu apply` closes the API again, unless you also change `main.tf` as shown above.
