Help Center> Intelligent EdgeCloud> User Guide> Edge Networks> Security Groups> Security Group Configuration Examples

Security Group Configuration Examples

This section shows common security group configuration examples. The following examples allow all outgoing data packets by default and only describe how to configure the inbound rules of a security group.

You need to create a security group in advance. For details, see Creating a Security Group and Configuring Security Group Rules.

For details, see Common Ports Used by Edge Instances.

Allowing External Access to a Specified Port

  • Example scenario

    After you deploy services, you can add security group rules to allow external access to a specified port (for example, port 1100).

  • Security group configuration

    Direction

    Priority

    Action

    Protocol

    Port/Range

    Source

    Inbound

    1

    Allow

    TCP

    1100

    0.0.0.0/0

Enabling Edge Instances In Different Security Groups to Communicate Through an Internal Network

  • Example scenario

    In the same VPC at the same edge site, if you need to copy resources from an edge instance in a security group to an edge instance in another security group, you can configure the two edge instances so that they can communicate with each other through a private network and then copy the resources.

  • Security group configuration

    By default, edge instances in the same security group of the same VPC at the same edge site can communicate with each other, whereas edge instances in different security groups cannot. To enable these edge instances to communicate with each other, add security group rules.

    You can add an inbound rule to the security groups containing the edge instances to allow access from edge instances in the other security group.

    Direction

    Priority

    Action

    Protocol

    Port/Range

    Source

    Inbound

    Priority of a rule

    Select Allow or Deny.

    Protocol used for communications over a private network

    Port or port range

    Name of the other security group

Enabling Specified IP Addresses to Remotely Access Edge Instances in a Security Group

  • Example scenario

    To prevent attacks on edge instances, you can change the port number for remote login and configure security group rules that allow only specified IP addresses to remotely access the edge instances.

  • Security group configuration

    To allow IP address 192.168.20.2 to remotely access Linux edge instances in a security group over SSH and port 22, configure the following security group rule.

    Direction

    Priority

    Action

    Protocol

    Port/Range

    Source

    Inbound

    1

    Allow

    SSH (22)

    22

    IPv4 CIDR block or ID of another security group

    For example, 192.168.20.2/32

Enabling Remote SSH Access to Linux Edge Instances

  • Example scenario

    After you create a Linux edge instance, add a security group rule to enable remote SSH access to the edge instance.

  • Security group configuration

    Direction

    Priority

    Action

    Protocol

    Port/Range

    Source

    Inbound

    1

    Allow

    SSH (22)

    22

    0.0.0.0/0

Pinging the Edge Instance from the Internet

  • Example scenario

    After you create edge instances, add a security group rule so that you can run the ping command to test communication between the edge instances.

  • Security group configuration

    Direction

    Priority

    Action

    Protocol

    Port/Range

    Source

    Inbound

    1

    Allow

    ICMP

    All

    0.0.0.0/0

Using the Edge Instance as a Web Server

  • Example scenario

    If you have deployed a website on your edge instance and want to allow access to your website over HTTP or HTTPS, you need to add rules to the security group containing the edge instance.

  • Security group configuration

    Direction

    Priority

    Action

    Protocol

    Port/Range

    Source

    Inbound

    1

    Allow

    HTTP (80)

    80

    0.0.0.0/0

    Inbound

    1

    Allow

    HTTPS (443)

    443

    0.0.0.0/0

Using the Edge Instance as a DNS Server

  • Example scenario:

    If you use an edge instance as a DNS server, add security group rules to allow TCP and UDP traffic to the edge instance over port 53. Add the following rules to the security group.

  • Security group configuration

    Direction

    Priority

    Action

    Protocol

    Port/Range

    Source

    Inbound

    1

    Allow

    TCP

    53

    0.0.0.0/0

    Inbound

    1

    Allow

    UDP

    53

    0.0.0.0/0

Uploading or Downloading Files Using FTP

  • Example scenario

    If you want to use FTP to upload files to or download files from an edge instance, add the following security group rule.

    You need to install the FTP server program on the edge instance and check whether port 20 and 21 work properly.

  • Security group configuration

    Direction

    Priority

    Action

    Protocol

    Port/Range

    Source

    Inbound

    1

    Allow

    TCP

    20-21

    0.0.0.0/0