Part I: Configure inbound rules by enabling HTTPS

In the first part, we will show you how to configure inbound rules by enabling HTTPS protocol. HTTPS (Hypertext Transfer Protocol Secure) is used for secure communication between a web browser and the website (webserver).

Under Security groups, you can find three groups, including:

Type – from the list choose HTTPS. You can choose a common protocol, such as SSH (for a Linux instance), RDP (for a Windows instance), or others. You can also manually enter a custom port or port ranges. There are more than 30 protocols that can be configured. In case you want to enable DNS, IMAP, SMTP, or other protocols, you can do it by following the same procedure as with configuring HTTPS protocol.

Protocol – it will use TCP protocol by default. The type of protocol, for example, TCP or UDP. It provides an additional selection for ICMP.Port range – once you select HTTPS as the type of the rule, it will automatically assign 443 as the default port. For custom rules and protocols, you can manually enter a port number or a port range.Source – specify a single IP address or an IP address range in CIDR notation (for example 203.0.113.5/32) that should reach our EC2 instance. In our case, we will choose Anywhere. That will automatically add IPv4 and IPv6 range 0.0.0/0 and ::/0 which means that any host from any network ID can reach our EC2 instance. If connecting from behind a firewall, you’ll need the IP address range used by the client computers. You can specify the name or ID of another security group in the same region. To specify a security group in another AWS account (EC2-Classic only), prefix it with the account ID and a forward slash, for example, 111122223333/OtherSecurityGroup.Description – optional – A description for a security group rule.

Part II: Configure Outbound traffic by enabling IMAP, POP3, and SMTP:

In the second part, we will show you how to configure outbound rule by enabling IMAP, POP3, and SMTP protocols. IMAP (Internet Message Access Protocol) and POP3 (Post Office Protocol 3) are protocols for receiving emails and SMTP (Simple Mail Transfer Protocol) is a protocol for sending an email.

Type – from the list choose IMAPS.Protocol – it will use TCP protocol by default. The type of protocol, for example, TCP or UDP. It provides an additional selection for ICMP.Port range – once you select IMAPS as the type of the rule, it will automatically assign 993 as the default port.Source – specify a single IP address or an IP address range in CIDR notation (for example 203.0.113.5/32) that should reach our EC2 instance. In our case, we will only allow access to a certain public IP address.Description – optional – A description for a security group rule.6. Click on Add rule and create a rule for POP3S and SMTPS

  1. Click on Save rules. You have successfully created three outbound rules.

How to Configure Security rules in Amazon EC2 Instance - 10How to Configure Security rules in Amazon EC2 Instance - 25How to Configure Security rules in Amazon EC2 Instance - 49How to Configure Security rules in Amazon EC2 Instance - 99How to Configure Security rules in Amazon EC2 Instance - 75How to Configure Security rules in Amazon EC2 Instance - 30How to Configure Security rules in Amazon EC2 Instance - 79How to Configure Security rules in Amazon EC2 Instance - 55How to Configure Security rules in Amazon EC2 Instance - 61