Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Blog
  • Pricing
  • Documentation
© 2025 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
  • Terraform reference
  • 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 April 22, 2025
  • 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, go to the folder where you need to reserve an address.
  2. In the list of services, select Virtual Private Cloud.
  3. In the left-hand panel, select IP addresses.
  4. Click Reserve 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 its Yandex Cloud provider.

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 documentation on the Terraform website or mirror website.

  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 information about the yandex_vpc_address resource parameters in Terraform, see the relevant provider documentation.

  2. Check the configuration using this command:

    terraform validate
    

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

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

    terraform plan
    

    The terminal will display a list of resources with their parameters. No changes will be made at this step. If the configuration contains any errors, Terraform will point them out.

  4. Apply the configuration changes:

    terraform apply
    
  5. Confirm the changes: type yes into the terminal and press Enter.

    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
© 2025 Direct Cursus Technology L.L.C.