Category

Security Group (SG)

How to Manage Separate Multiple Security Groups

We covered how to create and manage AWS security groups. In this how to guide we will extend concept with creating more than a single security group and assigning multiple to a specific EC2 instance.

Scale cloud application deployment over AWS can have different app servers, DB servers, email server, etc. It is advisable to create a separate security group for each functionality or for each port and assign to the respective cloud resources i.e. instances.

In this guide we will create multiple security groups, each will hold the following different functionality: Database, Web App, HTTP, Email. The steps follow important cloud security and firewall best practices.

EC2 How-to: Delete a Security Group Rule


Using the AWS Management Console:

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
  2. Click Security Groups in the Navigation pane.The console View Security Groupsdisplays a list of security groups that belong to the account. 

How to Add a Rule to an AWS Security Group

The Amazon EC2 service allows users to add and remove instances dynamically for the purpose of scalability. However, the above mentioned scalability need and auto addition of instances can cause issues for firewall configuration and maintenance, which traditionally rely on IP addresses, subnet ranges or DNS host names as the basis for the firewall rules.

The Amazon EC2 provides a firewall to assign to the EC2 instances. The AWS EC2 firewall is configured through the user-defined groups.  A security group defines the firewall rules for the user’s instances. The above mentioned rules specify which ingress (i.e., incoming) network traffic should be delivered to the user’s instance. Subsequently, all other ingress traffic will be discarded. The ingress rule can be specified for an IP range. This provides for higher security as the user can allow traffic on certain ports (e.g. SSH, RDP, DB Port) from selected IPs only.

The present guide demonstrates how to add or remove an ingress rule for a security group.

How to Manage a Security Group on AWS

The Amazon EC2 service allows you to add and remove instances dynamically for the purpose of scalability. However, the above mentioned scalability need and auto addition of the instances can cause issues for firewall configuration and maintenance, which traditionally rely on IP addresses, subnet ranges or DNS host names as the basis for the firewall rules.

The Amazon EC2 provides a firewall to assign to the EC2 instances. The AWS EC2 firewall is configured through the user-defined groups.  When new instances are launched or additional instances are added or removed, the appropriate rules are enforced. Similarly, if the user changes a rule for a group, the changes are automatically applied to all the members of the group.

EC2 How-to: View Security Groups

Using the Amazon AWS Management Console

1 – Log in to the AWS Management Console and click the Amazon EC2 tab.

2 – Click Security Groups in the Navigation pane. The console displays a list of security groups that belong to the account.

Hitchhiker's Guide to The Cloud

Newvem's eBook for Cloud Operations