Updated on 2022-08-15 GMT+08:00

How Do I Configure a Security Group?

To access a RabbitMQ instance within a VPC or over public networks, configure the security group rules as follows.

  • Intra-VPC Access

    To access a RabbitMQ instance, you must deploy your client on an ECS in the same VPC and subnet as the instance.

    In addition, before you can access the instance through your client, you must configure correct rules for the security groups of both the ECS and RabbitMQ instance.

    1. You are advised to configure the same security group for the ECS and RabbitMQ instance. After a security group is created, network access in the group is not restricted by default.
    2. If different security groups are configured, you may need to refer to the following configurations:
      • Assume that security groups sg-53d4, sg-RabbitMQ, and Default_All are configured respectively for your ECS and RabbitMQ instance.
      • You can specify a security group or IP address as the remote end in the following rules.

      Add the following security group rule to allow the ECS to access the RabbitMQ instance.

      Table 1 Security group rule

      Direction

      Protocol & Port

      Destination

      Outbound

      All

      Default_All

      To ensure that your client can access the RabbitMQ instance, add the following rule to the security group configured for the RabbitMQ instance.

      Table 2 Security group rule

      Direction

      Protocol & Port

      Source

      Inbound

      All

      sg-53d4

  • Public access:

    A client can access a RabbitMQ instance only after rules are correctly configured for the security group of the instance.

    For example, for security group sg-RabbitMQ, you need to configure either of the following rules in the inbound direction:

    1. Protocol: TCP; port number: 5672; source IP address: 0.0.0.0/0
    2. Protocol: Any; source IP address: 0.0.0.0/0