Yandex Cloud
Documentation
PresentationContact UsTry it for free
© 2026 Direct Cursus Technology L.L.C.
Yandex Virtual Private Cloud
  • Getting started
    • All guides
    • Enabling a software-accelerated network
      • Enabling DDoS protection
      • Setting up the MTU when enabling DDoS protection
    • Chart of network connections
    • Viewing operations with resources
  • DDoS Protection
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Release notes
  • FAQ

In this article:

  • Enabling DDoS protection when creating a virtual machine
  • Enabling DDoS protection when reserving an IP address
  1. Step-by-step guides
  2. DDoS protection
  3. Enabling DDoS protection

Enabling DDoS protection

Written by
Yandex Cloud
Updated at November 24, 2026
View in Markdown
  • Enabling DDoS protection when creating a virtual machine
  • Enabling DDoS protection when reserving an IP address

You can activate DDoS protection when creating a VM and reserving public IP addresses.

Protected addresses are allocated from a separate pool; therefore, you cannot enable and disable protection for a previously reserved address.

Enabling DDoS protection when creating a virtual machineEnabling DDoS protection when creating a virtual machine

Management console

When configuring a network on a new virtual machine, select the automatically assigned public IP address or an address from the list of the reserved ones.

Once you select an address, select DDoS protection.

Enabling DDoS protection when reserving an IP addressEnabling DDoS protection when reserving an IP address

Management console
Terraform

To reserve a protected static IP address:

  1. In the management console, select the folder where you need to reserve an address.
  2. Navigate to Virtual Private Cloud.
  3. In the left-hand panel, select Public IP addresses.
  4. Click Reserve public IP address.
  5. Select the availability zone where you want to reserve the address.
  6. Select DDoS protection.
  7. Click ** Reserve**.

If you do not have Terraform yet, install it and configure the Yandex Cloud provider.

To manage infrastructure using Terraform under a service account or user accounts (a Yandex account, a federated account, or a local user), authenticate using the appropriate method.

With Terraform, you can quickly create a cloud infrastructure in Yandex Cloud and manage it using configuration files. These files store the infrastructure description written in HashiCorp Configuration Language (HCL). If you change the configuration files, Terraform automatically detects which part of your configuration is already deployed, and what should be added or removed.

Terraform is distributed under the Business Source License. The Yandex Cloud provider for Terraform is distributed under the MPL-2.0 license.

For more information about the provider resources, see the guides on the Terraform website or its mirror.

  1. Open the Terraform configuration file and edit the section with the static public IP description by adding the ddos_protection_provider field:

    resource "yandex_vpc_address" "addr" {
      name = "exampleAddress"
      external_ipv4_address {
        zone_id                  = "ru-central1-a"
        ddos_protection_provider = "qrator"
      }
    }
    

    Where the ddos_protection_provider parameter enables DDoS protection. The possible value is qrator.

    For more on the properties of the yandex_vpc_address resource in Terraform, see this provider guide.

  2. Apply the changes:

    1. In the terminal, navigate to the configuration file directory.

    2. Make sure the configuration is correct using this command:

      terraform validate
      

      If the configuration is valid, you will get this message:

      Success! The configuration is valid.
      
    3. Run this command:

      terraform plan
      

      The terminal will display a list of intended changes: resources and/or output variables. No changes will be made at this step. Terraform will show any errors detected in the configuration.

    4. Apply the configuration changes:

      terraform apply
      
    5. Type yes and press Enter to confirm the changes.

You can check whether DDoS protection is active in the management console or using this CLI command:

yc vpc address list

Was the article helpful?

Previous
Enabling a software-accelerated network
Next
Setting up the MTU when enabling DDoS protection
© 2026 Direct Cursus Technology L.L.C.