5.2. Managing Security Group Rules¶
You can modify security groups by adding and removing rules. Editing rules is not available. If you need to change the existing rule, remove it and recreate with the required parameters.
Prerequisites:
You have a security group created, as described in Creating and Deleting Security Groups.
5.2.1. Adding Rule to Security Group¶
On the Security groups screen, click the security group to add a rule to.
On the group right pane, click Add in the Inbound or Outbound section to create a rule for incoming or outgoing traffic.
Specify the rule parameters:
Select a protocol from the list or enter a number from 0 to 255.
Enter a single port or a port range. Some protocols already have a predefined port range. For example, the port for SSH is 22.
Select a predefined subnet CIDR or an existing security group.
Click the check mark to save the changes.
As soon as the rule is created, it is applied to all of the virtual machines assigned to the security group.
5.2.2. Removing Rule from Security Group¶
On the Security groups screen, click the required security group.
On the group right pane, click the bin icon next to a rule you want to remove.
As soon as the rule is removed, this change is applied to all of the virtual machines assigned to the security group.