Setup Security Group

In this section you will learn how to create a security group and create a firewall rule so that you can access your VM (Linux) over the Internet via ssh. A security group is a software firewall that allows you to create and restrict rules for incoming (Ingress) and outgoing (Egress) connections. All VMs that are members of this security group apply the rules of the security group.

Tip

We recommend that you create a security group with corresponding rules before deploying a VM so that you can easily select it in the “Launch Instance Wizard “.

Create Security Groups

Go to “Network > Security Groups “ and click on “+Create Security Group “. and enter the information.

../_images/setupsecgrp1.png
  • Now enter a “Name “ for the Security Group and if necessary a description in the “Description” field.
  • then click on “Create Security Group “.
../_images/setupsecgrp2.png

The Security Group will now be created and you will receive a message at the top right of the screen showing the created group in the list. * Now click on “Manage Rule “ of this Security Group.

../_images/setupsecgrp3.png

Create Security Groups Rule

By default, a Egress rule (any/any) is automatically created to allow outgoing connections. Now click on “+Add Rule “ to create the desired ssh rule.

../_images/setupsecgrp4.png

Enter the information or select the template SSH from the list Rule by clicking on “Custom TCP Rule “

../_images/setupsecgrp5.png
  • now click on “SSH “ and confirm the selection with the button “Add “.
../_images/setupsecgrp6.png

By selecting the template “SSH “, the input for the rule is reduced to the field Remote Network Address (CIDR), which defines from where access is allowed. It is also possible to specify another Security Group as Remote Network, which enables a comprehensive set of rules.

../_images/setupsecgrp7.png

Now the SSH Ingress Rule (tcp / PORT 22) is created and appears in the list, which is confirmed by a message at the top right of the screen.

../_images/setupsecgrp8.png

Assign Security Group

For a Security Group to be applied by a VM, it must also be assigned to the network port or interface.

  • Click in the navigation on “Compute > Instances “ and then in the tab Interfaces on “Edit Security Groups “
../_images/addsecgrp1.png
  • Then click on the plus sign in the left half of the screen to add this Security Group to the VM port.
../_images/addsecgrp2.png

Confirm by clicking on the “Update “ button.

../_images/addsecgrp3.png