Yandex.Cloud
  • Services
  • Why Yandex.Cloud
  • Pricing
  • Documentation
  • Contact us
Get started
Yandex Virtual Private Cloud
  • Getting started
  • Step-by-step instructions
    • All instructions
    • Cloud network
      • Creating a cloud network
      • Deleting a cloud network
      • Updating a cloud network
    • Subnet
      • Creating a subnet
      • Deleting a subnet
      • Updating a subnet
    • IP address
      • Reserving a static public IP address
      • Making a dynamic public IP address static
      • Making a static public IP address dynamic
      • Deleting a static public IP address
    • Static routes
      • Creating a static route
      • Enabling NAT to the internet
    • Security groups
      • Create a security group
      • Update a security group and rules
      • Delete a security group
    • DDoS Protection
      • Enable protection from DDoS attacks
  • Use cases
    • Architecture and protection of a basic internet service
  • Concepts
    • Relationship between service resources
    • Cloud networks and subnets
    • Cloud resource addresses
    • Static routes
    • Security groups
    • MTU and MSS
    • DHCP settings
    • Quotas and limits
  • DDoS Protection
  • Cloud Interconnect
  • Access management
  • Pricing policy
    • Current policy
    • Archive
      • Policy before January 1, 2019
  • API reference
    • Authentication in the API
    • gRPC
      • Overview
      • AddressService
      • NetworkService
      • RouteTableService
      • SecurityGroupService
      • SubnetService
      • OperationService
    • REST
      • Overview
      • Address
        • Overview
        • create
        • delete
        • get
        • getByValue
        • list
        • listOperations
        • update
      • Network
        • Overview
        • create
        • delete
        • get
        • list
        • listOperations
        • listSubnets
        • move
        • update
      • RouteTable
        • Overview
        • create
        • delete
        • get
        • list
        • listOperations
        • move
        • update
      • SecurityGroup
        • Overview
      • Subnet
        • Overview
        • create
        • delete
        • get
        • list
        • listOperations
        • move
        • update
      • Operation
        • Overview
        • get
  • Questions and answers
  1. Step-by-step instructions
  2. Security groups
  3. Update a security group and rules

Update a security group and rules

  • Changing the name and description
  • Add a new rule
  • Delete a rule

The feature is at the Preview stage.

After creating a cloud network, you can change its name and description, and add or remove rules.

Changing the name and description

Management console
СLI
  1. Open the Virtual Private Cloud section in the folder to update the security group in.
  2. Open the Security groups tab.
  3. Click in the row of the group you want to update.
  4. In the menu that opens, click Edit.

To update the security group, run the command:

$ yc vpc security-group update <group ID> --new-name test-sg-renamed

Add a new rule

Management console
СLI
  1. Open the Virtual Private Cloud section in the folder to update the security group in.
  2. Open the Security groups tab.
  3. Select the group to update.
  4. Under Rules, create traffic management rules:
    1. Select the Outgoing traffic or Incoming traffic tab.
    2. Click Add rule.
    3. In the Port field of the window that opens, specify a single port or a range of ports that traffic will come to or from.
    4. In the Protocol field, specify the desired protocol or leave Any to allow traffic transmission over any protocol.
    5. In the Purpose field, select the purpose of the rule:
      1. CIDR: The rule will apply to the range of IP addresses. In the CIDR blocks field, specify the CIDR and masks of subnets that traffic will come to or from. To add multiple CIDRs, click Add CIDR.
      2. Security group: The rule will apply to the VMs from the current group or the selected security group.
  5. Click Save.

To add a new rule to an existing group, specify its ID or name in the command and describe the new rule:

$ yc vpc security-group update-rules --name=test-sg-cli --add-rule "direction=ingress,port=443,protocol=tcp,v4-cidrs=[10.0.0.0/24,10.10.0.0/24]"

Delete a rule

Management console
СLI
  1. Open the Virtual Private Cloud section in the folder to update the security group in.
  2. Open the Security groups tab.
  3. Select the group to update.
  4. Under Rules, click in the row of the rule you want to delete.
  5. In the menu that opens, click Delete.
  6. In the window that opens, click Delete.

To delete a rule from a group, specify its ID in the command:

$ yc vpc security-group update-rules --name=test-sg-cli --delete-rule-id <rule ID>
In this article:
  • Changing the name and description
  • Add a new rule
  • Delete a rule
Language
Careers
Privacy policy
Terms of use
© 2021 Yandex.Cloud LLC